Skip to content

Commit

Permalink
Fix bug when using ifo with no dq
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtrevor committed Jul 16, 2024
1 parent d4061d2 commit 1ad651d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions pycbc/events/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2166,11 +2166,6 @@ def setup_segments(self, key):
def find_dq_noise_rate(self, trigs):
"""Get dq values for a specific ifo and dq states"""

try:
tnum = trigs.template_num
except AttributeError:
tnum = trigs['template_id']

try:
ifo = trigs.ifo
except AttributeError:
Expand All @@ -2180,8 +2175,9 @@ def find_dq_noise_rate(self, trigs):
ifo = ifo[0]

dq_state = trigs['dq_state']
dq_val = numpy.zeros(len(dq_state))
dq_val = numpy.ones(len(dq_state))

tnum = self.curr_tnum
if ifo in self.dq_rates_by_state:
for (i, st) in enumerate(dq_state):
if isinstance(tnum, numpy.ndarray):
Expand Down

0 comments on commit 1ad651d

Please sign in to comment.