GMPE Tables

class openquake.hazardlib.gsim.gsim_table.AmplificationTable(amplification_group, magnitudes, distances)[source]

Class to apply amplification from the GMPE tables.

Attr shape:Shape of the amplification arrays as a tuple of (Number Distances, Number IMTs, Number Magnitudes, Number Amplification Levels)
Attr periods:Spectral periods defined in table
Attr mean:Amplification factors for the mean ground motion
Attr sigma:List of modification factors for the standard deviation of ground motion
Attr magnitudes:
 Magnitude values for the tables
Attr distances:Distance values for the tables
Attr parameter:Parameter to which the amplification applies. Must be an element inside the __slots__ defines in the :class: openquake.hazardlib. gsim.base.RuptureContext or the :class: openquake.hazardlib.gsim.base. SitesContext
Attr values:Array of values to which each amplification table corresponds
Attr element:Indicates if the amplification corresponds to a rupture attribute or a site attribute
get_amplification_factors(imt, sctx, rctx, dists, stddev_types)[source]

Returns the amplification factors for the given rupture and site conditions.

Parameters:
  • imt – Intensity measure type as an instance of the :class: openquake.hazardlib.imt
  • sctx – Site parameters as instance of the :class: openquake.hazardlib.gsim.base.SitesContext
  • rctx – Rupture parameters as instance of the :class: openquake.hazardlib.gsim.base.RuptureContext
  • dists – Source to site distances (km)
  • stddev_types – List of required standard deviation types
Returns:

  • mean_amp - Amplification factors applied to the median ground

    motion

  • sigma_amps - List of modification factors applied to the

    standard deviations of ground motion

get_mean_table(imt, rctx)[source]

Returns amplification factors for the mean, given the rupture and intensity measure type.

Returns:amplification table as an array of [Number Distances, Number Levels]
get_set()[source]

Return the parameter as an instance a Python set

get_sigma_tables(imt, rctx, stddev_types)[source]

Returns modification factors for the standard deviations, given the rupture and intensity measure type.

Returns:List of standard deviation modification tables, each as an array of [Number Distances, Number Levels]
class openquake.hazardlib.gsim.gsim_table.GMPETable(gmpe_table=None)[source]

Implements ground motion prediction equations in the form of a table from which the expected ground motion intensity levels and standard deviations are interpolated.

In a GMPE tables the expected ground motions for each of the IMTs over the range of magnitudes and distances are stored in an hdf5 file on the path specified by the user.

In this version of the GMPE the expected values are interpolated to the required IMT, magnitude and distance in three stages.

  1. Initially the correct IMT values are identified, interpolating in log-T|log-IML space between neighbouring spectral periods.
  2. The IML values are then interpolated to the correct magnitude using linear-M|log-IML space
  3. The IML values are then interpolated to the correct distance via linear-D|linear-IML interpolation
apply_magnitude_interpolation(mag, iml_table)[source]

Interpolates the tables to the required magnitude level

Parameters:
  • mag (float) – Magnitude
  • iml_table – Intensity measure level table
get_mean_and_stddevs(sctx, rctx, dctx, imt, stddev_types)[source]

Returns the mean and standard deviations