Add run selector + unit handling + multiprocessing + examples

This commit is contained in:
Noe Brucy
2019-12-01 23:46:17 +01:00
parent e528363938
commit 7d5aa9d911
13 changed files with 2088 additions and 3117 deletions
+38
View File
@@ -0,0 +1,38 @@
from plotter import *
# Turb
in_dir = "/home/nbrucy/simus/ismfeed/turb"
out_dir = "/home/nbrucy/visus/ismfeed/turb"
nml_key = ["turb_params/turb_rms", "turb_params/comp_frac"]
cond1_5 = [("cloud_params/dens0", "=", 1.5), ("turb_params/turb_rms", "!=", 72000)]
cond6 = ("cloud_params/dens0", "=", 6)
nproc = 15
pl = Plotter(
in_dir,
namelist_cond=cond1_5,
in_nums="all",
sort_run_by=nml_key,
path_out=out_dir,
tag="sfr_turb",
)
pl6 = Plotter(
in_dir,
namelist_cond=cond6,
in_nums="all",
sort_run_by=nml_key,
path_out=out_dir,
tag="sfr_turb_n6",
)
pl.pp_params.process.num_process = nproc
pl6.pp_params.process.num_process = nproc
for plotter in [pl, pl6]:
plotter.process(["sigma"])
plotter.process(["coldens_l", "rho_v"], ["x, y, z"])