braindecode.preprocessing.AddEvents#

class braindecode.preprocessing.AddEvents(events, stim_channel=None, replace=False)[source]#

Braindecode preprocessor wrapper for add_events().

Add events to stim channel.

Parameters:
eventsndarray, shape (n_events, 3)

Events to add. The first column specifies the sample number of each event, the second column is ignored, and the third column provides the event value. If events already exist in the Raw instance at the given sample numbers, the event values will be added together.

stim_channelstr | None

Name of the stim channel to add to. If None, the config variable ‘MNE_STIM_CHANNEL’ is used. If this is not found, it will default to 'STI 014'.

replacebool

If True the old events on the stim channel are removed before adding the new ones.

Notes

Data must be preloaded in order to add events.