Skip to content

Make our internal functions to read imro tables consistent with Spikeglx C++ file #192

Open
@h-mayorquin

Description

@h-mayorquin

@cwindolf pointed to us the exact mapping from probe type to geometry:

https://github.com/billkarsh/SpikeGLX/blob/master/Src-imro/IMROTbl.cpp#L142

Right now we are doing this with a local ad-hoc solution:

polygon_description = {
"default": [
(0, 10000),
(0, 0),
(35, -175),
(70, 0),
(70, 10000),
],
"nhp90": [
(0, 10000),
(0, 0),
(45, -342),
(90, 0),
(90, 10000),
],
"nhp125": [
(0, 10000),
(0, 0),
(62.5, -342),
(125, 0),
(125, 10000),
],
}
# A map from probe type to geometry_parameters
npx_probe = {
# Neuropixels 1.0
# This probably should be None or something else because NOT ONLY the neuropixels 1.0 have that imDatPrb_type
0: {
"probe_name": "Neuropixels 1.0",
"x_pitch": 32,
"y_pitch": 20,
"contact_width": 12,
"stagger": 16,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# Neuropixels 2.0 - Single Shank
21: {
"probe_name": "Neuropixels 2.0 - Single Shank",
"x_pitch": 32,
"y_pitch": 15,
"contact_width": 12,
"stagger": 0.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["default"],
"fields_in_imro_table": ("channel_ids", "banks", "references", "elec_ids"),
},
# Neuropixels 2.0 - Four Shank
24: {
"probe_name": "Neuropixels 2.0 - Four Shank",
"x_pitch": 32,
"y_pitch": 15,
"contact_width": 12,
"stagger": 0.0,
"shank_pitch": 250,
"shank_number": 4,
"ncol": 2,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"shank_id",
"banks",
"references",
"elec_ids",
),
},
# Experimental probes previous to 1.0
"Phase3a": {
"probe_name": "Phase3a",
"x_pitch": 32,
"y_pitch": 20,
"contact_width": 12,
"stagger": 16.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
),
},
# Neuropixels 1.0-NHP Short (10mm)
1015: {
"probe_name": "Neuropixels 1.0-NHP - short",
"x_pitch": 32,
"y_pitch": 20,
"contact_width": 12,
"stagger": 0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# Neuropixels 1.0-NHP Medium (25mm)
1022: {
"probe_name": "Neuropixels 1.0-NHP - medium",
"x_pitch": 103,
"y_pitch": 20,
"contact_width": 12,
"stagger": 0.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["nhp125"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# Neuropixels 1.0-NHP 45mm SOI90 - NHP long 90um wide, staggered contacts
1030: {
"probe_name": "Neuropixels 1.0-NHP - long SOI90 staggered",
"x_pitch": 56,
"y_pitch": 20,
"stagger": 12,
"contact_width": 12,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["nhp90"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# Neuropixels 1.0-NHP 45mm SOI125 - NHP long 125um wide, staggered contacts
1031: {
"probe_name": "Neuropixels 1.0-NHP - long SOI125 staggered",
"x_pitch": 91,
"y_pitch": 20,
"contact_width": 12,
"stagger": 12.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["nhp125"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide, linear contacts
1032: {
"probe_name": "Neuropixels 1.0-NHP - long SOI125 linear",
"x_pitch": 103,
"y_pitch": 20,
"contact_width": 12,
"stagger": 0.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 2,
"polygon": polygon_description["nhp125"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
# Ultra probe
1100: {
"probe_name": "Ultra probe",
"x_pitch": 6,
"y_pitch": 6,
"contact_width": 5,
"stagger": 0.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 8,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
},
}
# Map imDatPrb_pn (probe number) to imDatPrb_type (probe type) when the latter is missing
probe_number_to_probe_type = {
"PRB_1_4_0480_1": 0,
"PRB_1_4_0480_1_C": 0,
"NP1010": 0,
"NP1015": 1015,
"NP1022": 1022,
"NP1030": 1030,
"NP1031": 1031,
"NP1032": 1032,
None: 0,
}

We should follow the convention in their code so we can track it more closely and follow changes. I am opening this issue here to keep track for ourselves and I will add more detaill and an actiionable lists of todo later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions