Skip to content

Commit 784b3f9

Browse files
Apply suggestions from code review
Co-authored-by: Szonja Weigl <[email protected]>
1 parent 1936239 commit 784b3f9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

neo/rawio/openephysrawio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@ def _parse_header(self):
141141
np.median(diff) == RECORD_SIZE
142142
), f"This file has a non valid data block size for channel {chan_id}, this case cannot be handled"
143143

144-
diff = np.diff(data_chan["timestamp"])
145144
channel_has_corrupted_timestamps = np.any(diff <= 0)
146145
if channel_has_corrupted_timestamps:
147146
# 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")
147+
raise ValueError(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.")
149148

150149
if seg_index == 0:
151150
# add in channel list

0 commit comments

Comments
 (0)