Skip to content

Commit

Permalink
Compatible with XENONnT/straxen#1513
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Jan 15, 2025
1 parent 0adbc53 commit 5f2d076
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions axidence/plugins/salting/peak_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ def infer_dtype(self):
return dtype

def compute(self, peaks_salted, peaks):
windows = strax.touching_windows(peaks, peaks_salted, window=self.nearby_window)
mask = np.isin(peaks["type"], [1, 2])
windows = strax.touching_windows(peaks[mask], peaks_salted, window=self.nearby_window)
n_left, n_tot = self.find_n_competing(
peaks, peaks_salted, windows, fraction=self.min_area_fraction
peaks[mask], peaks_salted, windows, fraction=self.min_area_fraction
)
return dict(
time=peaks_salted["time"],
Expand Down

0 comments on commit 5f2d076

Please sign in to comment.