PlotUtils.AnomalyBands#
PlotUtils.AnomalyBands.py
Shared utility for drawing anomaly exclusion bands across all plot types (plot_compact, plot_components, MplMonitor).
- get_anomaly_mask_from_ssd(ssd)#
Extract the XR anomaly mask from an SSD object.
Returns (jv, mask) where mask is a boolean array, or (None, None) if no anomaly information is available.
Handles both concrete boolean arrays (from
corrected_copy()) andsliceobjects (stored byset_anomaly_mask()on trimmed data), converting the latter to a boolean array overjv.
- draw_anomaly_bands(ax, jv, mask, color=None, alpha=None)#
Draw shaded vertical bands for contiguous runs of True in mask.
- draw_anomaly_bands_for_ssd(xr_ax, uv_ax, ssd)#
Draw anomaly bands on XR and UV axes using SSD anomaly info.
- Parameters:
xr_ax (matplotlib Axes) – XR elution axis.
uv_ax (matplotlib Axes or None) – UV elution axis (may be twin axis).
ssd (SecSaxsData) – The data object carrying anomaly mask information.