org.opensha.sha.imr.attenRelImpl
Class NSHMP_2008_CA

java.lang.Object
  extended by org.opensha.sha.imr.AbstractIMR
      extended by org.opensha.sha.imr.AttenuationRelationship
          extended by org.opensha.sha.imr.attenRelImpl.NSHMP_2008_CA
All Implemented Interfaces:
Serializable, Comparable<IntensityMeasureRelationship>, EventListener, Named, ShortNamed, XMLSaveable, ParameterChangeListener, IntensityMeasureRelationship, ScalarIMR

public class NSHMP_2008_CA
extends AttenuationRelationship
implements ParameterChangeListener

This is an implementation of the combined attenuation relationships used in California for the 2008 National Seismic Hazard Mapping Program (NSHMP). The three next generation attenuation relationships (NGAs) used are:

Please take note of the following implementation details: Additional Epistemic Uncertainty
Additional epistemic uncertainty is considered for each NGA according to the following distance and magnitude matrix:
             M<6      6%le;M<7      7≤M
          =============================
   D<10     0.375  |  0.210  |  0.245
 10≤D<30    0.230  |  0.225  |  0.230
   30≤D     0.400  |  0.360  |  0.310
          =============================
 
For an earthquake rupture at a given distance and magnitude, the corresponding uncertainty is applied to a particular NGA with the following weights:
     hazard curve           weight
 ======================================
      mean + unc            0.185
      mean                  0.630
      mean - unc            0.185
 ======================================
 

Version:
$Id:$
Author:
Peter Powers
See Also:
Serialized Form

Field Summary
static String IMR_UNCERT_PARAM_NAME
           
static String NAME
           
static String SHORT_NAME
           
 
Fields inherited from class org.opensha.sha.imr.AttenuationRelationship
aftershockParam, C, cavParam, componentParam, D, depthTo1pt0kmPerSecParam, depthTo2pt5kmPerSecParam, dipParam, distanceJBParam, distanceRupParam, distanceSeisParam, distRupMinusDistX_OverRupParam, distRupMinusJB_OverRupParam, ds575Param, ds595Param, ERR, exceedProbIndependentParams, fltTypeParam, focalDepthParam, hangingWallFlagParam, imlAtExceedProbIndependentParams, magParam, meanIndependentParams, pgaParam, pgdParam, pgvParam, rakeParam, rupTopDepthParam, rupWidthParam, saDampingParam, saParam, saPeriodParam, sigmaTruncLevelParam, sigmaTruncTypeParam, stdDevIndependentParams, stdDevTypeParam, tectonicRegionTypeParam, USER_MAX_DISTANCE, VERY_SMALL_MEAN, vs30_TypeParam, vs30Param
 
Fields inherited from class org.opensha.sha.imr.AbstractIMR
eqkRupture, eqkRuptureParams, EXCEED_PROB_DEFAULT, EXCEED_PROB_INFO, EXCEED_PROB_MAX, EXCEED_PROB_MIN, EXCEED_PROB_NAME, exceedProbParam, im, intensityMeasureChanged, listener, otherParams, propagationEffectParams, site, siteParams, supportedIMParams, url_info_string, XML_METADATA_IMT_NAME, XML_METADATA_NAME, XML_METADATA_SITE_PARAMETERS_NAME
 
Fields inherited from interface org.opensha.commons.metadata.XMLSaveable
XML_METADATA_NAME
 
Constructor Summary
NSHMP_2008_CA(ParameterChangeWarningListener listener)
           
 
Method Summary
 double getEpsilon()
          This returns (iml-mean)/stdDev, ignoring any truncation.
 double getEpsilon(double iml)
          This returns (iml-mean)/stdDev, ignoring any truncation.
 DiscretizedFunc getExceedProbabilities(DiscretizedFunc imls)
          This fills in the exceedance probability for multiple intensityMeasure levels (often called a "hazard curve"); the levels are obtained from the X values of the input function, and Y values are filled in with the asociated exceedance probabilities.
 double getExceedProbability()
          This calculates the probability that the intensity-measure level (the value in the Intensity-Measure Parameter) will be exceeded given the mean and stdDev computed from current independent parameter values.
 double getExceedProbability(double iml)
          This calculates the probability that the supplied intensity-measure level will be exceeded given the mean and stdDev computed from current independent parameter values.
protected  double getExceedProbability(double mean, double stdDev, double iml)
          This method computed the probability of exceeding the IM-level given the mean and stdDev, and considering the sigma truncation type and level.
 double getIML_AtExceedProb()
          This calculates the intensity-measure level associated with probability held by the exceedProbParam given the mean and standard deviation (according to the chosen truncation type and level).
 double getIML_AtExceedProb(double exceedProb)
          This calculates the intensity-measure level associated with given probability and the calculated mean and standard deviation (and according to the chosen truncation type and level).
 double getMean()
          This returns the mean intensity-measure level for the current set of parameters.
 String getName()
          Returns name of the IntensityMeasureRelationship.
 DiscretizedFunc getSA_ExceedProbSpectrum(double iml)
          This calculates the exceed-probability at each SA Period for the supplied intensity-measure level (a hazard spectrum).
 DiscretizedFunc getSA_IML_AtExceedProbSpectrum(double exceedProb)
          This calculates the intensity-measure level for each SA Period associated with the given probability.
 String getShortName()
          Returns a Short Name for the IMR
 double getStdDev()
          This returns the standard deviation (stdDev) of the intensity-measure level for the current set of parameters.
 double getTotExceedProbability(PointEqkSource ptSrc, double iml)
          This method will compute the total probability of exceedance for a PointEqkSource (including the probability of each rupture).
protected  void initEqkRuptureParams()
          Creates the EqkRupture-related parameters, which are all associated parameters that the exceedance probability depends upon.
protected  void initOtherParams()
          This creates the otherParams list.
protected  void initParameterEventListeners()
          Adds the Listeners to the parameters so that Attenuation can listen to any kind of changes to parameter values.
protected  void initPropagationEffectParams()
          Creates Propagation-Effect related parameters, which are all associated parameters that the exceedance probability depends upon.
protected  void initSiteParams()
          This creates Site-related parameters, which are all associated parameters that the exceedance probability depends upon.
protected  void initSupportedIntensityMeasureParams()
          This creates the supported intensity-measure parameters.
static void main(String[] args)
           
 void parameterChange(ParameterChangeEvent e)
          Function that must be implemented by all Listeners for ParameterChangeEvents.
 void setEqkRupture(EqkRupture eqkRupture)
          Sets the EqkRupture object in the IMR as a reference to the one passed in.
 void setIntensityMeasure(String intensityMeasureName)
          This sets the intensityMeasure parameter as that which has the name passed in; no value (level) is set, nor are any of the IM's independent parameters set (since it's only given the name).
 void setIntensityMeasureLevel(Double iml)
          Sets the value of the selected intensityMeasure;
 void setIntensityMeasureLevel(Object iml)
          Sets the value of the currently selected intensityMeasure (if the value is allowed); this will reject anything that is not a Double.
 void setParamDefaults()
          This sets the defaults for all the parameters.
 void setPropagationEffect()
           
protected  void setPropagationEffectParams()
          Calculates the value of each propagation effect parameter from the current Site and ProbEqkRupture objects.
 void setSite(Site site)
          Sets the Site object as a reference to that passed in.
 
Methods inherited from class org.opensha.sha.imr.AttenuationRelationship
getAllParamMetadata, getExceedProbIndependentParams, getExceedProbIndependentParamsIterator, getIML_AtExceedProbIndependentParams, getIML_AtExceedProbIndependentParamsIterator, getMeanIndependentParams, getMeanIndependentParamsIterator, getStdDevIndependentParams, getStdDevIndependentParamsIterator, isTectonicRegionSupported, isTectonicRegionSupported, resetParameterEventListeners, setSiteLocation, setUserMaxDistance
 
Methods inherited from class org.opensha.sha.imr.AbstractIMR
compareTo, fromXMLMetadata, getEqkRupture, getEqkRuptureParams, getEqkRuptureParamsIterator, getInfoURL, getIntensityMeasure, getIntensityMeasureLevel, getOtherParams, getOtherParamsIterator, getParameter, getPropagationEffectParams, getPropagationEffectParamsIterator, getSite, getSiteParams, getSiteParamsIterator, getSupportedIntensityMeasures, getSupportedIntensityMeasuresIterator, isIntensityMeasureSupported, isIntensityMeasureSupported, setAll, setExceedProb, setIntensityMeasure, setWarningListener, toXMLMetadata
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensha.sha.imr.IntensityMeasureRelationship
getEqkRupture, getEqkRuptureParams, getEqkRuptureParamsIterator, getInfoURL, getIntensityMeasure, getIntensityMeasureLevel, getOtherParams, getOtherParamsIterator, getParameter, getPropagationEffectParams, getPropagationEffectParamsIterator, getSite, getSiteParams, getSiteParamsIterator, getSupportedIntensityMeasures, getSupportedIntensityMeasuresIterator, isIntensityMeasureSupported, isIntensityMeasureSupported, setAll, setExceedProb, setIntensityMeasure, toXMLMetadata
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values

