diff --git a/gemos/analysis/gbt_phase_scan.py b/gemos/analysis/gbt_phase_scan.py index e7c4a4e0b69d6596820c5a72d22a885a923f45da..51d3ebfffa73b2b1401fb02707674c842cd16894 100644 --- a/gemos/analysis/gbt_phase_scan.py +++ b/gemos/analysis/gbt_phase_scan.py @@ -11,9 +11,10 @@ def create_configuration(input_filenames, output_directory): fed = df.iloc[0]["fed"] slot = df.iloc[0]["slot"] oh = df.iloc[0]["oh"] + gbt = df.iloc[0]["gbt"] - output_filename = "{}/fed{}-slot{}/config-oh{}-gbt.cfg".format( - output_directory, fed, slot, oh + output_filename = "{}/fed{}-slot{}/gbt/config-oh{}-gbt{}.cfg".format( + output_directory, fed, slot, oh, gbt ) os.makedirs(os.path.dirname(output_filename), exist_ok=True) @@ -24,8 +25,8 @@ def create_configuration(input_filenames, output_directory): df = pd.concat((pd.read_csv(f, sep=";") for f in input_filenames), ignore_index=True) # Create a new column with the configuration name - df["config-name"] = "PHASE_VFAT" + df["vfat"].astype(str) + df["config-name"] = "PHASE_GBT" + df["gbt"].astype(str) + "_ELINK" + df["elink"].astype(str) # Create one file per OptoHybrid - groups = df.groupby(["fed", "slot", "oh"]) + groups = df.groupby(["fed", "slot", "oh", "gbt"]) groups.apply(write_configuration)