Skip to content

Commit f0d1761

Browse files
committed
Add 'channel_name' contact annotation for open ephys
1 parent 4996d4b commit f0d1761

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/probeinterface/neuropixels_tools.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,6 @@ def read_openephys(
12221222
"probe": sliced_probe,
12231223
}
12241224
else:
1225-
12261225
channel_names = np.array(list(channels.attrib.keys()))
12271226
channel_ids = np.array([int(ch[2:]) for ch in channel_names])
12281227
channel_order = np.argsort(channel_ids)
@@ -1308,6 +1307,7 @@ def read_openephys(
13081307
np_probe_dict = {
13091308
"shank_ids": shank_ids,
13101309
"elec_ids": elec_ids,
1310+
"channel_names": channel_names,
13111311
"pt_metadata": pt_metadata,
13121312
"slot": slot,
13131313
"port": port,
@@ -1446,6 +1446,8 @@ def read_openephys(
14461446
probe.annotate(port=np_probe_info["port"])
14471447
if "dock" in np_probe_info:
14481448
probe.annotate(dock=np_probe_info["dock"])
1449+
if "channel_names" in np_probe_info:
1450+
probe.annotate_contacts(channel_name=np_probe_info["channel_names"])
14491451

14501452
return probe
14511453

0 commit comments

Comments
 (0)