9.7. MSA Results

plotter.plot_msa_analysis(stripe_imls, stripe_edps, imt_label, edp_label, xlims, ylims, title=None, pFlag=True, export_path=None)[source]

Visualizes Multiple Stripe Analysis (MSA) results.

For each intensity stripe the method plots: - Individual ground-motion response points coloured and sized by IM level. - A filled lognormal PDF silhouette scaled to the inter-stripe spacing. - A vertical line at the lognormal median and dashed lines at the 16th/84th percentiles, both labelled on the first stripe only. - A horizontal bracket connecting the 16th and 84th percentile ticks per stripe.

Parameters:
  • stripe_imls (2D array) – Matrix of IM levels (n_gmrs × n_stripes); only the first row is used as the unique IM level for each stripe.

  • stripe_edps (2D array) – Matrix of EDP responses (n_gmrs × n_stripes) as dimensionless ratios. Converted to percent internally.

  • imt_label (str) – Y-axis label (e.g. ‘Sa(T1) [g]’).

  • edp_label (str) – X-axis label (e.g. ‘Peak Inter-Storey Drift’). ‘[%]’ is appended.

  • xlims (tuple of float) – (min, max) for the EDP (x) axis.

  • ylims (tuple of float) – (min, max) for the IM (y) axis.

  • title (str, optional) – Figure title. Defaults to a standard MSA title.

  • pFlag (bool, default True) – Show/save the figure when True; close silently when False.

  • export_path (str, optional) – Full file path to save the figure.

Example

from openquake.vmtk.plotter import plotter

pl = plotter()
# msa_dict from postprocessor.process_msa_results()
pl.plot_msa_analysis(
    msa_dict=msa_dict,
    imt_label="Sa(T1) [g]",
    edp_label="Peak Storey Drift [-]",
    export_path="msa_analysis.png",
)