SHORT_NAME

public static final String SHORT_NAME
See Also:
Constant Field Values

IMR_UNCERT_PARAM_NAME

public static final String IMR_UNCERT_PARAM_NAME
See Also:
Constant Field Values
Constructor Detail

NSHMP_2008_CA

public NSHMP_2008_CA(ParameterChangeWarningListener listener)
Method Detail

setParamDefaults

public void setParamDefaults()
Description copied from interface: IntensityMeasureRelationship
This sets the defaults for all the parameters.

Specified by:
setParamDefaults in interface IntensityMeasureRelationship

getShortName

public String getShortName()
Description copied from interface: IntensityMeasureRelationship
Returns a Short Name for the IMR

Specified by:
getShortName in interface ShortNamed
Specified by:
getShortName in interface IntensityMeasureRelationship
Returns:
String

getName

public String getName()
Description copied from class: AbstractIMR
Returns name of the IntensityMeasureRelationship.

Specified by:
getName in interface Named
Specified by:
getName in interface IntensityMeasureRelationship
Overrides:
getName in class AbstractIMR
Returns:
The name string

setPropagationEffectParams

protected void setPropagationEffectParams()
Description copied from class: AttenuationRelationship
Calculates the value of each propagation effect parameter from the current Site and ProbEqkRupture objects.

Specified by:
setPropagationEffectParams in class AttenuationRelationship

initSupportedIntensityMeasureParams

