Skip to content

Commit 13c08fe

Browse files
committed
improve logic
1 parent 5ebbe87 commit 13c08fe

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/probeinterface/neuropixels_tools.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,15 +1004,13 @@ def read_openephys(
10041004
for stream_field in stream_fields:
10051005
stream = stream_field.attrib["name"]
10061006
# exclude ADC streams
1007-
if "ADC" not in stream:
1008-
streams.append(stream)
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_)
1007+
if "ADC" in stream:
1008+
continue
1009+
streams.append(stream)
1010+
# find probe name (exclude "-AP"/"-LFP" from stream name)
1011+
stream = stream.replace("-AP", "").replace("-LFP", "")
1012+
if stream not in probe_names_used:
1013+
probe_names_used.append(stream)
10161014
else:
10171015
has_streams = False
10181016
probe_names_used = None

0 commit comments

Comments
 (0)