mne_hfo.io.create_annotations_df#
- mne_hfo.io.create_annotations_df(onset, duration, ch_name, sfreq, annotation_label=None)[source]#
Create a BIDS-derivative annotations dataframe for HFO events.
- Return type:
- Parameters:
- onset
listoffloat Onset time in seconds.
- duration
listoffloat Duration in seconds.
- ch_name
listofstr The name of the event to add to the “trial_type” column.
- sfreq
listoffloat|float The sample rate for each channel.
- annotation_label
listofstr|None List of annotation labels to label the annotation. If None (default) then will be
"HFO".
- onset
- Returns:
- annot_dfDataFrame
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