Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: <KS4 double counting spikes> #847

Open
adgibson3 opened this issue Jan 14, 2025 · 1 comment
Open

BUG: <KS4 double counting spikes> #847

adgibson3 opened this issue Jan 14, 2025 · 1 comment
Assignees

Comments

@adgibson3
Copy link

adgibson3 commented Jan 14, 2025

Describe the issue:

Thanks for developing this fantastic tool. Similar to #664 and #706 I'm finding that there are a substantial number of clusters produced with jittered alignment of the spike peaks.

However, looking through TraceView has shown that some of these aren't cases of time misalignment when grouping unique spikes in a cluster.

image

image

KS4 is counting the same spike in both of these clusters, with a very slightly different template (see differences in beginnings and ends of blue highlighted traces).

This occurs with default settings as well as with attempted changes in the attached logfile.

(1) Are there additional parameter changes that might help improve this?
(2) Does phy allow for a way to split clusters in waveform view? Since many do indeed belong to the same unit, I cannot split them in FeatureView.

Version information:

Python 3.12.3, Kilosort 4.0.22, windows

kilosort4.log

@jacobpennington
Copy link
Collaborator

Hello,
This is almost certainly a case where the first pass of template matching detected the spike, and a subsequent pass detected a small residual at the same time point (notice that the amplitude is much higher for one unit). This is expected to happen occasionally because of how the algorithm works. It's difficult to completely eliminate this, but as long as it's very rare it's preferable to leave as-is. It's probably also labeled as MUA since there are so few spikes for the low-amplitude unit, but that would be something to check on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants