org.opensha.sha.gcim.imCorrRel
Class ImCorrelationRelationship

java.lang.Object
  extended by org.opensha.sha.gcim.imCorrRel.ImCorrelationRelationship
All Implemented Interfaces:
Named
Direct Known Subclasses:
Baker07_ImCorrRel, BakerJayaram08_ImCorrRel, Bradley11_ImCorrRel, GodaAtkinson09_ImCorrRel

public abstract class ImCorrelationRelationship
extends java.lang.Object
implements Named

Title:ImCorrelationRelationship
Description: This is an abstract class that gives the Pearson correlation coefficient between (the natural logarithm of) two different intensity measures

Version:
1.0 1 April 2010
Author:
Brendon Bradley

Field Summary
protected  ASI_Param asiParam
           
protected  CAV_Param cavParam
           
protected  Ds575_Param ds575Param
           
protected  Ds595_Param ds595Param
           
protected  DSI_Param dsiParam
           
protected  IA_Param iaParam
           
protected  Parameter imi
          Intensity Measurei.
protected  Parameter imj
          Intensity Measurej.
protected  boolean intensityMeasureiChanged
           
protected  boolean intensityMeasurejChanged
           
protected  PeriodInterpolatedParam InterpPeriodiParam
           
protected  PeriodInterpolatedParam InterpPeriodjParam
           
protected  ParameterList otherParams
          ParameterList of other parameters.
protected  PGA_Param pgaParam
          The supported IM parameters for which correlation equations can be developed
protected  PGD_Param pgdParam
           
protected  PGV_Param pgvParam
           
protected  DampingParam saiDampingParam
           
protected  SA_InterpolatedParam saiInterpParam
           
protected  SA_Param saiParam
           
protected  DampingParam sajDampingParam
           
protected  SA_InterpolatedParam sajInterpParam
           
protected  SA_Param sajParam
           
protected  PeriodParam saPeriodiParam
           
protected  PeriodParam saPeriodjParam
           
protected  SI_Param siParam
           
protected  java.util.ArrayList<Parameter<?>> supportedIMiParams
          This creates the supported intensity-measure i ParameterList.
protected  java.util.ArrayList<Parameter<?>> supportedIMjParams
          This creates the supported intensity-measure j ParameterList.
protected  ParameterList supportedImParams
           
protected  TectonicRegionTypeParam tectonicRegionTypeParam
           
protected  double ti
          The spectral period for IMi and IMj (when either are SA).
protected  double tj
           
 
Constructor Summary
ImCorrelationRelationship()
           
 
Method Summary
abstract  double getImCorrelation()
          Computes the correlation between two intensity measures (neither of which are spectral acceleration)
 double getImCorrelation(double ti)
          Computes the correlation between two intensity measures (one of which is spectral acceleration)
 double getImCorrelation(double ti, double tj)
          Computes the correlation between two intensity measures (both of which are spectral acceleration)
 Parameter getIntensityMeasurei()
          Gets a reference to the currently chosen Intensity-Measure i Parameters from the IMCorrRel.
 Parameter getIntensityMeasurej()
          Gets a reference to the currently chosen Intensity-Measure j Parameters from the IMCorrRel.
abstract  java.lang.String getName()
          Returns the name of the object
 java.util.ListIterator<Parameter<?>> getOtherParamsIterator()
          Returns an iterator over all other parameters.
 ParameterList getOtherParamsList()
           
 Parameter getParameter(java.lang.String name)
          Returns a pointer to a parameter if it exists in one of the parameter lists
abstract  java.lang.String getShortName()
          Returns the short name of the object
 java.util.ArrayList<Parameter<?>> getSupportedIntensityMeasuresiList()
          Returns a list of all supported Intensity-Measure i Parameters.
 java.util.ArrayList<Parameter<?>> getSupportedIntensityMeasuresjList()
          Returns a list of all supported Intensity-Measure j Parameters.
protected  void initOtherParams()
          This creates the otherParams list.
 boolean isIntensityMeasureiSupported(java.lang.String intensityMeasureiName)
          Checks if the Parameter is a supported intensity-Measure i (checking only the name).
 boolean isIntensityMeasurejSupported(java.lang.String intensityMeasurejName)
          Checks if the Parameter is a supported intensity-Measure j (checking only the name).
 boolean isTectonicRegionSupported(java.lang.String tectRegionName)
          Tells whether the given tectonic region is supported
 boolean isTectonicRegionSupported(TectonicRegionType tectRegion)
          Tells whether the given tectonic region is supported
 void setIntensityMeasurei(java.lang.String intensityMeasureiName)
          This sets the intensityMeasure i parameter as that of the name passed in ; no value (level) is set, nor are any of the IMi's independent parameters set (since it's only given the name).
 void setIntensityMeasurej(java.lang.String intensityMeasurejName)
          This sets the intensityMeasure j parameter as that of the name passed in ; no value (level) is set, nor are any of the IMj's independent parameters set (since it's only given the name).
 void setTi(double ti)
           
 void setTj(double tj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pgaParam

protected PGA_Param pgaParam
The supported IM parameters for which correlation equations can be developed


pgvParam

protected PGV_Param pgvParam

pgdParam

protected PGD_Param pgdParam

saiParam

protected SA_Param saiParam

saPeriodiParam

protected PeriodParam saPeriodiParam

sajParam

protected SA_Param sajParam

saPeriodjParam

protected PeriodParam saPeriodjParam

saiInterpParam

protected SA_InterpolatedParam saiInterpParam

InterpPeriodiParam

protected PeriodInterpolatedParam InterpPeriodiParam

sajInterpParam

protected SA_InterpolatedParam sajInterpParam

InterpPeriodjParam

protected PeriodInterpolatedParam InterpPeriodjParam

saiDampingParam

protected DampingParam saiDampingParam

sajDampingParam

protected DampingParam sajDampingParam

iaParam

protected IA_Param iaParam

siParam

protected SI_Param siParam

asiParam

protected ASI_Param asiParam

dsiParam

protected DSI_Param dsiParam

cavParam

protected CAV_Param cavParam

ds575Param

protected Ds575_Param ds575Param

ds595Param

protected Ds595_Param ds595Param

supportedImParams

protected ParameterList supportedImParams

tectonicRegionTypeParam

protected TectonicRegionTypeParam tectonicRegionTypeParam

ti

protected double ti
The spectral period for IMi and IMj (when either are SA). The default is Double.NaN


tj

protected double tj

imi

protected Parameter imi
Intensity Measurei. This is a specification of the type of shaking one is concerned about. Its representation as a Parameter makes the specification quite general and flexible. IMRs compute the probability of exceeding the "value" field of this im Parameter.


imj

protected Parameter imj
Intensity Measurej. This is a specification of the type of shaking one is concerned about. Its representation as a Parameter makes the specification quite general and flexible. IMRs compute the probability of exceeding the "value" field of this im Parameter.


intensityMeasureiChanged

protected boolean intensityMeasureiChanged

intensityMeasurejChanged

protected boolean intensityMeasurejChanged

supportedIMiParams

protected java.util.ArrayList<Parameter<?>> supportedIMiParams
This creates the supported intensity-measure i ParameterList.


supportedIMjParams

protected java.util.ArrayList<Parameter<?>> supportedIMjParams
This creates the supported intensity-measure j ParameterList.


otherParams

protected ParameterList otherParams
ParameterList of other parameters.

Constructor Detail

ImCorrelationRelationship

public ImCorrelationRelationship()
Method Detail

getImCorrelation

public abstract double getImCorrelation()
Computes the correlation between two intensity measures (neither of which are spectral acceleration)

Returns:
intensity measure correlation between imi and imj

getImCorrelation

public double getImCorrelation(double ti)
Computes the correlation between two intensity measures (one of which is spectral acceleration)

Returns:
intensity measure correlation between Sa at T=Ti and imj

getImCorrelation

public double getImCorrelation(double ti,
                               double tj)
Computes the correlation between two intensity measures (both of which are spectral acceleration)

Returns:
intensity measure correlation between Sa at T=Ti and imj

setTi

public void setTi(double ti)

setTj

public void setTj(double tj)

getParameter

public Parameter getParameter(java.lang.String name)
                       throws ParameterException
Returns a pointer to a parameter if it exists in one of the parameter lists

Parameters:
name - Parameter key for lookup
Returns:
The found parameter
Throws:
ParameterException - If parameter with that name doesn't exist

getIntensityMeasurei

public Parameter getIntensityMeasurei()
Gets a reference to the currently chosen Intensity-Measure i Parameters from the IMCorrRel.

Returns:
The intensityMeasure Parameter

getIntensityMeasurej

public Parameter getIntensityMeasurej()
Gets a reference to the currently chosen Intensity-Measure j Parameters from the IMCorrRel.

Returns:
The intensityMeasure Parameter

getSupportedIntensityMeasuresiList

public java.util.ArrayList<Parameter<?>> getSupportedIntensityMeasuresiList()
Returns a list of all supported Intensity-Measure i Parameters.

Returns:
The Supported Intensity-Measures i Iterator

getSupportedIntensityMeasuresjList

public java.util.ArrayList<Parameter<?>> getSupportedIntensityMeasuresjList()
Returns a list of all supported Intensity-Measure j Parameters.

Returns:
The Supported Intensity-Measures j Iterator

setIntensityMeasurei

public void setIntensityMeasurei(java.lang.String intensityMeasureiName)
                          throws java.lang.RuntimeException
This sets the intensityMeasure i parameter as that of the name passed in ; no value (level) is set, nor are any of the IMi's independent parameters set (since it's only given the name).

Parameters:
intensityMeasureiName - The new intensityMeasureiParameter name
Throws:
java.lang.RuntimeException

setIntensityMeasurej

public void setIntensityMeasurej(java.lang.String intensityMeasurejName)
                          throws java.lang.RuntimeException
This sets the intensityMeasure j parameter as that of the name passed in ; no value (level) is set, nor are any of the IMj's independent parameters set (since it's only given the name).

Parameters:
intensityMeasurejName - The new intensityMeasurejParameter name
Throws:
java.lang.RuntimeException

isIntensityMeasureiSupported

public boolean isIntensityMeasureiSupported(java.lang.String intensityMeasureiName)
Checks if the Parameter is a supported intensity-Measure i (checking only the name).

Parameters:
intensityMeasurei - Name of the intensity Measure I parameter
Returns:

isIntensityMeasurejSupported

public boolean isIntensityMeasurejSupported(java.lang.String intensityMeasurejName)
Checks if the Parameter is a supported intensity-Measure j (checking only the name).

Parameters:
intensityMeasurej - Name of the intensity Measure j parameter
Returns:

getOtherParamsIterator

public java.util.ListIterator<Parameter<?>> getOtherParamsIterator()
Returns an iterator over all other parameters. Other parameters are those that the exceedance probability depends upon, but that are not a supported IMT (or one of their independent parameters) and are 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).

Returns:
Iterator for otherParameters

getOtherParamsList

public ParameterList getOtherParamsList()

initOtherParams

protected void initOtherParams()
This creates the otherParams list. The tectonicRegionTypeParam is 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).


isTectonicRegionSupported

public boolean isTectonicRegionSupported(java.lang.String tectRegionName)
Tells whether the given tectonic region is supported

Parameters:
tectRegionName -
Returns:

isTectonicRegionSupported

public boolean isTectonicRegionSupported(TectonicRegionType tectRegion)
Tells whether the given tectonic region is supported

Parameters:
tectRegion -
Returns:

getName

public abstract java.lang.String getName()
Returns the name of the object

Specified by:
getName in interface Named

getShortName

public abstract java.lang.String getShortName()
Returns the short name of the object