Skip to content

Commit 2676a16

Browse files
authored
bugfix - fix "probe_indices" in single probe recording
1 parent 1859085 commit 2676a16

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

element_array_ephys/readers/openephys.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ def load_probe_data(self):
9494

9595
if (processor['@pluginName'] == 'Neuropix-3a'
9696
or 'NP_PROBE' not in processor['EDITOR']):
97-
if isinstance(processor['EDITOR']['PROBE'], dict):
98-
probe_indices = (0,)
99-
else:
100-
probe_indices = range(len(processor['EDITOR']['PROBE']))
97+
editor_probe_key = 'PROBE'
10198
elif processor['@pluginName'] == 'Neuropix-PXI':
102-
probe_indices = range(len(processor['EDITOR']['NP_PROBE']))
99+
editor_probe_key = 'NP_PROBE'
103100
else:
104101
raise NotImplementedError
102+
103+
probe_indices = (0,) if isinstance(processor['EDITOR'][editor_probe_key], dict) else range(len(processor['EDITOR'][editor_probe_key]))
104+
105105
else: # not a processor for Neuropixels probe
106106
continue
107107

0 commit comments

Comments
 (0)