shakelib.gmpe.nullgmpe¶
A GMPE that returns a constant everywhere. Useful for testing, but nothing else.
- class shakelib.gmpe.nullgmpe.NullGMPE(mean=0, phi=0.8, tau=0.6)[source]¶
Bases:
GMPE
This is a GMPE for testing. It returns the mean and stddevs specified in the constructor.
The default constructor takes three named arguments:
- Parameters:
mean (float) – the mean value returned by the GMPE (default=0). This value is returned for all locations, regardles of the IMT or the contents of sites, rupture and distance contexts.
phi (float) – the within-event standard deviation returned by the GMPE (default=0.8)
tau (float) – the between-event standard deviation returned by the GMPE (default=0.6)
The total standard deviation returned will be
sqrt(phi^2 + tau^2)
.- DEFINED_FOR_TECTONIC_REGION_TYPE = 'Active Shallow Crust'¶
Reference to a
tectonic region type
this GSIM is defined for. One GSIM can implement only one tectonic region type.
- DEFINED_FOR_INTENSITY_MEASURE_TYPES = frozenset({<function SA>, <function PGA>, <function PGV>})¶
Set of
intensity measure types
this GSIM can calculate. A set should contain classes from moduleopenquake.hazardlib.imt
.
- DEFINED_FOR_INTENSITY_MEASURE_COMPONENT = 'Greater of two horizontal'¶
intensity measure component type <openquake.hazardlib.const.IMC> this GSIM can calculate mean and standard deviation for.
- Type:
Reference to a
- Type:
class
- DEFINED_FOR_STANDARD_DEVIATION_TYPES = frozenset({'Inter event', 'Intra event', 'Total'})¶
Set of
standard deviation types
this GSIM can calculate.
- REQUIRES_SITES_PARAMETERS = frozenset({'vs30'})¶
Set of site parameters names this GSIM needs. The set should include strings that match names of the attributes of a
site
object. Those attributes are then available in theSitesContext
object with the same names.
- REQUIRES_RUPTURE_PARAMETERS = frozenset({})¶
Set of rupture parameters (excluding distance information) required by GSIM. Supported parameters are:
mag
Magnitude of the rupture.
dip
Rupture’s surface dip angle in decimal degrees.
rake
Angle describing the slip propagation on the rupture surface, in decimal degrees. See
nodalplane
for more detailed description of dip and rake.ztor
Depth of rupture’s top edge in km. See
get_top_edge_depth()
.
These parameters are available from the
RuptureContext
object attributes with same names.
- REQUIRES_DISTANCES = frozenset({'rjb'})¶
Set of types of distance measures between rupture and sites. Possible values are:
rrup
Closest distance to rupture surface. See
get_min_distance()
.rjb
Distance to rupture’s surface projection. See
get_joyner_boore_distance()
.rx
Perpendicular distance to rupture top edge projection. See
get_rx_distance()
.ry0
Horizontal distance off the end of the rupture measured parallel to strike. See
get_ry0_distance()
.rcdpp
Direct point parameter for directivity effect centered on the site- and earthquake-specific average DPP used. See
get_dppvalue()
.rvolc
Source to site distance passing through surface projection of volcanic zone.
All the distances are available from the
DistancesContext
object attributes with same names. Values are in kilometers.
- get_mean_and_stddevs(sites, rup, dists, imt, stddev_types)[source]¶
Implements the OpenQuake GroundShakingIntensityModel get_mean_and_stddevs interface. See superclass method.
Returns a constant values for all locations specified in the dists.rbj array, regardless of the contents of that array or any of the other contexts. The imt is also ignored.
- COEFFS = <CoeffsTable c1>¶