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.tsvfiles, but since they are computed on the raw data, they should be*annotationsBIDS-Derivative files. This function will take in an event DataFrame and convert to annotations DataFrame.It assumes that the event DataFrame
descriptioncolumn has the structure:<hfo_event_name>_<ch_name>. For example, it could beripple_A1for a “ripple” detected in channel A1, orfastripple_A2-A1for 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..