Skip to content

SpikeGLX: NP2.x gain fallback of 80 is wrong for the NP2003+ family #1846

@h-mayorquin

Description

@h-mayorquin

The fallback gain in extract_stream_info (neo/rawio/spikeglxrawio.py) is hardcoded to 80, but for the NP2003+ family the hardware-fixed gain is 100. If a SpikeGLX .meta file from one of these probes lacks the imChan0apGain field, neo silently computes the wrong channel_gains and any uV-scaled trace is off by a factor of 100/80 = 1.25.

The relevant branch (master):

elif "2.0" in datasheet:
    if "imChan0apGain" in meta:
        per_channel_gain[:-1] = 1 / float(meta["imChan0apGain"])
    else:
        per_channel_gain[:-1] = 1 / 80.0

According to the ProbeTable, the NP2.x family splits as:

  • NP2000, NP2010: fixed gain 80 (the current literal happens to be correct)
  • NP2003, NP2004, NP2005, NP2006, NP2013, NP2014, NP2020, NP2021: fixed gain 100 (the current literal is wrong)

PR #1842 preserves this limitation.

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