9.8. Fragility Functions from MCA
- plotter.plot_fragility_from_mca(cloud_dict, imt_label, xlims, ylims, title=None, cloud_method=None, plot_bootstrap=False, pFlag=True, export_path=None)[source]
Generates a fragility analysis plot showing the Probability of Exceedance (PoE) for multiple damage states using Modified Cloud Analysis (MCA) results.
Supports both uncertainty quantification approaches:
'bootstrap': plots the mean fragility curves and, optionally, individual bootstrap realizations as a faint background cloud.'classical': plots the Robust Fragility mean and a shaded ±k·σ confidence band derived from the posterior variance (Jalayer et al. 2017).
The
cloud_methodis auto-detected fromcloud_dict['fragility']['cloud_method']when the argument isNone(default), falling back to'bootstrap'for dicts produced by older code that does not carry the key.The figure uses
self.figsizewithconstrained_layoutand is saved withoutbbox_inches='tight'so that every output image has identical, deterministic pixel dimensions.- Parameters:
cloud_dict (dict) –
Standardized dictionary returned by
postprocessor.process_mca_results(). Required keys:'fragility': containsintensities(1-D array),poes(2-D),medians,betas_total.For
'bootstrap':'bootstraps'sub-dict withalpha0,alpha1arrays and optionalpoes_all(3-D array of per-iteration curves).For
'classical':'fragility'must also containpoes_robust_plusandpoes_robust_minus; and'mcmc'sub-dict withchi_mean.
imt_label (str) – X-axis label (e.g.,
'PGA [g]','Sa(T1) [g]').xlims (tuple of float) –
(min, max)limits for the X-axis.ylims (tuple of float) –
(min, max)limits for the Y-axis.title (str, optional) – Custom plot title. If
None, a method-specific default is used.cloud_method ({'bootstrap', 'classical'} or None, optional) – Selects the plotting style. When
None(default), the value is read fromcloud_dict['fragility'].get('cloud_method', 'bootstrap').plot_bootstrap (bool, default False) – Bootstrap only. If
True, plots all individual bootstrap fragility curves with low alpha as a background cloud. Ignored whencloud_method='classical'.pFlag (bool, default True) – If
True, renders and/or saves the figure. IfFalse, closes the figure immediately (useful for batch runs).export_path (str, optional) – Full file path (including extension) for saving the figure. The parent directory is created automatically if needed.
- Return type:
None