Hazard Curves and Uniform Hazard Spectra

This IPython notebook allows the user to visualise the hazard curves for individual sites generated from a probabilistic event-based hazard analysis or a classical PSHA-based hazard analysis, and to export the plots as png files. The user can also plot the uniform hazard spectra (UHS) for different sites.

Please specify the path of the xml file containing the hazard curve or uniform hazard spectra results in order to use the hazard curve plotter or the uniform hazard spectra plotter respectively.


In [ ]:
%matplotlib inline
import matplotlib.pyplot as plt
from plot_hazard_outputs import HazardCurve, UniformHazardSpectra

hazard_curve_file = "../sample_outputs/hazard/hazard_curve.xml"
hazard_curves = HazardCurve(hazard_curve_file)

Hazard Curve


In [ ]:
hazard_curves.loc_list

In [ ]:
hazard_curves.plot('80.763820|29.986170')

Uniform Hazard Spectra


In [ ]:
uhs_file = "../sample_outputs/hazard/uniform_hazard_spectra.xml"
uhs = UniformHazardSpectra(uhs_file)
uhs.plot(0)