pygmm documentation - read the docspygmm documentation, release 0.6.0 table 5 – continued from...

50
pygmm Documentation Release 0.6.0 Albert Kottke Aug 12, 2019

Upload: others

Post on 09-Mar-2020

66 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm DocumentationRelease 0.6.0

Albert Kottke

Aug 12, 2019

Page 2: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral
Page 3: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

Contents

1 pyGMM 31.1 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Citation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Installation 52.1 Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Windows and OS-X . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 Installing pygmm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Usage 7

4 Models 94.1 Generic Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.2 Specific Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.3 Conditional Spectrum Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284.4 Vertical-to-Horizontal (V/H) Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 Contributing 315.1 Types of Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.2 Get Started! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325.3 Pull Request Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.4 Tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Credits 356.1 Development Lead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2 Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7 History 377.1 0.6.0 (2019-08-12) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.2 0.4.0 (2016-04-08) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.3 0.3.2 (2016-03-30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377.4 0.3.1 (2016-03-30) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

8 References 39

9 Indices and tables 41

Bibliography 43

i

Page 4: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

Index 45

ii

Page 5: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Contents:

Contents 1

Page 6: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

2 Contents

Page 7: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 1

pyGMM

Ground motion models implemented in Python.

• Free software: MIT license

• Documentation: https://pygmm.readthedocs.org.

I have recently learned that additional ground motion models have been implemented through GEM’s OpenQuakeHazardlib, which I recommend checking out.

1.1 Features

Models currently supported:

• Akkar, Sandikkaya, & Bommer (2014) with unit tests

• Atkinson & Boore (2006)

• Abrahamson, Silva, & Kamai (2014) with unit tests

• Abrahamson, Gregor, & Addo (2016) with unit tests

• Boore, Stewart, Seyhan, & Atkinson (2014) with unit tests

• Campbell (2003)

• Campbell & Bozorgnia (2014) with unit tests

3

Page 8: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

• Chiou & Youngs (2014) with unit tests

• Derras, Bard & Cotton (2013) with unit tests

• Idriss (2014) with unit tests

• Pezeshk, Zandieh, & Tavakoli (2001)

• Tavakoli & Pezeshk (2005)

Conditional spectra models:

• Baker & Jayaram (2008) with unit tests

• Kishida (2017) with unit tests

Unit tests means that each test cases are used to test the implemention of the model.

1.2 Citation

Please cite this software using the following DOI:

4 Chapter 1. pyGMM

Page 9: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 2

Installation

Prior to using pygmm, Python and the following dependencies need to be installed:

• matplotlib – used for plotting

• numpy – fast vector operations

pygmm supports both Python 2.7 and Python 3.

2.1 Linux

Install pygmm dependencies is best accomplished with a package manager. On Arch Linux this can be accomplishedwith:

pacman -S python-numpy python-matplotlib pip

2.2 Windows and OS-X

On Windows, installing matplotlib and numpy can be simplified by using Miniconda3. Miniconda3 has installers forWindows 32-bit, Windows 64-bit, and OS-X.

After the installer is finished, install the required dependencies by opening a terminal. On Windows, this is bestaccomplished with Windows Key + r, enter cmd. Next enter the following command:

conda install --yes pip setuptools numpy matplotlib

On Windows, the text can copied and pasted if Quick Edit mode is enabled. To enable this feature, right click on theicon in the upper left portion of the window, and select Properties, and then check the Quick Edit Mode check boxwithin the Edit Options group. Copy the text, and then paste it by click the right mouse button.

5

Page 10: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

2.3 Installing pygmm

After the dependencies have been installed, install or upgrade pygmm using pip:

pip install --upgrade pygmm

This command can be re-run later to upgrade pygmm to the latest version.

6 Chapter 2. Installation

Page 11: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 3

Usage

pygmm is used within Python scripts. Here is a simple example of plotting the influence of 𝑉𝑠30 on the Chiou &Youngs (2014) [CY14] model:

#!/usr/bin/env python3# -*- coding: utf-8 -*-"""Plot influence of V_s30 predicted by CY14 model."""

import matplotlib.pyplot as pltimport pygmm

fig, ax = plt.subplots()

for v_s30 in [300, 600, 900]:s = pygmm.model.Scenario(

mag=7, dist_jb=20, dist_x=20, dist_rup=25, dip=90, v_s30=v_s30)m = pygmm.ChiouYoungs2014(s)ax.plot(m.periods, m.spec_accels, label=str(v_s30))

ax.set_xlabel('Period (s)')ax.set_xscale('log')

ax.set_ylabel('5%-Damped Spectral Accel. (g)')ax.set_yscale('log')

ax.grid()

ax.legend(title='$V_{s30}$ (m/s)')

plt.show()

7

Page 12: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

8 Chapter 3. Usage

Page 13: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 4

Models

4.1 Generic Interface

The interfaces for models have been simplified to use same parameter names and values where possible. Details ofthis interface are provided in GroundMotionModel.

class pygmm.model.Model(*args, **kwargs)Bases: object

__init__(*args, **kwargs)Initialize the model.

Summary of Methods

__init__(*args, **kwargs) Initialize the model.Model.interp_ln_stdsModel.interp_spec_accels

Attributes

ABBREV Short name of the modelModel.INDEX_PGAModel.INDEX_PGDModel.INDEX_PGVModel.INDICES_PSAModel.LIMITSNAME Long name of the modelModel.PARAMSModel.PERIODS

Continued on next page

9

Page 14: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 2 – continued from previous pageModel.PGD_SCALEModel.PGV_SCALEModel.ln_std_pgaModel.ln_std_pgdModel.ln_std_pgvModel.ln_stdsModel.periodsModel.pgaModel.pgdModel.pgvModel.spec_accels

NAME = ''Long name of the model

ABBREV = ''Short name of the model

4.1.1 Mechanism

The following abbreviations are used for fault mechanism. Refer to each model for the specific definition of themechanism.

Abbreviation NameU UnspecifiedSS Strike-slipNS Normal slipRS Reverse slip

4.2 Specific Models

Each supported ground motion model inherits from Model, which provides the standard interface to access the cal-culated ground motion. The following models have been implemented.

AbrahamsonGregorAddo2016 Abrahamson, Gregor, and Addo (2016) ground motionmoodel.

AbrahamsonSilvaKamai2014 Abrahamson, Silva, and Kamai (2014, [ASK14])model.

AkkarSandikkayaBommer2014 Akkar, Sandikkaya, & Bommer (2014, [ASB14])model.

AtkinsonBoore2006 Atkinson and Boore (2006, [AB06]) model.BooreStewartSeyhanAtkinson2014 Boore, Stewart, Seyhan, and Atkinson (2014,

[BSSA14]) model.Campbell2003 Campbell (2003, [Cam03]) model.CampbellBozorgnia2014 Campbell and Bozorgnia (2014, [CB14]) model.ChiouYoungs2014 Chiou and Youngs (2014, [CY14]) model.DerrasBardCotton2014 Derras, Bard and Cotton (2014, [DBC14]) model.HermkesKuehnRiggelsen2014 Hermkes, Kuehn, Riggelsen (2014, [HKR14]) model.

Continued on next page

10 Chapter 4. Models

Page 15: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 3 – continued from previous pageIdriss2014 Idriss (2014, [Idr14]) model.PezeshkZandiehTavakoli2011 Pezeshk, Zandieh, and Tavakoli (2011, [PZT11]) model.TavakoliPezeshk05 Tavakoli and Pezeshk (2005, [TP05]) model.

4.2.1 pygmm.abrahamson_gregor_addo_2016.AbrahamsonGregorAddo2016

class pygmm.abrahamson_gregor_addo_2016.AbrahamsonGregorAddo2016(scenario, ad-just_c1=None,ad-just_c4=0)

Bases: pygmm.model.GroundMotionModel

Abrahamson, Gregor, and Addo (2016) ground motion moodel.

This model was developed for subduction regions and is commonly referred to as the BCHydro model.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario, adjust_c1=None, adjust_c4=0)Initialize the model.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario.

Methods

__init__(scenario[, adjust_c1, adjust_c4]) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFadjust_c1adjust_c4ln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.

Continued on next page

4.2. Specific Models 11

Page 16: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 5 – continued from previous pageln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.2 pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014

class pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Abrahamson, Silva, and Kamai (2014, [ASK14]) model.

This model was developed for active tectonic regions as part of the NGA-West2 effort.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.calc_depth_1_0(v_s30, region) Estimate the depth to 1 km/sec horizon (𝑍1.0) based

on 𝑉𝑠30 and region.calc_depth_tor(mag) Calculate the depth to top of rupture (km).calc_width(mag, dip) Compute the fault width based on equation in NGW2

spreadsheet.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITS

Continued on next page

12 Chapter 4. Models

Page 17: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 7 – continued from previous pageNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

static calc_width(mag: float, dip: float)→ floatCompute the fault width based on equation in NGW2 spreadsheet.

This equation is not provided in the paper.

Parameters

• mag (float) – moment magnitude of the event (𝑀𝑤)

• dip (float) – Fault dip angle (𝜑, deg)

Returns width – estimated fault width (𝑊 , km)

Return type float

static calc_depth_tor(mag: float)→ floatCalculate the depth to top of rupture (km).

Parameters mag (float) – moment magnitude of the event (𝑀𝑤)

Returns depth_tor – estimated depth to top of rupture (km)

Return type float

static calc_depth_1_0(v_s30: float, region: str = ’california’)→ floatEstimate the depth to 1 km/sec horizon (𝑍1.0) based on 𝑉𝑠30 and region.

This is based on equations 18 and 19 in the [ASK14] and differs from the equations in the [CY14].

Parameters

• v_s30 (float) – time-averaged shear-wave velocity over the top 30 m of the site (𝑉𝑠30,m/s). Keyword Args:

• region (str, optional) – region of basin model. Valid options: ‘california’,‘japan’. If None, then ‘california’ is used as the default value.

Returns depth_1_0 – depth to a shear-wave velocity of 1,000 m/sec (𝑍1.0, km).

4.2. Specific Models 13

Page 18: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Return type float

4.2.3 pygmm.akkar_sandikkaya_bommer_2014.AkkarSandikkayaBommer2014

class pygmm.akkar_sandikkaya_bommer_2014.AkkarSandikkayaBommer2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Akkar, Sandikkaya, & Bommer (2014, [ASB14]) model.

The model is specified for three different distance metrics. However, the implementation uses only one distancemetric. They are used in the following order:

1. dist_jb

2. dist_hyp

3. dist_epi

This order was selected based on evaluation of the total standard deviation. To compute the response for differingmetrics, call the model multiple times with different keywords.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.

Continued on next page

14 Chapter 4. Models

Page 19: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 9 – continued from previous pageln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.4 pygmm.atkinson_boore_2006.AtkinsonBoore2006

class pygmm.atkinson_boore_2006.AtkinsonBoore2006(scenario: pygmm.model.Scenario)Bases: pygmm.model.GroundMotionModel

Atkinson and Boore (2006, [AB06]) model.

Developed for the Eastern North America with a reference velocity of 760 or 2000 m/s.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFCOEFF_SFCOEFF_SITEINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALE

Continued on next page

4.2. Specific Models 15

Page 20: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 11 – continued from previous pagePGV_SCALEln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.5 pygmm.boore_stewart_seyhan_atkinson_2014.BooreStewartSeyhanAtkinson2014

class pygmm.boore_stewart_seyhan_atkinson_2014.BooreStewartSeyhanAtkinson2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Boore, Stewart, Seyhan, and Atkinson (2014, [BSSA14]) model.

This model was developed for active tectonic regions as part of the NGA-West2 effort.

The BSSA14 model defines the following distance attenuation models:

Name Descriptionglobal Global; California and Taiwanchina_turkey China and Turkeyitaly_japan Italy and Japan

and the following basin region models:

Name Descriptionglobal Global / Californiajapan Japan

These are simplified into one regional parameter with the following possibilities:

Region Attenuation Basinglobal global globalcalifornia global globalchina china_turkey globalitaly italy_japan globaljapan italy_japan japannew zealand italy_japan globaltaiwan global globalturkey china_turkey global

16 Chapter 4. Models

Page 21: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.6 pygmm.campbell_2003.Campbell2003

class pygmm.campbell_2003.Campbell2003(scenario: pygmm.model.Scenario)Bases: pygmm.model.GroundMotionModel

4.2. Specific Models 17

Page 22: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Campbell (2003, [Cam03]) model.

This model was developed for the Eastern US.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

18 Chapter 4. Models

Page 23: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

4.2.7 pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

class pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Campbell and Bozorgnia (2014, [CB14]) model.

This model was developed for active tectonic regions as part of the NGA-West2 effort.

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario.

Methods

__init__(scenario) Initialize the model.calc_depth_2_5(v_s30, region, depth_1_0) Calculate the depth to a shear-wave velocity of 2.5

km/sec (𝑍2.5).calc_depth_bor(depth_tor, dip, width) Compute the depth to bottom of the rupture (km).calc_depth_hyp(mag, dip, depth_tor,depth_bor)

Estimate the depth to hypocenter.

calc_width(mag, dip, depth_tor, depth_bot) Estimate the fault width using Equation (39) ofCB14.

interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEEF_H_4COEFFCOEFF_CCOEFF_NINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.

Continued on next page

4.2. Specific Models 19

Page 24: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 17 – continued from previous pageln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

static calc_depth_2_5(v_s30: float, region: str = ’global’, depth_1_0: Optional[float] = None)→ float

Calculate the depth to a shear-wave velocity of 2.5 km/sec (𝑍2.5).

Provide either v_s30 or depth_1_0.

Parameters

• v_s30 (Optional[float]) – time-averaged shear-wave velocity over the top 30 m ofthe site (𝑉𝑠30, m/s). Keyword Args:

• region (Optional[str]) – region of the basin model. Valid values: “california”,“japan”. (Default value = ‘global’)

• depth_1_0 (Optional[float]) – depth to the 1.0 kms shear-wave velocity horizonbeneath the site, 𝑍1.0 in (km). (Default value = None)

Returns

• float – estimated depth to a shear-wave velocity of 2.5 km/sec

• float – estimated depth to a shear-wave velocity of 2.5 km/sec (km).

static calc_depth_hyp(mag: float, dip: float, depth_tor: float, depth_bor: float)→ floatEstimate the depth to hypocenter.

Parameters

• mag (float) – moment magnitude of the event (𝑀𝑤)

• dip (float) – fault dip angle (𝜑, deg).

• depth_tor (float) – depth to the top of the rupture plane (𝑍𝑡𝑜𝑟, km).

• depth_bor (float) – depth to the bottom of the rupture plane (𝑍𝑏𝑜𝑟, km).

Returns estimated hypocenter depth (km)

Return type float

static calc_width(mag: float, dip: float, depth_tor: float, depth_bot: float = 15.0)→ floatEstimate the fault width using Equation (39) of CB14.

Parameters

• mag (float) – moment magnitude of the event (𝑀𝑤)

• dip (float) – fault dip angle (𝜑, deg).

• depth_tor (float) – depth to the top of the rupture plane (𝑍𝑡𝑜𝑟, km). Keyword Args:

20 Chapter 4. Models

Page 25: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

• depth_bot (Optional[float]) – depth to bottom of seismogenic crust (km). Usedto calculate fault width if none is specified. If None, then a value of 15 km is used. (Defaultvalue = 15.0)

Returns estimated fault width (km)

Return type float

static calc_depth_bor(depth_tor: float, dip: float, width: float)→ floatCompute the depth to bottom of the rupture (km).

Parameters

• dip (float) – fault dip angle (𝜑, deg).

• depth_tor (float) – depth to the top of the rupture plane (𝑍𝑡𝑜𝑟, km).

• width (float) – Down-dip width of the fault.

Returns depth to bottom of the fault rupture (km)

Return type float

4.2.8 pygmm.chiou_youngs_2014.ChiouYoungs2014

class pygmm.chiou_youngs_2014.ChiouYoungs2014(scenario: pygmm.model.Scenario)Bases: pygmm.model.GroundMotionModel

Chiou and Youngs (2014, [CY14]) model.

This model was developed for active tectonic regions as part of the NGA-West2 effort.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.calc_depth_1_0(v_s30, region) Calculate the depth to 1 km/sec (𝑍1.0).calc_depth_tor(mag, mechanism) Calculate an estimate of the depth to top of rupture

(km).interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSA

Continued on next page

4.2. Specific Models 21

Page 26: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 19 – continued from previous pageLIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

static calc_depth_1_0(v_s30: float, region: str)→ floatCalculate the depth to 1 km/sec (𝑍1.0).

Parameters

• v_s30 (float) – time-averaged shear-wave velocity over the top 30 m of the site (𝑉𝑠30,m/s).

• region (str) – basin region. Valid options: “california”, “japan”

Returns depth_1_0 – estimated depth to a shear-wave velocity of 1 km/sec (km)

Return type float

static calc_depth_tor(mag: float, mechanism: str)→ floatCalculate an estimate of the depth to top of rupture (km).

Parameters

• mag (float) – moment magnitude of the event (𝑀𝑤)

• mechanism (str) – fault mechanism. Valid options: “U”, “SS”, “NS”, “RS”.

Returns depth_tor – estimated depth to top of rupture (km)

Return type float

4.2.9 pygmm.derras_bard_cotton_2014.DerrasBardCotton2014

class pygmm.derras_bard_cotton_2014.DerrasBardCotton2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Derras, Bard and Cotton (2014, [DBC14]) model.

22 Chapter 4. Models

Page 27: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFGRAVITYINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.10 pygmm.hermkes_kuehn_riggelsen_2014.HermkesKuehnRiggelsen2014

class pygmm.hermkes_kuehn_riggelsen_2014.HermkesKuehnRiggelsen2014(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Hermkes, Kuehn, Riggelsen (2014, [HKR14]) model.

4.2. Specific Models 23

Page 28: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Only the GPSELinCorr model is implemented. This model must be imported directly by:

from pygmm.hermkes_kuehn_riggelsen_2014 importHermkesKuehnRiggelsen2014

This is to due to the large file size of the model data, which takes time to load.

Note that this model was developed using a Bayesian non-parametric method, which means it is should only beused over the data range used to develop the model. See the paper for more details.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

24 Chapter 4. Models

Page 29: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

4.2.11 pygmm.idriss_2014.Idriss2014

class pygmm.idriss_2014.Idriss2014(scenario: pygmm.model.Scenario)Bases: pygmm.model.GroundMotionModel

Idriss (2014, [Idr14]) model.

This model was developed for active tectonic regions as part of the NGA-West2 effort.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2. Specific Models 25

Page 30: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

4.2.12 pygmm.pezeshk_zandieh_tavakoli_2011.PezeshkZandiehTavakoli2011

class pygmm.pezeshk_zandieh_tavakoli_2011.PezeshkZandiehTavakoli2011(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Pezeshk, Zandieh, and Tavakoli (2011, [PZT11]) model.

Developed for the Eastern North America with a reference velocity of 2000 m/s.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).pgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenario

Continued on next page

26 Chapter 4. Models

Page 31: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 27 – continued from previous pagespec_accels Pseudo-spectral accelerations computed by the

model (g).

4.2.13 pygmm.tavakoli_pezeshk_2005.TavakoliPezeshk05

class pygmm.tavakoli_pezeshk_2005.TavakoliPezeshk05(scenario:pygmm.model.Scenario)

Bases: pygmm.model.GroundMotionModel

Tavakoli and Pezeshk (2005, [TP05]) model.

Developed for the Eastern North America with a reference velocity of 2880 m/s.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(scenario: pygmm.model.Scenario)Initialize the model.

Methods

__init__(scenario) Initialize the model.interp_ln_stds(periods, numpy.ndarray],kind)

Interpolate the logarithmic standard deviation.

interp_spec_accels(periods,numpy.ndarray], kind)

Interpolate the spectral acceleration.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGDINDEX_PGVINDICES_PSALIMITSNAMEPARAMSPERIODSPGD_SCALEPGV_SCALEV_REFln_std_pga Peak ground accelaration log-standard deviation.ln_std_pgd Peak ground displacement log-standard deviation.ln_std_pgv Peak ground velocity log-standard deviation.ln_stds Pseudo-spectral accelerations log-standard devia-

tion.periods Periods specified by the model.pga Peak ground acceleration (PGA) computed by the

model (g).Continued on next page

4.2. Specific Models 27

Page 32: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

Table 29 – continued from previous pagepgd Peak ground displacement (PGD) computed by the

model (cm).pgv Peak ground velocity (PGV) computed by the model

(cm/sec).scenariospec_accels Pseudo-spectral accelerations computed by the

model (g).

If you are interested in contributing another model to the collection please see Contributing.

4.3 Conditional Spectrum Models

Conditional spectra models are used to create an acceleration response spectrum conditioned on the response at one ormultiple spectral periods. The The calc_cond_mean_spectrum() provides functions for developing conditionalspectra based on one conditioning period, while the calc_cond_mean_spectrum_vector() uses the samecorrelation structure and permits conditioning on multiple periods.

calc_correls Baker and Jayaram (2008, [BJ08]) correlation model.calc_cond_mean_spectrum Conditional mean spectrum by Baker & Jayaram (2008,

[BJ08]).calc_cond_mean_spectrum_vector Kishida (2017, [Kis17]) conditional spectrum.

4.3.1 pygmm.baker_jayaram_2008.calc_correls

pygmm.baker_jayaram_2008.calc_correls(periods: Union[List[float], numpy.ndarray], pe-riod_cond: float)→ numpy.ndarray

Baker and Jayaram (2008, [BJ08]) correlation model.

Parameters

• periods (array_like) – Periods at which the correlation should be computed.

• period_cond (float) – Conditioning period

Returns correls – Correlation coefficients

Return type np.ndarray

4.3.2 pygmm.baker_jayaram_2008.calc_cond_mean_spectrum

pygmm.baker_jayaram_2008.calc_cond_mean_spectrum(periods: Union[List[float],numpy.ndarray], ln_psas:Union[List[float], numpy.ndarray],ln_stds: Union[List[float],numpy.ndarray], period_cond:float, ln_psa_cond: float) ->(<class ’numpy.ndarray’>, <class’numpy.ndarray’>)

Conditional mean spectrum by Baker & Jayaram (2008, [BJ08]).

Parameters

• periods (array_like) – Response spectral periods.

28 Chapter 4. Models

Page 33: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

• ln_psas (array_like) – Natural logarithm of the 5%-damped spectral accelerations.

• ln_stds (array_like) – Logarithmic standard deviations.

• period_cond (float) – Conditioning period. This period does not need to be includedin periods.

• ln_psa_cond (float) – Natural logarithm of the response at the conditioning period.

Returns

• ln_psas_cms (np.ndarray) – Natural logarithm of the conditional mean spectral accel-erations.

• ln_stds_cms (np.ndarray) – Logarithmic standard deviation of the conditional meanspectral acceleration.

4.3.3 pygmm.kishida_2017.calc_cond_mean_spectrum_vector

pygmm.kishida_2017.calc_cond_mean_spectrum_vector(periods: Union[List[float],numpy.ndarray], ln_psas:Union[List[float], numpy.ndarray],ln_stds: Union[List[float],numpy.ndarray], ln_psas_cond:Union[List[float], numpy.ndarray])-> (<class ’numpy.ndarray’>,<class ’numpy.ndarray’>)

Kishida (2017, [Kis17]) conditional spectrum.

Conditional mean spectrum vector (CMSV) by Kishida (2017, [Kis17]) is specifying the target spectral ac-celeration at multiple periods, rather than the single conditioning period by Cornell and Baker (2008). If thisapproach is used for a single period, then the resulting spectrum is the same as computed by Cornell and Baker(2008) – implemented by calc_cond_mean_spectrum().

Parameters

• periods (array_like) – Spectral periods of the response spectrum [sec]. This arraymust be increasing.

• ln_psas (array_like) – Natural logarithm of the spectral acceleration. Same lengthas periods.

• ln_stds (array_like) – Logarithmic standard deviation of the spectral acceleration.Same length as periods.

• ln_psas_cond (np.ma.masked_array) – The vector of conditioning spectral accel-erations. This is a masked array with the same length as periods. Masked values are notused for defining the CMSV.

Returns

• ln_psas_cmsv (np.ndarray) – Natural logarithm of the conditional mean spectral accel-erations.

• ln_stds_cmsv (np.ndarray) – Logarithmic standard deviation of the conditional meanspectral acceleration.

Raises ValueError – If periods are monotonically increasing.

4.3. Conditional Spectrum Models 29

Page 34: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

4.4 Vertical-to-Horizontal (V/H) Models

Vertical-to-horizontal models are used to compute the vertical acceleration response spectrum from a horizontal re-sponse spectrum.

GulerceAbrahamson2011 Gülerce and Abrahamson (2011, [GulerceA11]) V/Hmodel.

4.4.1 pygmm.gulerce_abrahamson_2011.GulerceAbrahamson2011

class pygmm.gulerce_abrahamson_2011.GulerceAbrahamson2011(*args, **kwargs)Bases: pygmm.model.Model

Gülerce and Abrahamson (2011, [GulerceA11]) V/H model.

This model was developed for active tectonic regions.

Parameters scenario (pygmm.model.Scenario) – earthquake scenario

__init__(*args, **kwargs)Initialize the model.

Methods

__init__(*args, **kwargs) Initialize the model.

Attributes

ABBREVCOEFFINDEX_PGAINDEX_PGVINDICES_PSANAMEPARAMSPERIODSV_REFscenario

30 Chapter 4. Models

Page 35: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 5

Contributing

Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.

You can contribute in many ways:

5.1 Types of Contributions

5.1.1 Report Bugs

Report bugs at https://github.com/arkottke/pygmm/issues.

If you are reporting a bug, please include:

• Your operating system name and version.

• Any details about your local setup that might be helpful in troubleshooting.

• Detailed steps to reproduce the bug.

5.1.2 Fix Bugs

Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.

5.1.3 Implement Features

Look through the GitHub issues for features. Anything tagged with “feature” is open to whoever wants to implementit.

31

Page 36: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

5.1.4 Write Documentation

pygmm could always use more documentation, whether as part of the official‘pygmm‘ docs, in docstrings, or even onthe web in blog posts, articles, and such.

5.1.5 Submit Feedback

The best way to send feedback is to file an issue at https://github.com/arkottke/pygmm/issues.

If you are proposing a feature:

• Explain in detail how it would work.

• Keep the scope as narrow as possible, to make it easier to implement.

• Remember that this is a volunteer-driven project, and that contributions are welcome :)

5.2 Get Started!

Ready to contribute? Here’s how to set up pygmm for local development.

1. Fork the pygmm repo on GitHub.

2. Clone your fork locally:

$ git clone [email protected]:your_name_here/pygmm.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set upyour fork for local development:

$ mkvirtualenv pygmm$ cd pygmm/$ python setup.py develop

4. Create a branch for local development:

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you’re done making changes, check that your changes pass flake8 and the tests, including testing otherPython versions with tox:

$ flake8 pygmm tests$ python setup.py test$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub:

$ git add .$ git commit -m "Your detailed description of your changes."$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

32 Chapter 5. Contributing

Page 37: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

5.3 Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.

2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a functionwith a docstring, and add the feature to the list in README.rst.

3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check https://travis-ci.org/arkottke/pygmm/pull_requests and make sure that the tests pass for all supported Python versions.

5.4 Tips

To run a subset of tests:

