You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: neo/rawio/openephysrawio.py
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -147,6 +147,11 @@ def _parse_header(self):
147
147
np.median(diff) ==RECORD_SIZE
148
148
), f"This file has a non valid data block size for channel {chan_id}, this case cannot be handled"
149
149
150
+
channel_has_corrupted_timestamps=np.any(diff<=0)
151
+
ifchannel_has_corrupted_timestamps:
152
+
# protect against corrupted timestamp in channel
153
+
raiseValueError(f"{ch_name} has timestamps with zero values or negative differences between consecutive timestamps, this file ({continuous_filename}) with corrupted timestamps needs to be moved away from the folder.")
0 commit comments