Skip to content

Load ElectrodesTable metadata when loading ElectricalSeries from NWB file#589

Merged
gviejo merged 10 commits intodevfrom
586-neuroconv-nwb-columns
Apr 20, 2026
Merged

Load ElectrodesTable metadata when loading ElectricalSeries from NWB file#589
gviejo merged 10 commits intodevfrom
586-neuroconv-nwb-columns

Conversation

@wulfdewolf
Copy link
Copy Markdown
Collaborator

@wulfdewolf wulfdewolf commented Apr 14, 2026

This PR adds the metadata in the ElectrodesTable as TsdFrame metadata when loading a ElectricalSeries from a NWB file using load_file.

Before we only looked for "label", since that is an example in pynwb.
However, it seems that neuroconv uses "channel_name".
There doesn't seem to be a standard for the columns in the ElectrodesTable.

The solution I came up with was to make the TsdFrame column names the index of the ElectrodesTable and then add all the columns of the ElectrodesTable that do not have object as type as metadata columns in the TsdFrame.
This way things like location are also loaded.

Addresses #586

@wulfdewolf wulfdewolf requested a review from gviejo as a code owner April 14, 2026 21:08
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
pynapple/io/interface_nwb.py 83.17% <100.00%> (+0.87%) ⬆️
pynapple/io/loader.py 52.50% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@wulfdewolf wulfdewolf changed the title Check more column labels when loading ElectricalSeries from NWB file Load ElectrodesTable metadata when loading ElectricalSeries from NWB file Apr 15, 2026
@gviejo gviejo merged commit a30349e into dev Apr 20, 2026
16 checks passed
@gviejo gviejo deleted the 586-neuroconv-nwb-columns branch April 20, 2026 16:53
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