$ python -m unittest tests.test_pygmm

5.3. Pull Request Guidelines 33

Page 38: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

34 Chapter 5. Contributing

Page 39: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 6

Credits

6.1 Development Lead

• Albert Kottke <[email protected]>

6.2 Contributors

None yet. Why not be the first?

35

Page 40: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

36 Chapter 6. Credits

Page 41: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 7

History

7.1 0.6.0 (2019-08-12)

• Added Abrahamson, Gregor, Addo (2014)

• Added Abrahamson & Gulerce (2011)

• Added conditional mean spectra models.

• Added Scenario objects.

• Added typing for all classes.

7.2 0.4.0 (2016-04-08)

• Added Hermkes et al. (2014).

• Improved documentation.

• Added Baker & Jayaram (2008), Kishida (2017)

7.3 0.3.2 (2016-03-30)

• Nothing changed yet.

7.4 0.3.1 (2016-03-30)

• First release on PyPI.

37

Page 42: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

38 Chapter 7. History

Page 43: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 8

References

39

Page 44: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

40 Chapter 8. References

Page 45: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

CHAPTER 9

Indices and tables

• genindex

• search

41

Page 46: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

42 Chapter 9. Indices and tables

Page 47: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

Bibliography

[ASK14] Norman A Abrahamson, Walter J Silva, and Ronnie Kamai. Summary of the ASK14 ground motionrelation for active crustal regions. Earthquake Spectra, 30(3):1025–1055, 2014.

[ASB14] S Akkar, MA Sandikkaya, and Julian J Bommer. Empirical ground-motion models for point-andextended-source crustal earthquake scenarios in Europe and the Middle East. Bulletin of earthquake en-gineering, 12(1):359–387, 2014. doi:10.1007/10518-013-9461-4.

[AB06] Gail M. Atkinson and David M. Boore. Earthquake ground-motion prediction equations for eastern NorthAmerica. Bulletin of the Seismological Society of America, 96(6):2181–2205, 2006.

[BJ08] Jack W Baker and Nirmal Jayaram. Correlation of spectral acceleration values from nga ground motionmodels. Earthquake Spectra, 24(1):299–317, 2008.

[BSSA14] David M Boore, Jonathan P Stewart, Emel Seyhan, and Gail M Atkinson. NGA-West2 equationsfor predicting pga, pgv, and 5% damped psa for shallow crustal earthquakes. Earthquake Spectra,30(3):1057–1085, 2014.

[Cam03] Kenneth W Campbell. Prediction of strong ground motion using the hybrid empirical method and its usein the development of ground-motion (attenuation) relations in eastern North America. Bulletin of theSeismological Society of America, 93(3):1012–1033, 2003.

[CB14] Kenneth W Campbell and Yousef Bozorgnia. NGA-West2 ground motion model for the average horizon-tal components of pga, pgv, and 5% damped linear acceleration response spectra. Earthquake Spectra,30(3):1087–1115, 2014.

[CY14] Brian S-J Chiou and Robert R Youngs. Update of the chiou and youngs NGA model for the average hor-izontal component of peak ground motion and response spectra. Earthquake Spectra, 30(3):1117–1153,2014.

[DBC14] Boumédiène Derras, Pierre Yves Bard, and Fabrice Cotton. Towards fully data driven ground-motion prediction models for Europe. Bulletin of Earthquake Engineering, 12(1):495–516, 2014.doi:10.1007/s10518-013-9481-0.

[GulerceA11] Zeynep Gülerce and Norman A Abrahamson. Site-specific design spectra for vertical ground motion.Earthquake Spectra, 27(4):1023–1047, 2011.

[HKR14] Marcel Hermkes, Nicolas M Kuehn, and Carsten Riggelsen. Simultaneous quantification of epistemicand aleatory uncertainty in gmpes using gaussian process regression. Bulletin of earthquake engineering,12(1):449–466, 2014.

43

Page 48: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

[Idr14] IM Idriss. An NGA-West2 empirical model for estimating the horizontal spectral values generated byshallow crustal earthquakes. Earthquake Spectra, 30(3):1155–1177, 2014.

[Kis17] Tadahiro Kishida. Conditional mean spectra given a vector of spectral accelerations at multiple periods.Earthquake Spectra, 2017.

[PZT11] Shahram Pezeshk, Arash Zandieh, and Behrooz Tavakoli. Hybrid empirical ground-motion predictionequations for eastern North America using NGA models and updated seismological parameters. Bulletinof the Seismological Society of America, 101(4):1859–1870, 2011.

[SATC97] WJ Silva, Norman Abrahamson, Giulio Toro, and Carl Costantino. Description and validation of thestochastic ground motion model. Submitted to Brookhaven National Laboratory, Associated Universities,Inc. Upton, New York, 1997.

