Skip to content

Rename read_spikegadgets to read_spikegadgets_neuropixels and add a Neuropixels detector #436

@h-mayorquin

Description

@h-mayorquin

The current read_spikegadgets function name suggests it can read any SpikeGadgets .rec recording, but it only handles Neuropixels probes. It filters the HardwareConfiguration entries on name == "NeuroPixels1" and hardcodes NP1000 as the probe part number. Tetrodes and other probe types that SpikeGadgets headstages can record are silently ignored. This mirrors the misnomer that PR #427 corrected for Open Ephys.

I would like to rename the function to read_spikegadgets_neuropixels and keep read_spikegadgets as a deprecation alias that emits a DeprecationWarning, matching the pattern from #427. The alias would call the renamed function directly, so existing user code keeps working with no behavior change.

Alongside the rename, I want to add a small detector function equivalent to has_neuropixels_probes for Open Ephys. It would parse the .rec XML header and return True when at least one entry under HardwareConfiguration has a Neuropixels source name (currently "NeuroPixels1", and any future Neuropixels variants the reader grows support for). Downstream tools that want to decide whether to call the reader without catching an exception would use it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions