Closed DradeAW closed 9 months ago
I do not think we are removing the first sample. Maybe I am wring. I think the device itself do not have a strick synchronize rec start that can lead to one or several shift at startup.
I don't mean that you remove the first sample,
I mean there is a variable firstSample
in the meta file to know exactly when the recording started (and this can help to synchronize the AP and LFP channels since they don't start exactly at the same time).
This information is not extracted from the metadata file and thus in the SpikeInterface object there's no way to synchronize the 2 traces.
OK you mean we have an incorrect t_start ? Certainly. Can you make a PR ?
@DradeAW, any interest in a patch? Or if you want to share a file with me I can work on a PR soon.
Unfortunately I don't think I have time to make a PR right now, But I'd love to have a little patch on this :)
I might give this a go Monday. So I might ping you then to help test the PR :)
@DradeAW
I was actually playing with this right now. And the firstSample
is being returned from neo. You need to do this...
spikeglx = neo.rawio.SpikeGLXRawIO('path/to/data')
spikeglx.parse_header()
info = spikeglx.signals_info_list
first_sample = info[0]['meta']['firstSample'] # to get this for first file set
It is a little buried. I think you mostly work at the spikeinteface level. Maybe it is tossed in the spikeglx extractor, but neo is definitely getting the info.
Ok perfect, thanks!
Issue from SpikeInterface/spikeinterface#1469
The first sample in a spikeGLX recording is missing with neo extracting, which is a piece of information that can be very useful.