Skip to content

Commit

Permalink
In case of both peak detection, waveforms should be aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
yger committed Nov 27, 2024
1 parent a396e1b commit 7c5bce7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/spikeinterface/sortingcomponents/clustering/circus.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def main_function(cls, recording, peaks, params, job_kwargs=dict()):
offset = int(params["waveforms"]["ms_before"] * fs / 1000)
wfs = params["few_waveforms"][:, offset-nbefore:offset+nafter]

# Ensure all waveforms have a positive max
wfs *= np.sign(wfs[:, nbefore])[:, np.newaxis]

from sklearn.decomposition import TruncatedSVD

tsvd = TruncatedSVD(params["n_svd"][0])
Expand Down

0 comments on commit 7c5bce7

Please sign in to comment.