Annotating continuous data

import os from datetime import timedelta import mne sample_data_folder = mne.datasets.sample.data_path() sample_data_raw_file = os.path.join(sample_data_folder, ‘MEG’, ‘sample’, ‘sample_audvis_raw.fif’) raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False) raw.crop(tmax=60).load_data()

later_annot = mne.Annotations(onset=[3, 5, 7],
duration=[1, 0.5, 0.25],
description=[‘DDD’, ‘EEE’, ‘FFF’],
orig_time=new_orig_time)

what is the unit onset and duration?
https://mne.tools/stable/auto_tutorials/raw/plot_30_annotate_raw.html#sphx-glr-auto-tutorials-raw-plot-30-annotate-raw-py

The unit is seconds.

1 Like

for such information how to define onset and duration?
I’m having a hard time understanding!
<Info | 7 non-empty values
bads:
ch_names: FP1, FP2, F3, F4, C3, C4, P3, P4, O1, O2, F7, F8, T7, T8, P7, 

chs: 51 EEG, 5 MISC
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 100.0 Hz
meas_date: 2018-05-11 08:23:32 UTC
nchan: 56
projs:
sfreq: 200.0 Hz

<RawNihon | DA0935FF.EEG, 56 x 31200 (156.0 s), ~13.4 MB, data loaded>

Hello, I’m not sure what you’re asking. Have you read & worked through the Annotations tutorial you linked to above?

Also, when you paste code or output, can you please select it and click on the “preformatted text” button in the toolbar (right next to the giant quotation mark icon) to ensure it’s properly formatted?

Thank you!