9.8. 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. If not provided, no title is displayed.

  • 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()
# imls_matrix, edps_matrix: the MSA stripe inputs
pl.plot_msa_analysis(
    stripe_imls=imls_matrix,    # (n_records, n_stripes)
    stripe_edps=edps_matrix,    # (n_records, n_stripes)
    imt_label="Sa(T1) [g]",
    edp_label="Peak Storey Drift [-]",
    xlims=[0, 2],
    ylims=[0, 0.05],
    export_path="msa_analysis.png",
)