buzsakilab / buzcode

Code for internal lab sharing - polishing has started but is by no means complete
http://www.buzsakilab.com/
GNU General Public License v3.0
119 stars 128 forks source link

SlowWaveDetector uses UID to plot spikes - change to integer 1:n(spikes) #267

Open raswanson opened 5 years ago

raswanson commented 5 years ago

Just a quick catch - UID's coming out of kilosort have effectively arbitrary values (kilosort never 'deletes' clusters, so you may have cluster 5 and then 100 in spikes.cellinfo.mat). Thus, using 'spindices' for plotting in SlowWaveDetector doesn't work, since spindices column 2 is pulled from UIDs. Need to update ploting fx to use integer values 1:n(spikes).

dlevenstein commented 5 years ago

this isn't going to be plotting in just DetectSlowWaves.... going to be a frustrating thing for plotting from spindices everywhere....

raswanson commented 5 years ago

Noted - so bz_LoadPhy needs to be updated to have a cluID field (where cluster ID's should be stored, whether from kilosort or other) and we'll then change UID to conform with bz_GetSpikes (integer values from 1:n(spikes)). @AntonioFR8 hopefully this doesn't mess you guys up? It seems you've been using UID in place of cluID to refer back to kilosort, and further the current bz_LoadPhy doesn't have a cluID field. Can fix this in bz_LoadPhy post SFN, but should shoot to have a bz_GetSpikes that works across formats regardless.