csn-le / wave_clus

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

Batch files #187

Closed IljaPilja closed 3 years ago

IljaPilja commented 3 years ago

Hi, I have a brief question regarding the batch files. I guess I do not quite understand what I can do with this. Till now what I've been doing with my 32- and 16-linear probe data is to run each channel through by hand. Thus I run the WaveClus GUI and load each channel separately, which is quite a lot of work if you have 30 files to run through from one single experiment. Thus what I would like to do is run all 32 (or 16) channels through all at once and have the results saved in a separate file for each channel. I do not have tetrodes, thus I do not want all spikes combined and then clustered. Is that even possible with your batch function, or is that something I'd have to program myself?

I'd really appreciate any help, Ilja

ferchaure commented 3 years ago

For example if you have the files 'channel1.mat', 'channel2.mat' and 'channel7.mat'

Open Matlab with wave_clus code in the path), go to that folder and run

Get_spikes({'channel1.mat', 'channel2.mat' ,'channel7.mat' })

to detect the spikes, and then:

Do_clustering('all')

Will do the clustering and create a times file for each spikes file in the folder. This won't use polytrodes (there is another Get_spikes for that). Check the functions Get_spikes and Do_clustering for more information about how to call them.

IljaPilja commented 3 years ago

Thanks so much, it works great.