PetThermoTools 0.2.43__tar.gz → 0.2.44__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PetThermoTools-0.2.43/src/PetThermoTools.egg-info → PetThermoTools-0.2.44}/PKG-INFO +1 -1
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Barom.py +13 -3
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Melting.py +14 -2
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Path.py +5 -1
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/_version.py +1 -1
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44/src/PetThermoTools.egg-info}/PKG-INFO +1 -1
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/LICENSE.txt +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/README.md +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/setup.cfg +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/setup.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Compositions.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/GenFuncs.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Holland.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Installation.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Liq.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/MELTS.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Path_wrappers.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/PhaseDiagrams.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Plotting.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/Saturation.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools/__init__.py +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools.egg-info/SOURCES.txt +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools.egg-info/dependency_links.txt +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools.egg-info/requires.txt +0 -0
- {PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools.egg-info/top_level.txt +0 -0
@@ -223,6 +223,7 @@ def mineral_cosaturation(Model="MELTSv1.0.2", cores=int(np.floor(multiprocessing
|
|
223
223
|
index_out = np.array([], dtype=int)
|
224
224
|
|
225
225
|
while len(index_out) < len(index_in):
|
226
|
+
Start = time.time()
|
226
227
|
index = np.setdiff1d(index_in, index_out)
|
227
228
|
groups = np.array_split(index, cores)
|
228
229
|
non_empty_groups = [g for g in groups if g.size > 0]
|
@@ -242,10 +243,19 @@ def mineral_cosaturation(Model="MELTSv1.0.2", cores=int(np.floor(multiprocessing
|
|
242
243
|
|
243
244
|
for p, q, group in processes:
|
244
245
|
try:
|
245
|
-
|
246
|
+
if time.time() - Start > timeout + 10:
|
247
|
+
res = q.get(timeout = 10)
|
248
|
+
else:
|
249
|
+
res = q.get(timeout=timeout)
|
246
250
|
except:
|
251
|
+
if "MELTS" not in Model:
|
252
|
+
print(f"Timeout warning reached. Calculation P_bar = {P_bar[group[0]]} will not be returned. Try increasing the timeout.")
|
247
253
|
res = []
|
248
254
|
idx_chunks = np.array([group[0]], dtype = int)
|
255
|
+
mask = np.ones(len(P_bar), dtype=bool)
|
256
|
+
mask[idx_chunks] = False
|
257
|
+
P_bar = P_bar[mask]
|
258
|
+
|
249
259
|
p.join(timeout = 2)
|
250
260
|
p.terminate()
|
251
261
|
|
@@ -290,7 +300,7 @@ def mineral_cosaturation(Model="MELTSv1.0.2", cores=int(np.floor(multiprocessing
|
|
290
300
|
phases=phases,
|
291
301
|
melts = melts
|
292
302
|
)
|
293
|
-
results[f"
|
303
|
+
results[f"Run {i}"] = Results
|
294
304
|
combined_results.update(results)
|
295
305
|
else:
|
296
306
|
if fO2_offset is None:
|
@@ -307,7 +317,7 @@ def mineral_cosaturation(Model="MELTSv1.0.2", cores=int(np.floor(multiprocessing
|
|
307
317
|
)
|
308
318
|
|
309
319
|
Results = dict(Results_df)
|
310
|
-
results[f"
|
320
|
+
results[f"Run {i}"] = Results
|
311
321
|
combined_results.update(results)
|
312
322
|
|
313
323
|
results = combined_results
|
@@ -13,7 +13,7 @@ from tqdm.notebook import tqdm, trange
|
|
13
13
|
|
14
14
|
def AdiabaticDecompressionMelting(cores = multiprocessing.cpu_count(),
|
15
15
|
Model = "pMELTS", bulk = "KLB-1", comp_lith_1 = None,
|
16
|
-
comp_lith_2 = None, comp_lith_3 = None, Tp_C = 1350, Tp_Method =
|
16
|
+
comp_lith_2 = None, comp_lith_3 = None, Tp_C = 1350, Tp_Method = None,
|
17
17
|
P_start_bar = 30000, P_end_bar = 2000, dp_bar = 200,
|
18
18
|
P_path_bar = None, Frac = False, prop = None,
|
19
19
|
fO2_buffer = None, fO2_offset = None, Fe3Fet = None, MELTS_filter = True):
|
@@ -311,6 +311,17 @@ def AdiabaticMelt(q, index, *, Model = None, comp_1 = None, comp_2 = None, comp_
|
|
311
311
|
|
312
312
|
from juliacall import Main as jl, convert as jlconvert
|
313
313
|
|
314
|
+
# import os, pathlib
|
315
|
+
|
316
|
+
# # 1. Where to install Julia + MAGEMin environment (user home dir, persistent)
|
317
|
+
# home = str(pathlib.Path.home())
|
318
|
+
# env_path = os.path.join(home, ".MAGEMinEnv")
|
319
|
+
|
320
|
+
# jl.seval(f"""
|
321
|
+
# import Pkg
|
322
|
+
# Pkg.activate("{env_path}")
|
323
|
+
# """)
|
324
|
+
|
314
325
|
jl.seval("using MAGEMinCalc")
|
315
326
|
|
316
327
|
comp_1['O'] = comp_1['Fe3Fet_Liq']*(((159.59/2)/71.844)*comp_1['FeOt_Liq'] - comp_1['FeOt_Liq'])
|
@@ -323,7 +334,8 @@ def AdiabaticMelt(q, index, *, Model = None, comp_1 = None, comp_2 = None, comp_
|
|
323
334
|
|
324
335
|
Output_jl = jl.MAGEMinCalc.AdiabaticDecompressionMelting(comp = comp_julia, P_start_kbar = P_start_bar/1000.0,
|
325
336
|
P_end_kbar = P_end_bar/1000.0, dp_kbar = dp_bar/1000.0,
|
326
|
-
T_start_C = T_start_C, fo2_buffer = fO2_buffer,
|
337
|
+
T_start_C = T_start_C, fo2_buffer = fO2_buffer,
|
338
|
+
fo2_offset = fO2_offset, Model = Model, Tp_C = Tp_C)
|
327
339
|
Results = dict(Output_jl)
|
328
340
|
# Results = stich(Results, Model = Model)
|
329
341
|
|
@@ -567,9 +567,11 @@ def path_multi(q, index, *, Model = None, comp = None, Frac_solid = None, Frac_f
|
|
567
567
|
# T_C = T_C[i], T_path_C = T_path_C[i], P_start_bar = P_start_bar[i], P_end_bar = P_end_bar[i],
|
568
568
|
# dp_bar = dp_bar[i], P_bar = P_bar[i], P_path_bar = P_path_bar[i], frac_xtal = Frac_solid,
|
569
569
|
# fo2_buffer = fO2_buffer, fo2_offset = fO2_offset[i], find_liquidus = find_liquidus)
|
570
|
-
|
570
|
+
|
571
|
+
julia_Suppress = None
|
571
572
|
if Suppress == ['rutile', 'tridymite']:
|
572
573
|
Suppress = None
|
574
|
+
julia_Suppress = None
|
573
575
|
|
574
576
|
if Suppress is not None:
|
575
577
|
jl.Suppress = Suppress
|
@@ -772,8 +774,10 @@ def path(q, index, *, Model = None, comp = None, Frac_solid = None, Frac_fluid =
|
|
772
774
|
else:
|
773
775
|
P_path_bar_julia = P_path_bar
|
774
776
|
|
777
|
+
julia_Suppress = None
|
775
778
|
if Suppress == ['rutile', 'tridymite']:
|
776
779
|
Suppress = None
|
780
|
+
julia_Suppress = None
|
777
781
|
|
778
782
|
if Suppress is not None:
|
779
783
|
jl.Suppress = Suppress
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{PetThermoTools-0.2.43 → PetThermoTools-0.2.44}/src/PetThermoTools.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|