Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions neo/rawio/openephysrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ def _parse_header(self):
np.median(diff) == RECORD_SIZE
), f"This file has a non valid data block size for channel {chan_id}, this case cannot be handled"

diff = np.diff(data_chan["timestamp"])
channel_has_corrupted_timestamps = np.any(diff <= 0)
if channel_has_corrupted_timestamps:
# protect against corrupted timestamp in channel
raise ValueError(f"{ch_name} has corrputed timestamps, this channels need to be moved away from the folder")

if seg_index == 0:
# add in channel list
if ch_name[:2].upper() == "CH":
Expand Down