csn-le / wave_clus

A fast and unsupervised algorithm for spike detection and sorting using wavelets and super-paramagnetic clustering
121 stars 65 forks source link

No signal above threshold, still finds spikes #196

Closed slassers closed 3 years ago

slassers commented 3 years ago

Hi Fernando,

We have discovered an issue in our lab where there is no signal above the threshold value yet the program still detects spikes. Across three different recordings, it detected the exact same number of spikes when no signal was above the threshold. I was wondering if you had any insight on this? I have pasted the images below each from a five second recording of the same population of neurons. My first instincts were possibly a down sampling issue but I do not think that is the case. The default parameters for the program were used. Let me know if you need any more information!

Thank you so much!

image image image

ferchaure commented 3 years ago

Hi Sam, how are you running/opening those sortings?

When less than 16 spikes were detected you can get a "Not enough spikes in the file" warning or a similar error using the GUI. It looks like the gui is finding another times file and opening that. Maybe all the raw files have the same name, and you have a _timesthatname.mat in your path?

slassers commented 3 years ago

Hi Fernando,

Sorry for the delayed reply! So I created a program that would automatically handle directories to avoid this problem and keep the data organized. This program also used the batch files. We found that if there weren't enough spikes in a file, the program would look for another file along the path with the same name and reference that one for clustering. I had a few other folders containing other wave clus outputs along the path accidentally and it referenced those causing the problem I had above.

Thanks for your time! -Sam