bemobil_mne.viz.plot_psd_topomaps#

bemobil_mne.viz.plot_psd_topomaps(inst_dict, *, unit=None, bands=None, baseline_dict=None, plot_kwargs=None, psd_kwargs=None)[source]#

Plot PSD topomaps for specified frequency bands.

Compute power-spectral-density (PSD) topomaps for each condition and frequency band. If Epochs are provided, the PSD is computed per epoch and then averaged; Evoked objects are used directly with a warning.

Parameters:
inst_dictdict

Mapping from condition name to mne.Epochs, mne.Evoked, or lists of such objects (e.g., {“condition”: mne.Epochs}).

unitstr | tuple | None

Can be either relative, absolute, dB, or a tuple of (fmin, fmax). If relative, express band power relative to the total power in the broad reference band (0-45 Hz). If an (fmin, fmax) tuple is provided, that range is used as the reference for normalization. If absolute PSD data is shown in µV²/Hz. If dB, the PSD is shown in log(µV²/Hz) = dB. Defaults to relative.

bandsdict | None

Frequency bands to plot as {“Name”: (fmin, fmax)}. If None, the default bands are: Delta (0-4 Hz), Theta (4-8 Hz), Alpha (8-12 Hz), Beta (12-30 Hz), Gamma (30-45 Hz).

baseline_dictdict | None

An optional dictionary using the same keys as the inst_dict to specify baselines e.g., {“condition”: mne.Epochs} or {“condition”: mne.Spectrum}.

kwargsdict | None

Additional keyword arguments forwarded to mne.viz.plot_topomap.

Returns:
figmatplotlib.figure.Figure

Figure containing the topomap grid (conditions x bands).

Notes

Topomaps are derived from the mean PSD across epochs/subjects. When normalization is enabled the maps are unitless (relative power); otherwise units are µV²/Hz.