mne_denoise.viz.plot_power_ratio_map#
- mne_denoise.viz.plot_power_ratio_map(inst_before, inst_after, info, vlim=(None, None), cmap='viridis', colorbar_label='Power Ratio (After / Before)', title='Power Ratio Map', show=True, ax=None, fname=None)[source]#
Plot a topomap of preserved power ratio after denoising.
- Parameters:
inst_before (MNE object | ndarray) – Inputs used to estimate per-channel variance. Accepted forms: 1D channel variances, 2D channel-by-time arrays, 3D epoch arrays, or MNE Raw/Epochs/Evoked objects.
inst_after (MNE object | ndarray) – Inputs used to estimate per-channel variance. Accepted forms: 1D channel variances, 2D channel-by-time arrays, 3D epoch arrays, or MNE Raw/Epochs/Evoked objects.
info (mne.Info) – Sensor metadata used by
mne.viz.plot_topomap.vlim (tuple[float | None, float | None]) – Lower and upper limits passed to
mne.viz.plot_topomap.cmap (str | matplotlib.colors.Colormap) – Colormap passed to
mne.viz.plot_topomap.colorbar_label (str) – Colorbar label.
title (str) – Panel title.
show (bool) – If True, display the figure.
ax (matplotlib.axes.Axes | None) – Target axes. If None, create a new figure and axes.
fname (path-like | None) – Optional output path used to save the figure.
- Returns:
fig – Figure handle.
- Return type:
- Raises:
ValueError – If
infois missing or if channel counts do not matchinfo.
Notes
Ratio values are computed as
var_after / var_beforechannel-wise.Examples
>>> from mne_denoise.viz import plot_power_ratio_map >>> fig = plot_power_ratio_map( ... before_array, ... after_array, ... info=info, ... show=False, ... )