mne_denoise.viz.plot_asr_component_reconstruction#
- mne_denoise.viz.plot_asr_component_reconstruction(estimator, *, title: str | None = None, ax=None, show: bool = True, fname: str | None = None)[source]#
Heatmap of per-window component variance relative to rejection thresholds.
Displays a 2D image where each column is a processing window and each row is a principal component. The color encodes the ratio of the component’s variance to the rejection threshold: values above 1.0 indicate components that ASR reconstructed in that window.
- Parameters:
estimator (ASR | AdaptiveASR | JugglerASR) – A fitted estimator that has been used to
transformdata, so thatdiagnostics_is populated.title (str | None, default=None) – Custom title for the plot. If None, uses a sensible default.
ax (matplotlib.axes.Axes | None, default=None) – Axes to plot into. If None, a new themed figure is created.
show (bool, default=True) – Whether to call
plt.show()after plotting.fname (str | None, default=None) – If provided, the figure is saved to this file path.
- Returns:
fig (matplotlib.figure.Figure) – The figure containing the plot.
ax (matplotlib.axes.Axes) – The axes with the heatmap.
- Raises:
ValueError – If the estimator has no transform diagnostics or if diagnostics lack per-window
component_variances.