Skip to content

Commit e325a30

Browse files
author
Thinh Nguyen
committed
handles format differences between npx1 vs 3A
1 parent af2b18b commit e325a30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

element_array_ephys/readers/openephys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pathlib
22
import pyopenephys
33
import numpy as np
4+
import re
45

56

67
"""
@@ -129,7 +130,7 @@ def __init__(self, processor, probe_index=0):
129130
"Neuropixels 24": "neuropixels 2.0 - MS"}[self.probe_info['@probe_name']]
130131
channel_status_str = 'CHANNELS'
131132

132-
self.channel_status = {int(k.replace('@E', '')): int(v)
133+
self.channel_status = {int(re.search(r'\d+$', k).group()): int(v)
133134
for k, v in self.probe_info.pop(channel_status_str).items()}
134135

135136
self.ap_meta = {}

0 commit comments

Comments
 (0)