mne_hfo.io.create_annotations_df¶
-
mne_hfo.io.
create_annotations_df
(onset, duration, ch_name, annotation_label=None)[source]¶ Create a BIDS-derivative annotations dataframe for HFO events.
- Parameters
onset : float
Onset time in seconds.
duration : float
Duration in seconds.
ch_name : str
The name of the event to add to the “trial_type” column
annotation_label : list of str | None
List of annotation labels to label the annotation. If None (default) then will be
"HFO"
.- Returns
annot_df : DataFrame
The annotations dataframe according to BIDS-Derivatives [1].
Notes
For many post-hoc operations, it will be required to know the sampling rate of the data. In order to compute that, it is recommended to take the sampling rate and multiply it with the
'onset'
column to get a new'sample'
column denoting the sample point each HFO occurs at.References
- Return type
DataFrame