NeuralEnsemble / python-neo

Neo is a package for representing electrophysiology data in Python, together with support for reading a wide range of neurophysiology file formats
http://neo.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
325 stars 248 forks source link

error when importing spikegadget .rec file with multiple NPX 1.0 probes #1548

Closed RobertoDF closed 2 months ago

RobertoDF commented 2 months ago

Hi,

See SpikeInterface/spikeinterface#3383.

Loading a .rec file with multiple NPX probes, some channels belonging to group1 will have x coords corresponding to group0.

test rec file here: https://www.dropbox.com/s/bsjd1ipx430dr00/20240124_171519.rec?dl=0

raw_rec = read_spikegadgets(Path(r"X:\data\12\ephys\20240124_171519.rec\20240124_171519.rec") )
channel_locations = raw_rec.get_channel_locations()
df = pd.concat([pd.DataFrame(channel_locations, index=raw_rec.channel_ids), pd.DataFrame(raw_rec.get_channel_groups(), index=raw_rec.channel_ids)], axis=1)

You can see in the df that something is wrong, group and x coord are wrong. you ll have channels with group==1 and xcoord belonging to group 0.

zm711 commented 2 months ago

Hey @RobertoDF, I'll have to read this carefully. I would assume this be a probe interface issue (but I see you've already linked an issue there), but maybe @alejoe91 knows better where to localize this issue.

zm711 commented 2 months ago

Fixed at SpikeInterface level #3392.