bemobil_mne.viz.plot_ERP#

bemobil_mne.viz.plot_ERP(inst_dict, *, ci=0.68, picks=None, combine=None, is_sources=False, kwargs=None, baseline=None, roi=None)[source]#

Plot Event-Related Potentials (ERP) for given events.

This function is the main plotting function for ERPs, which can handle both dictionaries of mne.Epochs and mne.Evoked objects. It takes care of setting up the figure, plotting the data, and adding sensor insets if requested. Keyword arguments can be passed to customize the plot.

Parameters:
inst_dictdict

Dictionary of epochs or evoked, grouped by condition such as: {"condition": mne.Epochs} or {"condition": mne.Evoked}. If epochs are passed, the ERPs are computed by averaging over epochs.

cifloat

Confidence interval to display over epochs. Defaults to 0.68 (68% CI).

pickslist of str or list of int, optional

Channel names or, in the case of ICA, channel indices, e.g., [3]. Defaults to None, which means picking all channels or sources.

combinestr | None

If str, may be one of {‘mean’, ‘median’, ‘gfp’, ‘std’}, which will then use the specified metric to combine all channels (or sources) specified via picks. If None, each channel (or source) will be plotted separately.

is_sourcesbool, optional

If True, indicates that the input data are ICA sources. Defaults to False.

kwargsdict, optional

Additional keyword arguments passed to the plotting function. For more information see the documentation of mne.viz.plot_compare_evokeds.

baselinetuple | None

Which time window to mark as the baseline in the plot. Must be a tuple of two floats (start, stop).

roituple | None

Which time window to mark as the region of interest in the plot. Must be a tuple of two floats (start, stop).

Returns:
figmatplotlib.figure.Figure

The resulting figure containing the ERP plots.

See also

mne.viz.plot_compare_evokeds

For more information on the ERP plotting function