catalystneuro / nwb-conversion-tools

Create NWB files by converting and combining neural data in proprietary formats and adding essential metadata.
https://nwb-conversion-tools.readthedocs.io/en/main/
BSD 3-Clause "New" or "Revised" License
25 stars 12 forks source link

Debug new ephy_testing_data #560

Closed CodyCBakerPhD closed 2 years ago

CodyCBakerPhD commented 2 years ago

Recent changes to the ephy_testing_data have caused some data tests to start failing. Investigating causes and workarounds now (suspect it is an improperly stubbed file).

samuelgarcia commented 2 years ago

Maybe it is a issue with the fact that the file size have to be a multiple of channel (384 + 1)

This line https://github.com/SpikeInterface/spikeextractors/blob/master/spikeextractors/extractors/spikeglxrecordingextractor/spikeglxrecordingextractor.py#L63 create a memmap without taking care that the number of sample is compatible with the number of channel.

neo do exatly the same : https://github.com/NeuralEnsemble/python-neo/blob/master/neo/rawio/spikeglxrawio.py#L96 I will fix the neo implementation for this.

Does it also bug with neo + new SI ?

CodyCBakerPhD commented 2 years ago

@samuelgarcia

Maybe it is a issue with the fact that the file size have to be a multiple of channel (384 + 1)

I also figured it had something to do with that, since the number of channels is specified in the header and the header value used in the old version.

The files are still loadable via SpikeInterface, likely due to that -1 open slicing on the reshape. Though I did not thoroughly check if the return structure from get_traces matches what it was before the new stubbing.