Skip to content
arkottkePublic

About

Ground motion models implemented in Python.

Resources

Contributing

Stars

37 stars

Watchers

2 watching

Forks

Repository files navigation

pyGMM

PyPI Python Documentation Build Status Code Quality Test Coverage License DOI

Ground motion models implemented in Python.

pyGMM evaluates published empirical models through a common interface, so they can be compared with each other and used as input to site response and random vibration theory calculations.

Features

  • Ground motion models for response spectra, PGA and PGV, including the NGA-West2, NGA-East and subduction models, and the variants used in the USGS National Seismic Hazard Model.
  • Duration, Arias intensity, CAV, vertical-to-horizontal ratio and spectral correlation models.
  • Fourier amplitude spectrum models, including source theory and Stafford et al. (2022).
  • Nonlinear soil curves and velocity profiles.
  • Slope displacement models.
  • Vectorized: a scenario can hold arrays, and ims selects the intensity measures to compute.

See the list of models for what is available. Most models are tested with unit tests that check the implementation of the model.

Installation

pyGMM requires Python 3.13 or later and can be installed with pip:

python -m pip install pygmm

The slope displacement models need the optional extra:

python -m pip install "pygmm[slope]"

Example

import pygmm

scenario = pygmm.Scenario(
    mag=6.5, dist_rup=20.0, dist_jb=20.0, dist_x=20.0, dip=90.0,
    mechanism="SS", v_s30=760.0,
)
model = pygmm.ChiouYoungs2014(scenario)
model.periods, model.spec_accels, model.ln_stds

Documentation

Information on the usage can be found in the documentation. The changelog lists the changes in each release.

The ground motion models of GEM's OpenQuake Hazardlib cover additional models and are also worth checking out.

Related packages

pyGMM is developed together with:

  • pyRVT: random vibration theory
  • pyRotd: response spectra and rotated response spectra from acceleration time series
  • pyStrata: site response analysis

Citation

When citing the software, please reference the DOI.

Contributors

  • Albert Kottke
  • Greg Lavrentiadis
  • Artie Rodgers

License

pyGMM is made available under the MIT License. See LICENSE.

About

Ground motion models implemented in Python.

Resources

Contributing

Stars

37 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages