Skip to content

Commit

Permalink
Codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
maxtrevor committed Aug 15, 2024
1 parent dd5a583 commit ea50598
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pycbc/events/stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,10 +2303,12 @@ def check_low_latency(self, key):
if 'dq_segments' not in ifo_grp.keys():
# if segs are not in file, we must be in LL
if self.dq_state_segments is not None:
raise ValueError('Either all dq stat files must have segments or none')
raise ValueError(
'Either all dq stat files must have segments or none')
self.low_latency = True
elif self.low_latency:
raise ValueError('Either all dq stat files must have segments or none')
raise ValueError(
'Either all dq stat files must have segments or none')

def assign_template_bins(self, key):
"""
Expand Down
2 changes: 1 addition & 1 deletion pycbc/frame/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def flag_at_times(self, start_time, duration, times, padding=0):
e = s + int((duration + padding) * sr) + 1

# find samples when iDQ FAP is below threshold and state is valid
idq_fap = self.idq.raw_buffer[s:e]
idq_fap = self.idq.raw_buffer[s:e]
low_fap = idq_fap.numpy() <= self.threshold
idq_valid = self.idq_state.raw_buffer[s:e]
idq_valid = idq_valid.numpy().astype(bool)
Expand Down

0 comments on commit ea50598

Please sign in to comment.