Skip to content

Use oebin electrode_index for more robust OpenEphys probe wiring #4435

@h-mayorquin

Description

@h-mayorquin

PR #4396 attempted to fix the channel order bug in #4394 by matching the probe's CHANNELS keys from settings.xml (via probeinterface#400) against neo's channel_ids (from structure.oebin). These identifiers come from different parts of the OpenEphys GUI and don't match for most datasets, which is why the set guard in #4426 was needed. I tested 6 datasets (4 from GIN, 2 private) and the remap only executes for one of them, where it produces identity wiring (same as without it).

I think a more robust approach is to use the electrode_index metadata in the structure.oebin, which directly maps binary columns to electrode indices. This was added in neuropixels-pxi v0.5.0 (January 2023). When available, it can be used to wire the probe explicitly. I verified this with a private NP1032 4-shank recording: the electrode_index values match what probeinterface computes after sorting by channel number, confirming that probeinterface's current wiring is correct for that dataset. As Josh Siegle confirmed in neuropixels-pxi#39, the binary .dat file is always written in channel-number order. For older recordings where electrode_index is missing or all zeros, the current behavior (identity wiring) should be the fallback.

It is unclear what actually went wrong for the user in #4394. Probeinterface's identity wiring should be correct based on the above, and the OneBox uses the same channel ordering code as PXI in the neuropixels-pxi plugin. We should try to get hold of the user's settings.xml and structure.oebin (or a small subset of the recording) to understand what happened.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions