Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/probeinterface/neuropixels_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,6 @@ def read_openephys(
"probe": sliced_probe,
}
else:

channel_names = np.array(list(channels.attrib.keys()))
channel_ids = np.array([int(ch[2:]) for ch in channel_names])
channel_order = np.argsort(channel_ids)
Expand Down Expand Up @@ -1307,6 +1306,7 @@ def read_openephys(
np_probe_dict = {
"shank_ids": shank_ids,
"elec_ids": elec_ids,
"channel_names": channel_names,
"pt_metadata": pt_metadata,
"slot": slot,
"port": port,
Expand Down Expand Up @@ -1429,6 +1429,9 @@ def read_openephys(
pt_metadata, probe_part_number, elec_ids, shank_ids=shank_ids, mux_info=mux_info
)

if "channel_names" in np_probe_info:
probe.annotate_contacts(channel_name=np_probe_info["channel_names"])

chans_saved = get_saved_channel_indices_from_openephys_settings(settings_file, stream_name=stream_name)
if chans_saved is not None:
probe = probe.get_slice(chans_saved)
Expand Down