From 086b4b4b55d3664f39a4e04b05fee0f9dcd4f0d7 Mon Sep 17 00:00:00 2001 From: Pim Nelissen Date: Wed, 15 Apr 2026 08:58:56 +0200 Subject: [PATCH] fix csv filename output --- src/pg_rad/utils/export.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pg_rad/utils/export.py b/src/pg_rad/utils/export.py index a476987..a4c38ca 100644 --- a/src/pg_rad/utils/export.py +++ b/src/pg_rad/utils/export.py @@ -80,6 +80,7 @@ def generate_df(sim: SimulationOutput) -> DataFrame: def generate_csv_name(sim: SimulationOutput) -> str: """Generate CSV name according to Alex' specification""" num_src = len(sim.sources) + src_ids = [str(i+1) for i in range(num_src)] bkg_cps = round(sim.count_rate.mean_bkg_cps) source_param_strings = [ [ @@ -99,5 +100,6 @@ def generate_csv_name(sim: SimulationOutput) -> str: src_str = "_".join(src_str_array.flat) - csv_name = f"{num_src}_src_{bkg_cps}_cps_bkg_{src_str}" + src_ids_str = "_".join(src_ids) + csv_name = f"{src_ids_str}_src_{bkg_cps}_cps_bkg_{src_str}" return csv_name