datajoint-company / DJ-NWB-Li-Daie-2015-2016

DataJoint-NWB conversion project for Li et al., 2015 and Li, Daie, et al., 2016 paper
MIT License
0 stars 5 forks source link

Fix electrode index on units table #12

Closed rly closed 4 years ago

rly commented 4 years ago

The electrodes column of the Units table expects a list of 0-indexed values corresponding to the rows of the electrodes table. Since unit[electrode] is 1-indexed, 1 should be subtracted from that value to get the corresponding 0-indexed row in the electrodes table.

This could be made more explicit when this convenience function gets released: https://github.com/hdmf-dev/hdmf/pull/187 . You could then use this line: electrodes=nwbfile.electrodes[ nwbfile.electrodes.id == unit['electrode']],

This is a critical bug because currently all files have all units that reference the wrong electrode metadata, and several files, such as ANM255201_2014-11-23_4.nwb, cannot be read.

ttngu207 commented 4 years ago

Fixed in #17