External Email - Use Caution
Dear Eric,
Thanks for the link, the tutorial is crystal clear and help resolve the
issue I'm facing.
For the potential future user, the code below shows how to create an event
from an annotation.
events_df = pd.DataFrame ({'Time': [13.98, 358.71,380.43], # in seconds
'events_df': [0, 0,0],
'event_id': [2, 1,2]})
raw = mne.io.read_raw_edf ( path_name, preload=True )
raw.set_annotations ( mne.Annotations ( onset=events_df
['Time'].values.tolist (),
duration=[0] * len ( events_df.index
),
description=events_df
['event_id'].values.tolist () ))
events = mne.events_from_annotations ( raw )[0]
Regards
Rpb