Skip to content

Commit

Permalink
Update for compatibility with Gareth's stat reloading code
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtrevor committed Jul 23, 2024
1 parent 9f57859 commit 5e42a5f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pycbc/events/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5e42a5f

Please sign in to comment.