Skip to content

Commit

Permalink
more clean
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgarcia committed Feb 21, 2025
1 parent 9534853 commit 54c12ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/spikeinterface/sortingcomponents/clustering/peak_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ def extract_peaks_svd(
gather_kwargs = dict()
else:
gather_mode = "npy"
if folder is None:
raise ValueError("For gather_mode=npy a folder must be given")

folder = Path(folder)

# save the model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def compute_peak_displacements(peaks, motion, recording, peak_locations=None):
"""
Compute the local motion for each peak give a motion object.
Compute the local motion for each peak given a motion object.
Parameters
----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,13 +414,11 @@ def compute(self, traces, start_frame, end_frame, segment_index, max_margin, pea
segment_index=peak["segment_index"],
)
peak_motion = peak_motion[0]
# peak_motions[i] = peak_motion

# interpolate the svd to the original position
local_chans = np.flatnonzero(self.neighbours_mask[chan_index, :])
source_locations = self.channel_locations[local_chans, :]
dest_locations = source_locations.copy()
# dest_locations[:, self.motion.dim] -= peak_motion
dest_locations[:, self.motion.dim] += peak_motion

for c in range(self.n_components):
Expand Down

0 comments on commit 54c12ce

Please sign in to comment.