From 394688a6f6f6f9a30498ab77fe913bacccf51a82 Mon Sep 17 00:00:00 2001 From: GarethCabournDavies Date: Tue, 20 Aug 2024 08:40:29 -0700 Subject: [PATCH] Dont report all ifos in significance plots --- .../pycbc_live_supervise_collated_trigger_fits | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/bin/live/pycbc_live_supervise_collated_trigger_fits b/bin/live/pycbc_live_supervise_collated_trigger_fits index 0f98d5e6a5f..3db4ff9176c 100755 --- a/bin/live/pycbc_live_supervise_collated_trigger_fits +++ b/bin/live/pycbc_live_supervise_collated_trigger_fits @@ -306,7 +306,10 @@ def single_significance_fits( """ daily_options['output'] = os.path.join( output_dir, - daily_controls['sig-daily-format'].format(date=day_str), + daily_controls['sig-daily-format'].format( + ifos=''.join(controls['ifos'].split()), + date=day_str + ), ) daily_args = ['pycbc_live_single_significance_fits'] @@ -326,7 +329,10 @@ def plot_single_significance_fits(daily_output, daily_plot_options, controls): """ Plotting daily significance fits, and link to public directory if wanted """ - daily_plot_output = f'{daily_output[:-4]}_{{ifo}}.png' + daily_plot_output = daily_output[:-4].replace( + ''.join(controls['ifos'].split()), + '{ifo}' + ) + '.png' logging.info( "Plotting daily significance fits from %s to %s", daily_output, @@ -369,9 +375,14 @@ def combine_significance_fits( Supervise the smoothing of live trigger significance fits using pycbc_live_combine_single_significance_fits """ + # This has a trick to do partial formatting, get the IFOs into the + # string, but not the date daily_files, first_date, end_date = find_daily_fit_files( combined_controls, - combined_controls['daily-format'], + combined_controls['daily-format'].format( + ifos=''.join(controls['ifos'].split()), + date='{date}' + ), controls['output-directory'], ) logging.info(