Skip to content

Commit 5ebbe87

Browse files
committed
Patch to support Quad-Base naming in read_openephys
1 parent c96510c commit 5ebbe87

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/probeinterface/neuropixels_tools.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,13 +1000,19 @@ def read_openephys(
10001000
if len(stream_fields) > 0:
10011001
has_streams = True
10021002
streams = []
1003-
# find probe names (exclude ADC streams)
1003+
probe_names_used = []
10041004
for stream_field in stream_fields:
10051005
stream = stream_field.attrib["name"]
1006+
# exclude ADC streams
10061007
if "ADC" not in stream:
10071008
streams.append(stream)
1008-
# find probe names (exclude ADC streams)
1009-
probe_names_used = np.unique([stream.split("-")[0] for stream in streams])
1009+
# find probe name (exclude AP-LFP from stream name)
1010+
if "AP" in stream or "LFP" in stream:
1011+
probe_name_ = stream.split("-")[0]
1012+
else:
1013+
probe_name_ = stream
1014+
if probe_name_ not in probe_names_used:
1015+
probe_names_used.append(probe_name_)
10101016
else:
10111017
has_streams = False
10121018
probe_names_used = None

0 commit comments

Comments
 (0)