Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix electrode index on units table #12

Closed
wants to merge 2 commits into from

Conversation

rly
Copy link

@rly rly commented Nov 1, 2019

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: hdmf-dev/hdmf#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
Copy link
Member

ttngu207 commented Dec 5, 2019

Fixed in #17

@ttngu207 ttngu207 closed this Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants