Seismic hazard analysis, that is the evaluation of earthquakes' probabilities of occurrence in a given time period and the corresponding ground shaking, it's a widely used methodology in the seismological and risk engineering communities to estimate earthquakes impact on structures and population.
Seismic hazard analysis is structured into two main steps: modeling earthquake sources, and calculate ground shaking from earthquakes. Typical results coming out from a seismic hazard analysis are probabilities of earthquake occurrence, synthetic seismicity histories, probabilities of exceeding ground shaking levels over a set of geographical locations in a fixed time span, and earthquake ground shaking fields.
The creation of earthquake sources (defined by seismological/geological data), implies the modeling of 3D surfaces (representing earthquake ruptures) in a spherical Earth. Ground shaking calculation is performed by employing empirical equations predicting ground shaking (with an associated uncertainty) at a given geographical location for a given earthquake rupture.
nhlib is an open-source software for performing seismic hazard analysis. It includes modules for modeling seismic sources (point, area and fault), earthquake ruptures, temporal (e.g. Poissonian) and magnitude occurrence models (e.g. Gutenberg-Richter), magnitude/area scaling relationships, ground motion and intensity prediction equations (i.e. GMPEs and IPEs). It offers a number of calculators for hazard curves, stochastic event sets, ground motion fields and disaggregation histograms. nhlib is written in python and makes heavy use of numpy for numerical calculations.