protected void initSupportedIntensityMeasureParams()
Description copied from class: AttenuationRelationship
This creates the supported intensity-measure parameters. All implementation is in the subclass (it's defined here as a reminder/suggestions).

Specified by:
initSupportedIntensityMeasureParams in class AttenuationRelationship

initSiteParams

protected void initSiteParams()
Description copied from class: AttenuationRelationship
This creates Site-related parameters, which are all associated parameters that the exceedance probability depends upon. All implementation is in the subclass (it's defined here as a reminder/suggestions).

Specified by:
initSiteParams in class AttenuationRelationship

initOtherParams

protected void initOtherParams()
Description copied from class: AttenuationRelationship
This creates the otherParams list. These are any parameters that the exceedance probability depends upon that is not a supported IMT (or one of their independent parameters) and is not contained in, or computed from, the site or eqkRutpure objects. Note that this does not include the exceedProbParam (which exceedance probability does not depend on). sigmaTruncTypeParam and sigmaTruncLevelParam are instantiated here and added to the otherParams list (others should be implemented as desired in subclasses). The tectonicRegionTypeParam is also instantiated here with default options (TYPE_ACTIVE_SHALLOW); this should be overridden in subclass if other options are desired (and you'll need use the replaceParameter method to change the one in the otherParams list).

Overrides:
initOtherParams in class AttenuationRelationship

initEqkRuptureParams

protected void initEqkRuptureParams()
Description copied from class: AttenuationRelationship
Creates the EqkRupture-related parameters, which are all associated parameters that the exceedance probability depends upon. All implementation is in the subclass (it's defined here as a reminder/suggestions).

Specified by:
initEqkRuptureParams in class AttenuationRelationship

initPropagationEffectParams

protected void initPropagationEffectParams()
Description copied from class: AttenuationRelationship
Creates Propagation-Effect related parameters, which are all associated parameters that the exceedance probability depends upon. All implementation is in the subclass (it's defined here as a reminder/suggestions).

Specified by:
initPropagationEffectParams in class AttenuationRelationship

initParameterEventListeners

protected void initParameterEventListeners()
Description copied from class: AttenuationRelationship
Adds the Listeners to the parameters so that Attenuation can listen to any kind of changes to parameter values.

Overrides:
initParameterEventListeners in class AttenuationRelationship

setSite

public void setSite(Site site)
Description copied from class: AbstractIMR
Sets the Site object as a reference to that passed in.

Specified by:
setSite in interface IntensityMeasureRelationship
Overrides:
setSite in class AbstractIMR
Parameters:
site - The new site object

setEqkRupture

public void setEqkRupture(EqkRupture eqkRupture)
Description copied from class: AbstractIMR
Sets the EqkRupture object in the IMR as a reference to the one passed in.

Specified by:
setEqkRupture in interface IntensityMeasureRelationship
Overrides:
setEqkRupture in class AbstractIMR
Parameters:
eqkRupture - The new EqkRupture object

setPropagationEffect

public void setPropagationEffect()

getMean

public double getMean()
Description copied from interface: ScalarIMR
This returns the mean intensity-measure level for the current set of parameters.

Specified by:
getMean in interface ScalarIMR
Returns:
The mean value

getStdDev

public double getStdDev()
Description copied from interface: ScalarIMR
This returns the standard deviation (stdDev) of the intensity-measure level for the current set of parameters.

Specified by:
getStdDev in interface ScalarIMR
Returns:
The stdDev value

getEpsilon

public double getEpsilon()
Description copied from class: AttenuationRelationship
This returns (iml-mean)/stdDev, ignoring any truncation. This gets the iml from the value in the Intensity-Measure Parameter.

Specified by:
getEpsilon in interface ScalarIMR
Overrides:
getEpsilon in class AttenuationRelationship
Returns:
double

getEpsilon

public double getEpsilon(double iml)
Description copied from class: AttenuationRelationship
This returns (iml-mean)/stdDev, ignoring any truncation.

Specified by:
getEpsilon in interface ScalarIMR
Overrides:
getEpsilon in class AttenuationRelationship
Parameters:
iml - double
Returns:
double

getExceedProbabilities

public DiscretizedFunc getExceedProbabilities(DiscretizedFunc imls)
                                       throws ParameterException
Description copied from class: AttenuationRelationship
This fills in the exceedance probability for multiple intensityMeasure levels (often called a "hazard curve"); the levels are obtained from the X values of the input function, and Y values are filled in with the asociated exceedance probabilities.

Specified by:
getExceedProbabilities in interface ScalarIMR
Overrides:
getExceedProbabilities in class AttenuationRelationship
Parameters:
imls - The function to be filled in
Returns:
The function filled in
Throws:
ParameterException - Description of the Exception

getExceedProbability

public double getExceedProbability()
                            throws ParameterException,
                                   IMRException
Description copied from class: AttenuationRelationship
This calculates the probability that the intensity-measure level (the value in the Intensity-Measure Parameter) will be exceeded given the mean and stdDev computed from current independent parameter values. Note that the answer is not stored in the internally held exceedProbParam (this latter param is used only for the getIML_AtExceedProb() method).

Specified by:
getExceedProbability in interface IntensityMeasureRelationship
Overrides:
getExceedProbability in class AttenuationRelationship
Returns:
The exceedProbability value
Throws:
ParameterException - Description of the Exception
IMRException - Description of the Exception

getExceedProbability

protected double getExceedProbability(double mean,
                                      double stdDev,
                                      double iml)
                               throws ParameterException,
                                      IMRException
Description copied from class: AttenuationRelationship
This method computed the probability of exceeding the IM-level given the mean and stdDev, and considering the sigma truncation type and level.

Overrides:
getExceedProbability in class AttenuationRelationship
Returns:
Throws:
ParameterException
IMRException

getExceedProbability

public double getExceedProbability(double iml)
                            throws ParameterException,
                                   IMRException
Description copied from class: AttenuationRelationship
This calculates the probability that the supplied intensity-measure level will be exceeded given the mean and stdDev computed from current independent parameter values. Note that the answer is not stored in the internally held exceedProbParam (this latter param is used only for the getIML_AtExceedProb() method).

Specified by:
getExceedProbability in interface ScalarIMR
Overrides:
getExceedProbability in class AttenuationRelationship
Returns:
The exceedProbability value
Throws:
ParameterException - Description of the Exception
IMRException - Description of the Exception

getIML_AtExceedProb

public double getIML_AtExceedProb()
                           throws ParameterException
Description copied from class: AttenuationRelationship
This calculates the intensity-measure level associated with probability held by the exceedProbParam given the mean and standard deviation (according to the chosen truncation type and level). Note that this does not store the answer in the value of the internally held intensity-measure parameter.

Specified by:
getIML_AtExceedProb in interface ScalarIMR
Overrides:
getIML_AtExceedProb in class AttenuationRelationship
Returns:
The intensity-measure level
Throws:
ParameterException - Description of the Exception

getIML_AtExceedProb

public double getIML_AtExceedProb(double exceedProb)
                           throws ParameterException
Description copied from class: AttenuationRelationship
This calculates the intensity-measure level associated with given probability and the calculated mean and standard deviation (and according to the chosen truncation type and level). Note that this does not store the answer in the value of the internally held intensity-measure parameter.

Specified by:
getIML_AtExceedProb in interface ScalarIMR
Overrides:
getIML_AtExceedProb in class AttenuationRelationship
Parameters:
exceedProb - : Sets the Value of the exceed Prob param with this value.
Returns:
The intensity-measure level
Throws:
ParameterException - Description of the Exception

getSA_ExceedProbSpectrum

public DiscretizedFunc getSA_ExceedProbSpectrum(double iml)
                                         throws ParameterException,
                                                IMRException
Description copied from class: AttenuationRelationship
This calculates the exceed-probability at each SA Period for the supplied intensity-measure level (a hazard spectrum). The x values in the returned function correspond to the periods supported by the IMR.

Specified by:
getSA_ExceedProbSpectrum in interface ScalarIMR
Overrides:
getSA_ExceedProbSpectrum in class AttenuationRelationship
Returns:
DiscretizedFuncAPI - The hazard spectrum
Throws:
ParameterException
IMRException

getSA_IML_AtExceedProbSpectrum

public DiscretizedFunc getSA_IML_AtExceedProbSpectrum(double exceedProb)
                                               throws ParameterException,
                                                      IMRException
Description copied from class: AttenuationRelationship
This calculates the intensity-measure level for each SA Period associated with the given probability. The x values in the returned function correspond to the periods supported by the IMR.

Specified by:
getSA_IML_AtExceedProbSpectrum in interface ScalarIMR
Overrides:
getSA_IML_AtExceedProbSpectrum in class AttenuationRelationship
Returns:
DiscretizedFuncAPI - the IML function
Throws:
ParameterException
IMRException

getTotExceedProbability

public double getTotExceedProbability(PointEqkSource ptSrc,
                                      double iml)
Description copied from class: AttenuationRelationship
This method will compute the total probability of exceedance for a PointEqkSource (including the probability of each rupture). It is assumed that this source is Poissonian (not checked). This saves time by computing distance only once for all ruptures in this source. This could be extended to include the point-source distance correction as well (a boolean in the constructor?), although this would have to check for each distance type.

Overrides:
getTotExceedProbability in class AttenuationRelationship
Returns:

setIntensityMeasureLevel

public void setIntensityMeasureLevel(Double iml)
                              throws ParameterException
Description copied from class: AttenuationRelationship
Sets the value of the selected intensityMeasure;

Specified by:
setIntensityMeasureLevel in interface ScalarIMR
Overrides:
setIntensityMeasureLevel in class AttenuationRelationship
Parameters:
iml - The new intensityMeasureLevel value
Throws:
ParameterException - Description of the Exception

setIntensityMeasureLevel

public void setIntensityMeasureLevel(Object iml)
                              throws ParameterException
Description copied from class: AttenuationRelationship
Sets the value of the currently selected intensityMeasure (if the value is allowed); this will reject anything that is not a Double.

Specified by:
setIntensityMeasureLevel in interface IntensityMeasureRelationship
Overrides:
setIntensityMeasureLevel in class AttenuationRelationship
Parameters:
iml - The new intensityMeasureLevel value
Throws:
ParameterException - Description of the Exception

setIntensityMeasure

public void setIntensityMeasure(String intensityMeasureName)
                         throws ParameterException
Description copied from class: AbstractIMR
This sets the intensityMeasure parameter as that which has the name passed in; no value (level) is set, nor are any of the IM's independent parameters set (since it's only given the name).

Specified by:
setIntensityMeasure in interface IntensityMeasureRelationship
Overrides:
setIntensityMeasure in class AbstractIMR
Throws:
ParameterException

parameterChange

public void parameterChange(ParameterChangeEvent e)
Description copied from interface: ParameterChangeListener
Function that must be implemented by all Listeners for ParameterChangeEvents.

Specified by:
parameterChange in interface ParameterChangeListener
Parameters:
e - The Event which triggered this function call

main

public static void main(String[] args)