Skip to content

Commit dee258d

Browse files
committed
Convert timestamps to seconds
1 parent b2617de commit dee258d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neo/rawio/openephysbinaryrawio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def _parse_header(self):
235235
if len(rising) == len(falling):
236236
durations = timestamps[falling] - timestamps[rising]
237237
if not self._use_direct_evt_timestamps:
238+
timestamps = timestamps / info['sample_rate']
238239
durations = durations / info['sample_rate']
239240

240241
info["rising"] = rising
@@ -398,9 +399,9 @@ def _event_count(self, block_index, seg_index, event_channel_index):
398399

399400
def _get_event_timestamps(self, block_index, seg_index, event_channel_index, t_start, t_stop):
400401
info = self._evt_streams[block_index][seg_index][event_channel_index]
401-
timestamps = info['timestamps']
402+
timestamps = info["timestamps"]
402403
durations = info["durations"]
403-
labels = info['labels']
404+
labels = info["labels"]
404405

405406
# slice it if needed
406407
if t_start is not None:

0 commit comments

Comments
 (0)