Skip to content

Commit 824fd9e

Browse files
committed
Warn instead of assertion for non continuous timestamps in OpenEphys legacy format
1 parent 0199770 commit 824fd9e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

neo/rawio/openephysrawio.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
import os
1212
import re
13+
import warnings
1314

1415
import numpy as np
1516

@@ -114,9 +115,11 @@ def _parse_header(self):
114115

115116
# check for continuity (no gaps)
116117
diff = np.diff(data_chan['timestamp'])
117-
assert np.all(diff == RECORD_SIZE), \
118-
'Not continuous timestamps for {}. ' \
119-
'Maybe because recording was paused/stopped.'.format(continuous_filename)
118+
if not np.all(diff == RECORD_SIZE):
119+
warnings.warn(
120+
'Not continuous timestamps for {}. ' \
121+
'Maybe because recording was paused/stopped.'.format(continuous_filename)
122+
)
120123

121124
if seg_index == 0:
122125
# add in channel list

0 commit comments

Comments
 (0)