mne_hfo.io.create_events_df

mne_hfo.io.create_events_df(input, sfreq=None, event_name='hfo')[source]

Create a BIDS events dataframe for HFO events.

Parameters

input : dictionary(list(tuple(int, int))) | mne.io.Raw

The input data structure that is either a mne Raw object with Annotations set that correspond to the HFO events, or a dictionary of lists of HFO start/end sample points.

sfreq : float | None

The sampling frequency. Only required if the input is not a mne.io.BaseRaw object.

event_name: str

The prefix of the channel event to add to the “trial_type” column (e.g. hfo for channel A1 would result in hfo_A1).

Returns

events_df : DataFrame

The event dataframe according to BIDS [1].

Notes

Output of the dataframe will have the following column structures: ..

‘onset’: ‘float64’, ‘duration’: ‘float64’, ‘sample’: ‘int’, ‘trial_type’: ‘str’

References

[1] https://bids-specification.readthedocs.io/en/stable/04-modality-specific-files/05-task-events.html # noqa

Return type

DataFrame

Examples using mne_hfo.io.create_events_df