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

deterministic version of KS2 #203

Merged
merged 21 commits into from
May 18, 2020
Merged

Conversation

jenniferColonell
Copy link
Collaborator

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.

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.
@marius10p marius10p merged commit f833820 into MouseLand:master May 18, 2020
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants