Skip to content

Commit 80f4bc1

Browse files
author
sprenger
committed
[neuralynx] fix channel id and name detection from header
1 parent 1c37bb6 commit 80f4bc1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neo/rawio/neuralynxrawio/nlxheader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ def __init__(self, filename):
152152

153153
# convert channel ids
154154
if 'channel_ids' in self:
155-
chid_entries = re.findall(r'\w+', self['channel_ids'])
155+
chid_entries = re.findall(r'\S+', self['channel_ids'])
156156
self['channel_ids'] = [int(c) for c in chid_entries]
157157
else:
158158
self['channel_ids'] = ['unknown']
159159

160160
# convert channel names
161161
if 'channel_names' in self:
162-
name_entries = re.findall(r'\w+', self['channel_names'])
162+
name_entries = re.findall(r'\S+', self['channel_names'])
163163
if len(name_entries) == 1:
164164
self['channel_names'] = name_entries * len(self['channel_ids'])
165165
assert len(self['channel_names']) == len(self['channel_ids']), \

0 commit comments

Comments
 (0)