This documentation is for development version 0.18.dev0.

mne.preprocessing.fix_stim_artifact

mne.preprocessing.fix_stim_artifact(inst, events=None, event_id=None, tmin=0.0, tmax=0.01, mode='linear', stim_channel=None)[source]

Eliminate stimulation’s artifacts from instance.

Note

This function operates in-place, consider passing inst.copy() if this is not desired.

Parameters:
inst : instance of Raw or Epochs or Evoked

The data.

events : array, shape (n_events, 3)

The list of events. Required only when inst is Raw.

event_id : int

The id of the events generating the stimulation artifacts. If None, read all events. Required only when inst is Raw.

tmin : float

Start time of the interpolation window in seconds.

tmax : float

End time of the interpolation window in seconds.

mode : ‘linear’ | ‘window’

Way to fill the artifacted time interval. ‘linear’ does linear interpolation ‘window’ applies a (1 - hanning) window.

stim_channel : str | None

Stim channel to use.

Returns:
inst : instance of Raw or Evoked or Epochs

Instance with modified data

Examples using mne.preprocessing.fix_stim_artifact