Skip to content

Commit 8ed19e8

Browse files
authored
Merge pull request #338 from alejoe91/fix-parsing-of-oe-np-probes
Patch to support Quad-Base naming in read_openephys
2 parents 4fa88f4 + daba846 commit 8ed19e8

File tree

3 files changed

+1407
-2697
lines changed

3 files changed

+1407
-2697
lines changed

src/probeinterface/neuropixels_tools.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,13 +1000,17 @@ 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-
if "ADC" not in stream:
1007-
streams.append(stream)
1008-
# find probe names (exclude ADC streams)
1009-
probe_names_used = np.unique([stream.split("-")[0] for stream in streams])
1006+
# exclude ADC streams
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)
10101014
else:
10111015
has_streams = False
10121016
probe_names_used = None

0 commit comments

Comments
 (0)