You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to do an analysis that extracts spike waveforms from the raw data (ie, the continuous voltage traces). However, instead of just extracting snippets of the raw data at the spike times of my unit of interest (which would be contaminated by any co-occuring spikes from other templates), I would like to subtract out the spikes from all other templates except for my unit of interest. If I understand correctly, this would be the best "estimate" of every individual spike waveform belonging of the unit of interest because any interference from temporally overlapping spikes from other templates would be subtracted off.
With static templates like in Kilosort1, it is straightforward to subtract out amplitude-scaled templates from the raw data. In Kilosort2, the templates vary over time, and the "predictData.m" script from the GUI shows how to reconstruct the raw data from the templates using rez2.mat.
This is ALMOST enough...BUT, the "predictData.m" script uses template and spike information from before the automatic merge/split step because it appears that the time-varying template data (rez.W_a, etc) are organized according to the "pre-merge/split" list of templates whereas I need to use the "post-merge/split" list of templates in order to not subtract out my unit of interest. How can I map between the "pre-merge/split" list of templates and the "post-merge/split" list of templates? I can't seem to find this information in the output.
Related questions about template information for clarification:
In rez2.mat, fields like rez.W_a and rez.W contain different numbers of templates. I assume this is because (as mentioned above) rez.W_a refers to "pre-automerge/split" list of templates and rez.W refers to "post-automerge/split" list of templates. Is this true?
The 2nd dimension of rez.W is larger than the number of different templates in st3 (ie, length(unique(rez.st3(:,2)), and further if you order the clusterView by ID in phy, you see that the ids are not continous and some IDs are skipped (ie tell user about undetected spikes #3 is missing: 0 1 4 5 6 7...). I assume this is just because templates undergoing merge or split in the automatic merge/split step are assigned a new index at the end of rez.W, but the old index is still there in rez.W?
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered:
It would not be possible to do this after the template split and merge step, since that doesn't consider the time-varying templates. If your goal is to see the spikes without background, that it shouldn't really matter if you subtract the templates before or after the splits/merges.
I would like to do an analysis that extracts spike waveforms from the raw data (ie, the continuous voltage traces). However, instead of just extracting snippets of the raw data at the spike times of my unit of interest (which would be contaminated by any co-occuring spikes from other templates), I would like to subtract out the spikes from all other templates except for my unit of interest. If I understand correctly, this would be the best "estimate" of every individual spike waveform belonging of the unit of interest because any interference from temporally overlapping spikes from other templates would be subtracted off.
With static templates like in Kilosort1, it is straightforward to subtract out amplitude-scaled templates from the raw data. In Kilosort2, the templates vary over time, and the "predictData.m" script from the GUI shows how to reconstruct the raw data from the templates using rez2.mat.
This is ALMOST enough...BUT, the "predictData.m" script uses template and spike information from before the automatic merge/split step because it appears that the time-varying template data (rez.W_a, etc) are organized according to the "pre-merge/split" list of templates whereas I need to use the "post-merge/split" list of templates in order to not subtract out my unit of interest. How can I map between the "pre-merge/split" list of templates and the "post-merge/split" list of templates? I can't seem to find this information in the output.
Related questions about template information for clarification:
In rez2.mat, fields like rez.W_a and rez.W contain different numbers of templates. I assume this is because (as mentioned above) rez.W_a refers to "pre-automerge/split" list of templates and rez.W refers to "post-automerge/split" list of templates. Is this true?
The 2nd dimension of rez.W is larger than the number of different templates in st3 (ie, length(unique(rez.st3(:,2)), and further if you order the clusterView by ID in phy, you see that the ids are not continous and some IDs are skipped (ie tell user about undetected spikes #3 is missing: 0 1 4 5 6 7...). I assume this is just because templates undergoing merge or split in the automatic merge/split step are assigned a new index at the end of rez.W, but the old index is still there in rez.W?
Any help is greatly appreciated.
The text was updated successfully, but these errors were encountered: