SpikeInterface / spikeinterface

A Python-based module for creating flexible and robust spike sorting pipelines.
https://spikeinterface.readthedocs.io
MIT License
519 stars 186 forks source link

Loading SpikeGLX survey mode recordings #2804

Open JulesLebert opened 5 months ago

JulesLebert commented 5 months ago

Hello, SpikeGLX has a Survey mode (https://vimeo.com/783581937) to map the activity of all the banks on a neuropixels probe. It would be very useful to load these sessions in spikeinterface to compute some metrics on the entire probe. I imagine one way would be to aggregate the channels of the different bank recordings into one recording as if they were recorded simultaneously.

Here is some code from Jennifer Colonell that loads such recording in Matlab: https://github.com/jenniferColonell/SpikeGLX_Datafile_Tools/blob/main/MATLAB/SGLX_readMeta.m, function svyBankTimes.

The main difference with a normal recording is the addition of the field ~svySBTT in the metadata, indicating the start sample for each shank/bank. I am unsure what the two sample numbers for each bank correspond to. My guess is that the first sample is when the recording changes bank and the second is when the amplifiers have settled.

I am including a file with such survey mode recording. Note that there is nothing interesting in this recording as it's just a probe in the air with a survey of only 5s per bank.

Onedrive link to the compressed recording

alejoe91 commented 5 months ago

Thanks @JulesLebert

Realistically, we won't have time to tackle this before mid June. Maybe you'd like to take a stab at it?

JulesLebert commented 5 months ago

Thanks @JulesLebert

Realistically, we won't have time to tackle this before mid June. Maybe you'd like to take a stab at it?

Unfortunately, I will not have time to do this before at least October/November this year. But I would be happy to try then!