9.9. Fragility Functions from IDA
- plotter.plot_fragility_from_ida(ida_dict, imt_label, xlims, ylims, title=None, pFlag=True, export_path=None)[source]
Generate a fragility analysis plot showing the probability of exceedance (PoE) for multiple damage states derived from IDA results. This method visualizes the lognormal fragility functions fitted during the Incremental Dynamic Analysis. Each curve represents the probability that a specific engineering demand parameter (EDP) threshold (e.g., drift limit) is exceeded given a specific intensity measure (IM) level.
The figure uses
self.figsizewithconstrained_layoutand is saved withoutbbox_inches='tight'so that every output image has identical, deterministic pixel dimensions.- Parameters:
ida_dict (dict) – Nested dictionary from
process_ida_results. Must contain'fragility'(with keys'intensities','poes','medians') and'ida_inputs'(with key'imt_key').
- imt_labelstr
Label for the X-axis (e.g., ‘PGA [g]’).
- xlimstuple of float
(min, max) limits for the X-axis (EDP axis).
- ylimstuple of float
(min, max) limits for the Y-axis (Probability axis).
- titlestr, optional
Custom plot title.
- pFlagbool, optional, default=True
If True, the plot is processed (saved/shown).
- export_pathstr, optional
Full path including filename to save the plot. Creates directories if missing.
- Returns:
The method renders the plot using Matplotlib and handles saving via the internal _save_plot utility.
- Return type:
None
Example
from openquake.vmtk.plotter import plotter
pl = plotter()
# ida_dict from postprocessor.process_ida_results()
pl.plot_fragility_from_ida(
ida_dict=ida_dict,
imt_label="Sa(T1) [g]",
ds_labels=["Slight", "Moderate", "Extensive", "Complete"],
export_path="fragility_ida.png",
)