Skip to content

Commit

Permalink
Merge branch 'mf_with_both_peak_signs' of github.com:yger/spikeinterf…
Browse files Browse the repository at this point in the history
…ace into mf_with_both_peak_signs
  • Loading branch information
yger committed May 29, 2024
2 parents 49ef51e + 50a562e commit e9e2419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/spikeinterface/sortingcomponents/peak_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def __init__(
self.num_channels = recording.get_num_channels()
self.num_templates = self.num_channels

if peak_sign == 'both':
if peak_sign == "both":
weights = np.repeat(weights, 2, axis=1)
weights[1::2] *= -1
self.num_templates *= 2
Expand Down Expand Up @@ -717,7 +717,7 @@ def compute(self, traces, start_frame, end_frame, segment_index, max_margin):

# Find peaks and correct for time shift
z_ind, peak_chan_ind, peak_sample_ind = np.nonzero(peak_mask)
if self.peak_sign == 'both':
if self.peak_sign == "both":
peak_chan_ind = peak_chan_ind % self.num_channels

# If we want to estimate z
Expand Down

0 comments on commit e9e2419

Please sign in to comment.