Skip to content

Commit

Permalink
Bug fix when isolated S2 in input buffer is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed May 3, 2024
1 parent cc9be47 commit e10feee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions axidence/plugins/isolated/isolated_s2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def infer_dtype(self):

def compute(self, events, peaks):
_events = events[events["cut_isolated_s2"]]
if len(_events) == 0:
return np.empty(0, dtype=self.dtype)

split_peaks = strax.split_by_containment(peaks, _events)
_peaks = np.hstack(split_peaks)
if _events["n_peaks"].sum() != len(_peaks):
Expand Down

0 comments on commit e10feee

Please sign in to comment.