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:

DataFrame

Parameters:
onsetlist of float

Onset time in seconds.

durationlist of float

Duration in seconds.

ch_namelist of str

The name of the event to add to the “trial_type” column.

sfreqlist of float | float

The sample rate for each channel.

annotation_labellist of str | None

List of annotation labels to label the annotation. If None (default) then will be "HFO".

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