Refactor: separte the workflow for the option to calculate distributions for BC (numb and amss), scattering and time delay

This commit is contained in:
2025-08-13 16:26:39 +02:00
parent 1038b18187
commit 053d0d5b75
3 changed files with 13 additions and 5 deletions

View File

@@ -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]