Skip to content

Patch to support Quad-Base naming in read_openephys #338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
14 changes: 9 additions & 5 deletions src/probeinterface/neuropixels_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,13 +1000,17 @@ def read_openephys(
if len(stream_fields) > 0:
has_streams = True
streams = []
# find probe names (exclude ADC streams)
probe_names_used = []
for stream_field in stream_fields:
stream = stream_field.attrib["name"]
if "ADC" not in stream:
streams.append(stream)
# find probe names (exclude ADC streams)
probe_names_used = np.unique([stream.split("-")[0] for stream in streams])
# exclude ADC streams
if "ADC" in stream:
continue
streams.append(stream)
# find probe name (exclude "-AP"/"-LFP" from stream name)
stream = stream.replace("-AP", "").replace("-LFP", "")
if stream not in probe_names_used:
probe_names_used.append(stream)
else:
has_streams = False
probe_names_used = None
Expand Down
Loading