cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
307 stars 156 forks source link

phy2 plugin access individual spike wavefrom from cluster #1148

Open GrimmSnark opened 2 years ago

GrimmSnark commented 2 years ago

Hello,

I am trying to write a plugin for some automatic spike removal to clean up a cluster. To do this I would like to compare an individual spike to the mean cluster waveform on the best channel. I have a list of spike_ids and spike_times. But I can not see the best way to get the individual waveform from the cluster_id and spike_id.

Does anyone have any suggestions how to get this data with the python plugin?

Michael

jiumao2 commented 1 year ago

Try this plugin: https://github.com/jiumao2/PhyWaveformPlugin These function may help:
controller._get_waveforms_with_n_spikes controller.model.get_waveforms