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