-
Notifications
You must be signed in to change notification settings - Fork 249
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
deterministic version of KS2 #203
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
independent control of random number generation for spikes and noise addition of a sync pulse (to simulate Neuropixels data)
…ures. Fixes collision issue in summing elements of d_dWU.
Also change threading in average_snips and subtract_spikes to avoid collisions.
Returning st from extractPCbatch2.m to allow sorting. Increased maxFR in mexThSpkPC from 10000 to 100000 to allow deterministic calculation for high firing rate.
Add useSort parameter to control sorting of spikes by time before subtracting and average_snips. Sorting required for deterministic calculation.
…t KS2. Add options in mexGPUall.m and mexMPnu8 to avoid compiling quickSort if necessary.
…ce in splitAllClusers. Add final sort of rez.st3 by spike time in master_kilosort so spike array in saved rez2.mat is ordered.
learnTemplates. Use a known unique set of spikes in initializeWdata2, rather than adding noise to possibly non-unique spikes.
to sorting whole rows -- avoids non-determinism arising from duplicate first projects. Also changed sorting of spikes in runTemplates to sortrows (same reason).
For "stableMode", use double precision arithmetic for spike subtractions, then truncate to single precision. Gives reproducible results for 20 min, 384 channel test case, but is not guaranteed to ALWAYS be deterministic.
start point makes sorting "mostly" reproducible and speed hit is minimal.
Merged
cnuahs
pushed a commit
to cnuahs/Kilosort
that referenced
this pull request
Mar 9, 2024
deterministic version of KS2 Former-commit-id: f833820
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This version corrects a gpu kernel bug (thread interference in mexMPnu8.cu) and adds optional sorting of spikes prior to subtraction and averaging to create a deterministic calculation. Also adds sorting of spikes by batch for better performance in splitAllClusters.