From 5e42a5f8891dcc221e5a6393c27352c5d470eea9 Mon Sep 17 00:00:00 2001 From: maxtrevor Date: Tue, 23 Jul 2024 09:50:38 -0700 Subject: [PATCH] Update for compatibility with Gareth's stat reloading code --- pycbc/events/stat.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pycbc/events/stat.py b/pycbc/events/stat.py index 7cd72f0df51..5a4fb096325 100644 --- a/pycbc/events/stat.py +++ b/pycbc/events/stat.py @@ -2273,6 +2273,7 @@ def __init__(self, sngl_ranking, files=None, ifos=None, self.dq_bin_by_tid = {} self.dq_state_segments = None self.low_latency = False + self.single_dtype.append(('dq_state', int)) for ifo in self.ifos: key = f'{ifo}-dq_stat_info' @@ -2394,14 +2395,14 @@ def update_file(self, key): return True # We also need to check if the DQ files have updated if key.endswith('dq_stat_info'): + ifo = key.split('-')[0] logger.info( "Updating %s statistic %s file", - ''.join(self.ifos), + ifo, key ) - self.assign_dq_rates(key) - self.assign_template_bins(key) - self.setup_segments(key) + self.dq_rates_by_state[ifo] = self.assign_dq_rates(key) + self.dq_bin_by_tid[ifo] = self.assign_template_bins(key) return True return False