mne_hfo.io.events_to_annotations

mne_hfo.io.events_to_annotations(events_df)[source]

Backwards-compatible function to convert events to annotations.

HFO events could be stored as *events.tsv files, but since they are computed on the raw data, they should be *annotations BIDS-Derivative files. This function will take in an event DataFrame and convert to annotations DataFrame.

It assumes that the event DataFrame description column has the structure: <hfo_event_name>_<ch_name>. For example, it could be ripple_A1 for a “ripple” detected in channel A1, or fastripple_A2-A1 for a “fast ripple” detected in bipolar channel A2-A1.

Parameters

events_df : pd.DataFrame

Events dataframe.

Returns

annot_df : pd.DataFrame

Annotations dataframe structured using create_annotations_df().

rtype

DataFrame ..

Examples using mne_hfo.io.events_to_annotations