9.11. Storey Loss Functions

plotter.plot_slf_model(out, cache, edp_label, loss_label, xlims, ylims, title=None, pFlag=True, export_path=None)[source]

Generate a plot to visualize the Storey Loss Function (SLF) model output.

This function visualizes the storey loss for different realizations of a model by plotting the following: 1. Scatter plot of total storey loss for each realization. 2. Shaded region representing the 16th to 84th percentiles of the empirical data. 3. Plot of the median of the empirical data for simulations. 4. Fitted Storey Loss Function (SLF) curve.

The plot includes: - A scatter plot of the total loss per storey for each realization. - A shaded area representing the empirical 16th to 84th percentiles. - The median storey loss curve based on simulations. - The fitted SLF curve.

The figure uses self.figsize with constrained_layout and is saved without bbox_inches='tight' so that every output image has identical, deterministic pixel dimensions.

9.11. Parameters:

outdict
A dictionary containing the results of the model. It should include keys for:
  • ‘edp_range’: A range of Engineering Demand Parameters (EDP) used in the analysis.

  • ‘slf’: The fitted Storey Loss Function curve.

cachedict
A dictionary containing cached data, including:
  • ‘total_loss_storey’: A list of total storey losses for each realization.

  • ‘empirical_16th’, ‘empirical_84th’: Empirical data representing the 16th and 84th percentiles.

  • ‘empirical_median’: Empirical median values of the storey loss for the simulations.

edp_labelstr

The label for the x-axis, typically representing the Engineering Demand Parameter (EDP) range.

loss_labelstr

The label for the y-axis, typically representing the Storey Loss Ratio range.

xlimstuple of float

(min, max) limits for the X-axis (EDP axis).

ylimstuple of float

(min, max) limits for the Y-axis (Loss 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.

9.11. Returns:

None

This function saves the generated plot for each key in the cache dictionary to the specified directory.