AllenInstitute / ecephys_spike_sorting

Modules for processing extracellular electrophysiology data from Neuropixels probes
Other
109 stars 91 forks source link

Why are mean_waveforms worise by using the temp_wh.dat as row data than .bin file? #80

Open PathwayinGithub opened 1 year ago

PathwayinGithub commented 1 year ago

Hi! I saw that the continous data can be .bin file or .dat file in these modules. As the temp_wh.dat file created by kilosort3 is whitened and high pass filtered, I think the outputs like mean waveforms, SNR and other quality control parameters should be better than using the .bin file. But I found that by using the temp_wh.dat as continous file to run the modules, the meanwaveforms are worise, the SNR is much lower. Why?

for example, the following pictures are the ploted mean waveforms of the same cluster: by using the bin file: SNR is 1.008 2ffac1ec97c5691a8ecd78d24899c5d by using the temp_wh.dat file: SNR is just 0.065 889312ef3d8e10d18e11a19aa1f8770

Is there anything wrong when I use the modules?

More information: the bin file is created by SpikeGLX. I just run the kilosort postprocessing, noise_templates,mean_waveforms,quality_metrics modules because the kilosort3 has been run manully.

jsiegle commented 1 year ago

Hi – you can't use temp_wh.dat for this, because it's likely that the epochs in the file have been re-ordered to improve drift correction. Therefore, the spike times in the original file don't necessarily correspond to the spike times in temp_wh.dat. This explains why there's no spike waveform visible in the second plot.

PathwayinGithub commented 1 year ago

Thanks,I get it!

Hi – you can't use temp_wh.dat for this, because it's likely that the epochs in the file have been re-ordered to improve drift correction. Therefore, the spike times in the original file don't necessarily correspond to the spike times in temp_wh.dat. This explains why there's no spike waveform visible in the second plot.