Skip to content

Commit

Permalink
Trying to find the problem
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Jul 11, 2024
1 parent f702cf5 commit 43e8828
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/spikeinterface/sortingcomponents/peak_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,16 +643,13 @@ def __init__(
contact_locations = recording.get_channel_locations()
dist = np.linalg.norm(contact_locations[:, np.newaxis] - contact_locations[np.newaxis, :], axis=2)
weights, self.z_factors = get_convolution_weights(dist, **weight_method)

self.num_z_factors = len(self.z_factors)
self.num_channels = recording.get_num_channels()
self.num_templates = self.num_channels

if peak_sign == "both":
weights = np.repeat(weights, 2, axis=1)
weights[1::2] *= -1
weights[:, 1::2, :] *= -1
self.num_templates *= 2

weights = weights.reshape(self.num_templates * self.num_z_factors, -1)

templates = weights[:, None, :] * prototype[None, :, None]
Expand Down

0 comments on commit 43e8828

Please sign in to comment.