Skip to content

Commit

Permalink
Add missing NP-Ultra model and fix custom_probe naming in OpenEphys
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Dec 6, 2023
1 parent 1bfac0e commit 78c90fc
Show file tree
Hide file tree
Showing 3 changed files with 1,222 additions and 3 deletions.
29 changes: 27 additions & 2 deletions src/probeinterface/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ def write_csv(file, probe):
),
"x_shift": -11,
},
# Ultra probe
# Ultra probes
"1100": {
"model_name": "Neuropixels Ultra",
"x_pitch": 6,
Expand All @@ -979,6 +979,26 @@ def write_csv(file, probe):
),
"x_shift": -8,
},
"1121": {
"model_name": "Neuropixels Ultra - Type 2",
"x_pitch": 6,
"y_pitch": 3,
"contact_width": 2,
"stagger": 0.0,
"shank_pitch": 0,
"shank_number": 1,
"ncol": 1,
"polygon": polygon_description["default"],
"fields_in_imro_table": (
"channel_ids",
"banks",
"references",
"ap_gains",
"lf_gains",
"ap_hp_filters",
),
"x_shift": 18,
},
# NP-Opto
"1300": {
"model_name": "Neuropixels Opto",
Expand Down Expand Up @@ -1030,6 +1050,7 @@ def write_csv(file, probe):
# Other probes
"NP1100": "1100", # Ultra probe - 1 bank
"NP1110": "1100", # Ultra probe - 16 banks
"NP1121": "1121", # Ultra probe - beta configuration
"NP1300": "1300", # Opto probe
}

Expand Down Expand Up @@ -1534,7 +1555,11 @@ def read_openephys(
"ptype": ptype,
}
# Sequentially assign probe names
np_probe_dict.update({"name": probe_names_used[probe_idx]})
if "custom_probe_name" in np_probe.attrib:
name = np_probe.attrib["custom_probe_name"]
else:
name = probe_names_used[probe_idx]
np_probe_dict.update({"name": name})
np_probes_info.append(np_probe_dict)

# now select correct probe (if multiple)
Expand Down
Loading

0 comments on commit 78c90fc

Please sign in to comment.