-
Notifications
You must be signed in to change notification settings - Fork 222
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
Conversion to logical from gpuArray is not possible. #22
Comments
Haven't gotten this error. You could replace the median with a nanmedian, but that likely indicates some other problem elsewhere. Can you try loading the data in the GUI to make sure the channel map is configured correctly? Also, the preprocessing seems too fast. How many channels do you have? What does the re-ordered drift matrix look like? Finally, if your simulation doesn't have drift, it kind of beats the purpose of Kilosort2. We wrote a simulation with drift that you can find in the eMouse_drift folder and the wiki. |
Hi Marius, thanks for the quick response. It's tetrode data, so 4 channels and 600 seconds. We will test it on real data and simulations with drifting too. Thanks again! |
The distance should be fine. The data format is indeed the same. Without drift it should be similar to KS1, but it should also be better at avoiding local minima of the clustering problem and over splitting less. That said, I haven't compared it on data without drift, so please let me know how it goes. |
I tried on another batch of simulated data: 100 electrodes (10x10), 300s, 15um pitch. (So probably the error was due to the previous simulated data).
In my case, Nbatch is 147 (samplesToRead=9600000, NT=65600, ntbuff=64), so the ceil(Nbatch/100) gives 2 and it skips every other batch. What is the reason the ibatch update is not simply Thanks, |
Some of the initial steps of the pipeline need just a fraction of the data, and in this case they are designed to load about 100 batches from throughout the recording. This step computes threshold crossings, and throws out channels with a very low rate (<0.1Hz by default). |
I see! It makes sense. Thanks for specifying that. We successfully ran kilosort2 on linear probe data and it gives quite some clusters with really few spikes (<30). Should the ops.minFR allow to reject these clusters? We have 3 min recordings, so setting it to 0.2 would remove clusters with less than 0.2*180 = 36 spikes? Thanks |
Sorry for the delay. Is the totality of your recording 3 min long, or do you have multiple 3 min blocks? If the latter, I suggest concatenating and spike sorting together. <30 is not that few for a 3 minute recording. Most neurons in cortex have low baseline firing rates. The minFR option checks periodically during optimization if a cluster is below that, and removes it. Because of that, it's not a hard threshold: sometimes you might still get some clusters with fewer than minFR spikes, sometimes such clusters might be introduced in the splitting step after optimization. If you really don't want those, discard them posthoc? It could also be that something is wrong. How many such clusters do you get relative to good clusters? |
So we observed this both in real data and simulated data. Around 50% of the units found by kilosort2 were with very few spikes and most of the times they looked similar (at least in waveforms) to other templates. Maybe this can be related to #29? For now we will fix it posthoc :) |
Is this for the 3 minute recordings, or also for normal length recordings? |
For very short recordings, the CCG and ACG calculations will be noisy, and maybe that's why it oversplits. Do you get a lot of splits at the end? Have you checked that the GUI loads the data correctly? |
It happened both in the 3 min recording on a 32-channel laminar probe and on a 5min recording on simulated data with 100 closely spaced electrodes. I will test out longer simulations (10min) and see if that reduces the problem. |
try 30 minutes. |
👍 |
The problem is indeed that the duraiton is too short. Closing |
Hi!
First of all thanks for the amazing tool :)
I'm trying to set it up in SpikeInterface (https://github.com/SpikeInterface), a toolbox for easily running and comparing several sorters. Kilosort2 is implemented here: https://github.com/SpikeInterface/spiketoolkit/tree/kilosort2/spiketoolkit/sorters/kilosort2
It runs fine on simulated data until I get this error:
I was able to run the eMouse_drift example and I'm running on Ubuntu 18.05, CUDA 9.1, MATLAB 2018b.
Have you experienced this error before?
Thanks!
Alessio
The text was updated successfully, but these errors were encountered: