Skip to content

Commit 28b60f3

Browse files
authored
Merge pull request #1861 from alejoe91/fix-empty-openephys
Openephysbinary stream with empty timestamps
2 parents 23d0345 + 7915e7a commit 28b60f3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

neo/rawio/openephysbinaryrawio.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,12 @@ def _parse_folder_structure(dirname, experiment_names=None):
860860
else:
861861
timestamp_file = recording_folder / "continuous" / info["folder_name"] / "timestamps.npy"
862862
timestamps = np.load(str(timestamp_file), mmap_mode="r")
863-
timestamp0 = timestamps[0]
864-
t_start = timestamp0 / info["sample_rate"]
863+
if len(timestamps) == 0:
864+
timestamp0 = 0
865+
t_start = 0.0
866+
else:
867+
timestamp0 = timestamps[0]
868+
t_start = timestamp0 / info["sample_rate"]
865869

866870
# TODO for later : gap checking
867871
signal_stream = info.copy()

0 commit comments

Comments
 (0)