Refactor: separte the workflow for the option to calculate distributions for BC (numb and amss), scattering and time delay
This commit is contained in:
@@ -147,7 +147,8 @@ def main():
|
||||
|
||||
# 5. (optional) dt histograms --------------------------
|
||||
|
||||
if run_config["do_hist"]:
|
||||
if run_config["do_BC_hist"]:
|
||||
print("Computing BC distributions...")
|
||||
# --- Mass histogram
|
||||
hist_configs = [
|
||||
{"name": "BC_all", "flag_col": None, "flag_value": None},
|
||||
@@ -201,7 +202,8 @@ def main():
|
||||
results.append(ddf_out)
|
||||
|
||||
# --- Scattering histogram
|
||||
|
||||
if run_config["do_scatt_hist"]:
|
||||
print("Computing scattering distribution...")
|
||||
meta_hist = make_hist_meta(
|
||||
bin_ctrs=scatt_bin_ctrs,
|
||||
kind="scatt",
|
||||
@@ -227,7 +229,8 @@ def main():
|
||||
results.append(ddf_scatt)
|
||||
|
||||
# --- Timelag histogram
|
||||
|
||||
if run_config["do_timelag_hist"]:
|
||||
print("Computing time delay distribution...")
|
||||
mass_bins = ddf_pbp_with_flow["BC mass bin"].unique().compute()
|
||||
for idx, mass_bin in enumerate(mass_bins[:1]):
|
||||
ddf_bin = ddf_pbp_with_flow[ddf_pbp_with_flow["BC mass bin"] == mass_bin]
|
||||
|
||||
@@ -29,7 +29,10 @@ def load_and_resolve_config(args):
|
||||
"instr_cfg": choose(args.instr_config, base, "paths.instrument_config"),
|
||||
"dt": choose(args.dt, base, "workflow.dt", 1),
|
||||
"do_conc": args.conc or get(base, "workflow.conc", False),
|
||||
"do_hist": args.hist or get(base, "workflow.hist", False),
|
||||
"do_BC_hist": args.BC_hist or get(base, "workflow.BC_hist", False),
|
||||
"do_scatt_hist": args.scatt_hist or get(base, "workflow.scatt_hist", False),
|
||||
"do_timelag_hist": args.timelag_hist
|
||||
or get(base, "workflow.timelag_hist", False),
|
||||
"rho_eff": choose(args.BC_rho, base, "bc.rho_eff", 1.8),
|
||||
"BC_type": choose(args.BC_type, base, "bc.type", "constant_effective_density"),
|
||||
"cluster": {
|
||||
|
||||
@@ -6,7 +6,9 @@ paths:
|
||||
|
||||
workflow:
|
||||
conc: true
|
||||
hist: true
|
||||
BC_hist: true
|
||||
scatt_hist: true
|
||||
timelag_hist: true
|
||||
dt: 1 # seconds
|
||||
|
||||
cluster:
|
||||
|
||||
Reference in New Issue
Block a user