shakelib.multigmpe¶
- shakelib.multigmpe.set_sites_depth_parameters(sites, gmpe)[source]¶
Need to select the appropriate z1pt0 value for different GMPEs. Note that these are required site parameters, so even though OQ has these equations built into the class in most cases. I have submitted an issue to OQ requesting subclasses of these methods that do not require the depth parameters in the SitesContext to make this easier.
- Parameters:
sites – 1 An OQ sites context.
gmpe – An OQ GMPE instance.
- Returns:
An OQ sites context with the depth parameters set for the requested GMPE.
- shakelib.multigmpe.stuff_context(sites, rup, dists)[source]¶
Function to fill a rupture context with the contents of all of the other contexts.
- Parameters:
sites (SiteCollection) – A SiteCollection object.
rup (RuptureContext) – A RuptureContext object.
dists (DistanceContext) – A DistanceContext object.
- Returns:
A new RuptureContext whose attributes are all of the elements of the three inputs.
- Return type:
RuptureContext
- class shakelib.multigmpe.MultiGMPE(**kwargs)[source]¶
Bases:
GMPE
Implements a GMPE that is the combination of multiple GMPEs.
- DEFINED_FOR_TECTONIC_REGION_TYPE = None¶
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 = None¶
Set of
intensity measure types
this GSIM can calculate. A set should contain classes from moduleopenquake.hazardlib.imt
.
- DEFINED_FOR_INTENSITY_MEASURE_COMPONENT = None¶
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({'Total'})¶
Set of
standard deviation types
this GSIM can calculate.
- REQUIRES_SITES_PARAMETERS = None¶
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 = None¶
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 = None¶
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]¶
See superclass method.
Unlike the superclass method, the stddev list returned by this function will have twice as many arrays as are requested in stddev_types: The first set will include the standard deviation inflation due to the point-source to finite fault conversion (if any), and the second set will not include this inflation. In the case where a finite rupture is provided (and, thus, no point-source to finite rupture adjustments are made) the two sets of stddev arrays will be identical. Thus, if:
stddev_types = [const.StdDev.TOTAL, const.StdDev.INTRA_EVENT, const.StdDev.INTER_EVENT]
the returned stddev list will contain six arrays: the first three will include the point-source inflation, and the second three will not.
- shakelib.multigmpe.filter_gmpe_list(gmpes, wts, imt)[source]¶
Method to remove GMPEs from the GMPE list that are not applicable to a specific IMT. Rescales the weights to sum to one.
- shakelib.multigmpe.get_gmpe_sa_periods(gmpe)[source]¶
Method to extract the SA periods defined by a GMPE.
- Parameters:
gmpe (GMPE) – A GMPE instance.
- Retunrs:
list: List of periods.
- shakelib.multigmpe.get_gmpe_coef_table(gmpe)[source]¶
Method for finding the (or “a”) GMPE table.
Notes
The reason for the complexity here is that there can be multiple coefficient tables, and some of them may not have the sa_coeffs attribute, which is the main reason for getting the table.
We are also assuming that if there are more than one coefficient table, the range of periods will be the same across all of the tables.
- Parameters:
gmpe (GMPE) – An OQ GMPE instance.
- Returns:
The associated coefficient table.