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 8ec58f7 commit 1936239Copy full SHA for 1936239
neo/rawio/openephysrawio.py
@@ -141,6 +141,12 @@ def _parse_header(self):
141
np.median(diff) == RECORD_SIZE
142
), f"This file has a non valid data block size for channel {chan_id}, this case cannot be handled"
143
144
+ diff = np.diff(data_chan["timestamp"])
145
+ channel_has_corrupted_timestamps = np.any(diff <= 0)
146
+ if channel_has_corrupted_timestamps:
147
+ # protect against corrupted timestamp in channel
148
+ raise ValueError(f"{ch_name} has corrputed timestamps, this channels need to be moved away from the folder")
149
+
150
if seg_index == 0:
151
# add in channel list
152
if ch_name[:2].upper() == "CH":
0 commit comments