Skip to content

Build one probe per electrode group in NwbRecordingExtractor - #4820

Merged
alejoe91 merged 1 commit into
SpikeInterface:mainfrom
h-mayorquin:fix_nwb_native_group_ordering
Oct 7, 2026
Merged

alejoe91 merged 1 commit into
SpikeInterface:mainfrom
h-mayorquin:fix_nwb_native_group_ordering

Conversation

@h-mayorquin

Copy link
Copy Markdown
Contributor

Closes #3999.

NwbRecordingExtractor builds a single probe from the rel_x and rel_y of every channel in the ElectricalSeries. The NWB schema defines those coordinates relative to the electrode group, so they only need to be unique within a group. When one ElectricalSeries holds several probes of the same type, each one its own electrode group (as in the Frank lab files from the issue), the channels of different probes share positions and loading the recording fails with "Contact positions must be unique within a probe". I now build one probe per electrode group and attach them with check_overlap=False, since overlapping groups are valid NWB. Users who want one recording per probe can call recording.split_by("group") after loading.

@h-mayorquin h-mayorquin self-assigned this Oct 2, 2026
@h-mayorquin h-mayorquin added bug Something isn't working extractors Related to extractors module probeinterface Related to probeinterface labels Oct 2, 2026
@alejoe91 alejoe91 added this to the 0.105.1 milestone Oct 5, 2026

@alejoe91 alejoe91 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet :)

@samuelgarcia

Copy link
Copy Markdown
Member

super!

@alejoe91
alejoe91 merged commit 5cacee5 into SpikeInterface:main Oct 7, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working extractors Related to extractors module probeinterface Related to probeinterface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NWB recording with multiple electrode groups (e.g. probes) has non-unique channel locations

3 participants