[SRS+14] Paul Spudich, Badie Rowshandel, Shrey K Shahi, Jack W Baker, and Brian S-J Chiou. Comparison ofNGA-West2 directivity models. Earthquake Spectra, 30(3):1199–1221, 2014.

[TP05] Behrooz Tavakoli and Shahram Pezeshk. Empirical-stochastic ground-motion prediction for eastern NorthAmerica. Bulletin of the Seismological Society of America, 95(6):2283–2296, 2005.

44 Bibliography

Page 49: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

Index

Symbols__init__() (pygmm.abrahamson_gregor_addo_2016.AbrahamsonGregorAddo2016

method), 11__init__() (pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014

method), 12__init__() (pygmm.akkar_sandikkaya_bommer_2014.AkkarSandikkayaBommer2014

method), 14__init__() (pygmm.atkinson_boore_2006.AtkinsonBoore2006

method), 15__init__() (pygmm.boore_stewart_seyhan_atkinson_2014.BooreStewartSeyhanAtkinson2014

method), 17__init__() (pygmm.campbell_2003.Campbell2003

method), 18__init__() (pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

method), 19__init__() (pygmm.chiou_youngs_2014.ChiouYoungs2014

method), 21__init__() (pygmm.derras_bard_cotton_2014.DerrasBardCotton2014

method), 23__init__() (pygmm.gulerce_abrahamson_2011.GulerceAbrahamson2011

method), 30__init__() (pygmm.hermkes_kuehn_riggelsen_2014.HermkesKuehnRiggelsen2014

method), 24__init__() (pygmm.idriss_2014.Idriss2014 method),

25__init__() (pygmm.model.Model method), 9__init__() (pygmm.pezeshk_zandieh_tavakoli_2011.PezeshkZandiehTavakoli2011

method), 26__init__() (pygmm.tavakoli_pezeshk_2005.TavakoliPezeshk05

method), 27

AABBREV (pygmm.model.Model attribute), 10AbrahamsonGregorAddo2016 (class in

pygmm.abrahamson_gregor_addo_2016),11

AbrahamsonSilvaKamai2014 (class inpygmm.abrahamson_silva_kamai_2014),12

AkkarSandikkayaBommer2014 (class inpygmm.akkar_sandikkaya_bommer_2014),14

AtkinsonBoore2006 (class inpygmm.atkinson_boore_2006), 15

BBooreStewartSeyhanAtkinson2014 (class in

pygmm.boore_stewart_seyhan_atkinson_2014),16

Ccalc_cond_mean_spectrum() (in module

pygmm.baker_jayaram_2008), 28calc_cond_mean_spectrum_vector() (in mod-

ule pygmm.kishida_2017), 29calc_correls() (in module

pygmm.baker_jayaram_2008), 28calc_depth_1_0() (pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014

static method), 13calc_depth_1_0() (pygmm.chiou_youngs_2014.ChiouYoungs2014

static method), 22calc_depth_2_5() (pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

static method), 20calc_depth_bor() (pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

static method), 21calc_depth_hyp() (pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

static method), 20calc_depth_tor() (pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014

static method), 13calc_depth_tor() (pygmm.chiou_youngs_2014.ChiouYoungs2014

static method), 22calc_width() (pygmm.abrahamson_silva_kamai_2014.AbrahamsonSilvaKamai2014

static method), 13calc_width() (pygmm.campbell_bozorgnia_2014.CampbellBozorgnia2014

static method), 20Campbell2003 (class in pygmm.campbell_2003), 17CampbellBozorgnia2014 (class in

pygmm.campbell_bozorgnia_2014), 19

45

Page 50: pygmm Documentation - Read the Docspygmm Documentation, Release 0.6.0 Table 5 – continued from previous page ln_std_pgv Peak ground velocity log-standard deviation. ln_stds Pseudo-spectral

pygmm Documentation, Release 0.6.0

ChiouYoungs2014 (class inpygmm.chiou_youngs_2014), 21

DDerrasBardCotton2014 (class in

pygmm.derras_bard_cotton_2014), 22

GGulerceAbrahamson2011 (class in

pygmm.gulerce_abrahamson_2011), 30

HHermkesKuehnRiggelsen2014 (class in

pygmm.hermkes_kuehn_riggelsen_2014),23

IIdriss2014 (class in pygmm.idriss_2014), 25

MModel (class in pygmm.model), 9

NNAME (pygmm.model.Model attribute), 10

PPezeshkZandiehTavakoli2011 (class in

pygmm.pezeshk_zandieh_tavakoli_2011),26

TTavakoliPezeshk05 (class in

pygmm.tavakoli_pezeshk_2005), 27

46 Index