We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39390f6 commit 2a7dbfeCopy full SHA for 2a7dbfe
neo/rawio/openephysrawio.py
@@ -492,11 +492,11 @@ def explore_folder(dirname):
492
if (seg_index + 1) > info['nb_segment']:
493
info['nb_segment'] += 1
494
elif filename.endswith('.spikes'):
495
- s = filename.replace('.spikes', '').split('_')
496
- if len(s) == 2:
497
- seg_index = 0
+ s = re.findall("(_\d+)$", filename.replace('.spikes', ''))
+ if s:
+ seg_index = int(s[0][1:]) - 1
498
else:
499
- seg_index = int(s[2]) - 1
+ seg_index = 0
500
if seg_index not in info['spikes'].keys():
501
info['spikes'][seg_index] = []
502
info['spikes'][seg_index].append(filename)
0 commit comments