[fragdisk] [galactica] add some scripts options
This commit is contained in:
+28
-20
@@ -41,6 +41,21 @@ from plotter import Plotter
|
||||
from pp_params import default_params
|
||||
from ramses_astrophysix import ramses
|
||||
|
||||
|
||||
# ---------------------------------------------- Global parameters ------------------------------------------ #
|
||||
|
||||
# groups = ["jr13_tic"]
|
||||
groups = ["jr11", "jr12", "jr12_tic", "jr13_tic"]
|
||||
keep_plot_info = False
|
||||
include_hdf5 = True
|
||||
replot = True
|
||||
nml_key = "cloud_params/beta_cool"
|
||||
select = {
|
||||
"time": 4.5,
|
||||
# "filter_nml" : (nml_key, "=", 8),
|
||||
}
|
||||
|
||||
|
||||
pp_params = default_params()
|
||||
pp_params.input.nml_filename = "disk.nml"
|
||||
pp_params.pymses.map_size = 2048
|
||||
@@ -58,8 +73,6 @@ out_dir = "/dsm/anais/storageA/nbrucy/visus/fragdisk/mnras"
|
||||
in_dir_conv = "/drf/projets/alfven-data/nbrucy/simus/conv_disk"
|
||||
out_dir_conv = "/dsm/anais/storageA/nbrucy/visus/conv_disk"
|
||||
|
||||
nml_key = "cloud_params/beta_cool"
|
||||
|
||||
|
||||
# ---------------------------------------------- Project creation ------------------------------------------ #
|
||||
# Available project categories are :
|
||||
@@ -228,8 +241,6 @@ Sigma_u = U.Unit.create_unit(
|
||||
|
||||
# ---- Runs -----
|
||||
|
||||
groups = ["jr11", "jr12", "jr12_tic", "jr13_tic"]
|
||||
# groups = ["jr13_tic"]
|
||||
pls = []
|
||||
|
||||
for group in groups:
|
||||
@@ -317,7 +328,6 @@ for group in groups:
|
||||
|
||||
# -------------------------------------------------------------------------------------------------------------------- #
|
||||
|
||||
redo = True
|
||||
for pl in pls:
|
||||
pl.pp_params.process.verbose = True
|
||||
pl.comp.pp_params.process.verbose = True
|
||||
@@ -329,11 +339,6 @@ for pl in pls:
|
||||
# -------------------------------------------------------------------------------------------------------------------- #
|
||||
|
||||
|
||||
select = {
|
||||
"time": 4.5,
|
||||
# "filter_nml" : (nml_key, "=", 8),
|
||||
}
|
||||
|
||||
for pl in pls:
|
||||
# Edit descriptions
|
||||
pl.rules["slice_rho"].description = "Density slice"
|
||||
@@ -349,7 +354,7 @@ for pl in pls:
|
||||
|
||||
# define plot parameters
|
||||
map_kwargs = {
|
||||
"overwrite": redo,
|
||||
"overwrite": replot,
|
||||
"overwrite_dep": False,
|
||||
"unit_space": rd,
|
||||
"center_space": True,
|
||||
@@ -396,8 +401,6 @@ for pl in pls:
|
||||
pl.slice_rho("z", **rho_kwargs)
|
||||
pl.slice_rho("y", **rho_kwargs)
|
||||
|
||||
pl.slice_P("z", **P_kwargs)
|
||||
|
||||
pl.slice_velr(
|
||||
"z",
|
||||
label=r"$v_r$",
|
||||
@@ -406,10 +409,13 @@ for pl in pls:
|
||||
**vel_kwargs,
|
||||
)
|
||||
pl.slice_velphi("z", label=r"$v_\varphi$", **vel_kwargs)
|
||||
pl.slice_velx("z", label=r"$v_x$", **vel_kwargs)
|
||||
|
||||
pl.slice_P("z", **P_kwargs)
|
||||
|
||||
pl.pdf_coldens(
|
||||
"z",
|
||||
overwrite=redo,
|
||||
overwrite=replot,
|
||||
overwrite_dep=False,
|
||||
unit_time=orp,
|
||||
nml_key="cloud_params/beta_cool",
|
||||
@@ -461,12 +467,14 @@ for simu in proj.simulations:
|
||||
for df in snap.datafiles:
|
||||
name = df[FileType.JPEG_FILE].filename
|
||||
name = os.path.splitext(name)[0] + ".h5"
|
||||
h5 = h5py.File(out_dir + "/" + name, "w")
|
||||
p = h5.create_group("plot")
|
||||
df.plot_info.hsp_save_to_h5(p)
|
||||
h5.close()
|
||||
df[FileType.HDF5_FILE] = out_dir + "/" + name
|
||||
df.plot_info = pi
|
||||
if include_hdf5 and not df.name in ["slice_velphi_z", "slice_velr_z"]:
|
||||
h5 = h5py.File(out_dir + "/" + name, "w")
|
||||
p = h5.create_group("plot")
|
||||
df.plot_info.hsp_save_to_h5(p)
|
||||
h5.close()
|
||||
df[FileType.HDF5_FILE] = out_dir + "/" + name
|
||||
if not keep_plot_info:
|
||||
df.plot_info = pi
|
||||
|
||||
# Trim parameters name
|
||||
for param in ramses.input_parameters:
|
||||
|
||||
Reference in New Issue
Block a user