shakelib.virtualipe

class shakelib.virtualipe.VirtualIPE[source]

Bases: openquake.hazardlib.gsim.base.GMPE

Implements a virtual IPE that is the combination of a MultiGMPE and a GMICE. Will first attempt to use PGV for the intensities, and then will try PGA, and then SA(1.0), and then will bail out.

Uncertainty is computed by combining the uncertainty of the GMPE with the uncertainty of the GMICE. Standard error propagation techniques are used (see the ShakeMap manual for a detailed explanation). For the intra- and inter-event components of total uncertainty, we assign all of GMICE uncertaninty to the intra-event term, and none to the inter-event term. This choice is conservative, and seems appropriate until GMICE are produced with separate inter- and intra-event terms.

Note that the combined inter- and intra-event uncertainties will only approximately equal the total uncertainty because the GMPEs will only produce combined uncertainties that are approximately equal to their total uncertainty.

DEFINED_FOR_INTENSITY_MEASURE_TYPES = {<class 'openquake.hazardlib.imt.MMI'>}

The OpenQuake IMT this module can produce (‘MMI’ only).

DEFINED_FOR_STANDARD_DEVIATION_TYPES = None

The OpenQuake standard deviation types that may be produced (will depend on the GMPE provided).

REQUIRES_DISTANCES = None

Distance measures required (will depend on the GMPE provided).

DEFINED_FOR_INTENSITY_MEASURE_COMPONENT = None

OpenQuake IMC used (will depend on the GMPE, but “Larger” is typical).

DEFINED_FOR_TECTONIC_REGION_TYPE = None

Determined by the GMPE selected.

REQUIRES_RUPTURE_PARAMETERS = None

Determined by the GMPE selected.

REQUIRES_SITES_PARAMETERS = None

Determined by the GMPE selected.

classmethod fromFuncs(gmpe, gmice)[source]

Creates a new VirtualIPE object with the specified MultiGMPE and GMICE. There is no default constructor, you must use this method.

Parameters:
  • gmpe – An instance of the MultiGMPE object.
  • gmice – An instance of a GMICE object.
Returns:

A new instance of a VirtualIPE object.

Return type:

VirtualIPE

get_mean_and_stddevs(sx, rx, dx, imt, stddev_types, fd=None)[source]

See superclass method for parameter definitions. The only acceptable IMT is MMI.

Additional subclass argument is “fd”, which is the directivity amplification factor in natural log units. This is optional, and must be a numpy array with the same dimentions as the sites and is added to the ground motions before conversion to MMI.

Returns:mmi (ndarray): Ground motions predicted by the MultiGMPE using the supplied parameters are converted to MMI using the GMICE.

mmi_sd (list of ndarrays): The uncertainty of the combined prediction/conversion process. The prediction uncertainty will typically be either OpenQuake’s TOTAL or INTRA_EVENT. But can be any set that the MultiGMPE supports. See the ShakeMap manual for a detailed discussion of the way the uncertainty is computed.

Return type:ndarray, list of ndarray