Skip to content

Commit e977426

Browse files
committed
more changes
1 parent f655448 commit e977426

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/probeinterface/neuropixels_tools.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,11 @@ def _parse_openephys_settings(
997997
- settings_channel_keys: np.array of str, or None
998998
- elec_ids, shank_ids: for legacy fallback
999999
"""
1000+
if not has_neuropixels_probes(settings_file):
1001+
if raise_error:
1002+
raise Exception("No Neuropixels probe geometry found in settings file")
1003+
return None
1004+
10001005
ET = import_safely("xml.etree.ElementTree")
10011006
tree = ET.parse(str(settings_file))
10021007
root = tree.getroot()
@@ -1035,11 +1040,6 @@ def _parse_openephys_settings(
10351040
and channel_map_position < record_node_position
10361041
)
10371042

1038-
if neuropix_pxi_processor is None and onebox_processor is None and onix_processor is None:
1039-
if raise_error:
1040-
raise Exception("Open Ephys can only be read from Neuropix-PXI, OneBox or ONIX plugins.")
1041-
return None
1042-
10431043
if neuropix_pxi_processor is not None:
10441044
assert onebox_processor is None, "Only one processor should be present"
10451045
processor = neuropix_pxi_processor

0 commit comments

Comments
 (0)