diff --git a/scripts/sp2xr_pipeline.py b/scripts/sp2xr_pipeline.py index 3c3b5f7..4beac0e 100644 --- a/scripts/sp2xr_pipeline.py +++ b/scripts/sp2xr_pipeline.py @@ -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] diff --git a/src/sp2xr/helpers.py b/src/sp2xr/helpers.py index a8bdfa4..529c47a 100644 --- a/src/sp2xr/helpers.py +++ b/src/sp2xr/helpers.py @@ -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": { diff --git a/tests/run_config.yaml b/tests/run_config.yaml index 7446ef8..33b7e3f 100644 --- a/tests/run_config.yaml +++ b/tests/run_config.yaml @@ -6,7 +6,9 @@ paths: workflow: conc: true - hist: true + BC_hist: true + scatt_hist: true + timelag_hist: true dt: 1 # seconds cluster: