org.opensha.sha.imr.param.IntensityMeasureParams
Class SA_Param

java.lang.Object
  extended by org.opensha.commons.param.AbstractParameter<java.lang.Double>
      extended by org.opensha.commons.param.impl.DoubleParameter
          extended by org.opensha.commons.param.impl.WarningDoubleParameter
              extended by org.opensha.sha.imr.param.IntensityMeasureParams.SA_Param
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Parameter<?>>, Named, XMLSaveable, Parameter<java.lang.Double>, WarningParameter<java.lang.Double>

public class SA_Param
extends WarningDoubleParameter

This constitutes is for the natural-log Spectral Acceleration intensity measure parameter. It requires being given a PeriodParam and DampingParam, as these are the parameters that SA depends upon. See constructors for info on editability and default values.

Author:
field
See Also:
Serialized Form

Field Summary
protected static java.lang.Double DEFAULT_WARN_MAX
           
protected static java.lang.Double DEFAULT_WARN_MIN
           
static java.lang.String INFO
           
protected static java.lang.Double MAX
           
protected static java.lang.Double MIN
           
static java.lang.String NAME
           
static java.lang.String UNITS
           
 
Fields inherited from class org.opensha.commons.param.impl.WarningDoubleParameter
C, D, warningConstraint, warningListeners
 
Fields inherited from class org.opensha.commons.param.AbstractParameter
constraint, defaultValue, editable, independentParameters, info, metadataString, name, units, value, XML_COMPLEX_VAL_EL_NAME, XML_GROUP_METADATA_NAME, XML_METADATA_NAME, XML_NULL_VALUE
 
Fields inherited from interface org.opensha.commons.param.Parameter
XML_INDEPENDENT_PARAMS_NAME
 
Fields inherited from interface org.opensha.commons.metadata.XMLSaveable
XML_METADATA_NAME
 
Constructor Summary
SA_Param(PeriodParam periodParam, DampingParam dampingParam)
          This uses the DEFAULT_WARN_MIN and DEFAULT_WARN_MAX fields to set the warning constraint, and sets the default as Math.log(0.5) (the natural log of 0.5).
SA_Param(PeriodParam periodPeram, DampingParam dampingParam, DoubleConstraint warningConstraint, double defaultPGA)
          This uses the supplied warning constraint and default (both in natural-log space).
 
Method Summary
 DampingParam getDampingParam()
          Helper method to quickly get the damping param
static double getPeriodInSA_Param(Parameter<?> param)
           
 PeriodParam getPeriodParam()
          Helper method to quickly get the period param
static void setPeriodInSA_Param(Parameter<?> param, double period)
           
 
Methods inherited from class org.opensha.commons.param.impl.WarningDoubleParameter
addParameterChangeWarningListener, clone, fireParameterChangeWarning, getWarningConstraint, getWarningMax, getWarningMin, isIgnoreWarning, isRecommended, removeParameterChangeWarningListener, setIgnoreWarning, setIndividualParamValueFromXML, setValue, setValueIgnoreWarning, setWarningConstraint
 
Methods inherited from class org.opensha.commons.param.impl.DoubleParameter
getEditor, getMax, getMin, getType, isAllowed, setConstraint, setValue
 
Methods inherited from class org.opensha.commons.param.AbstractParameter
addIndependentParameter, addParameterChangeFailListener, addParameterChangeListener, checkEditable, compareTo, containsIndependentParameter, equals, firePropertyChange, firePropertyChangeFailed, getConstraint, getConstraintName, getDefaultValue, getDependentParamMetadataString, getIndependentParameter, getIndependentParameterList, getIndependentParametersKey, getInfo, getMetadataString, getName, getNumIndependentParameters, getUnits, getValue, isEditable, isNullAllowed, removeIndependentParameter, removeParameterChangeFailListener, removeParameterChangeListener, setDefaultValue, setDependentParamMetadataString, setIndependentParameters, setIndepParamsFromXML, setInfo, setName, setNonEditable, setUnits, setValueAsDefault, setValueFromXMLMetadata, toXMLMetadata, toXMLMetadata, unableToSetValue, valueToXML
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opensha.commons.param.WarningParameter
equals
 
Methods inherited from interface org.opensha.commons.param.Parameter
addIndependentParameter, addParameterChangeFailListener, addParameterChangeListener, containsIndependentParameter, firePropertyChange, firePropertyChangeFailed, getConstraint, getConstraintName, getDefaultValue, getDependentParamMetadataString, getEditor, getIndependentParameter, getIndependentParameterList, getIndependentParametersKey, getInfo, getMetadataString, getNumIndependentParameters, getType, getUnits, getValue, isAllowed, isEditable, isNullAllowed, removeIndependentParameter, removeParameterChangeFailListener, removeParameterChangeListener, setConstraint, setDefaultValue, setIndependentParameters, setInfo, setName, setNonEditable, setUnits, setValueAsDefault, setValueFromXMLMetadata, toXMLMetadata, unableToSetValue
 
Methods inherited from interface org.opensha.commons.data.Named
getName
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.opensha.commons.metadata.XMLSaveable
toXMLMetadata
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

UNITS

public static final java.lang.String UNITS
See Also:
Constant Field Values

INFO

public static final java.lang.String INFO
See Also:
Constant Field Values

MIN

protected static final java.lang.Double MIN

MAX

protected static final java.lang.Double MAX

DEFAULT_WARN_MIN

protected static final java.lang.Double DEFAULT_WARN_MIN

DEFAULT_WARN_MAX

protected static final java.lang.Double DEFAULT_WARN_MAX
Constructor Detail

SA_Param

public SA_Param(PeriodParam periodParam,
                DampingParam dampingParam)
This uses the DEFAULT_WARN_MIN and DEFAULT_WARN_MAX fields to set the warning constraint, and sets the default as Math.log(0.5) (the natural log of 0.5). The parameter is left as non editable


SA_Param

public SA_Param(PeriodParam periodPeram,
                DampingParam dampingParam,
                DoubleConstraint warningConstraint,
                double defaultPGA)
This uses the supplied warning constraint and default (both in natural-log space). The parameter is left as non editable

Parameters:
warningConstraint -
defaultPGA -
Method Detail

getPeriodParam

public PeriodParam getPeriodParam()
Helper method to quickly get the period param

Returns:

getDampingParam

public DampingParam getDampingParam()
Helper method to quickly get the damping param

Returns:

setPeriodInSA_Param

public static void setPeriodInSA_Param(Parameter<?> param,
                                       double period)

getPeriodInSA_Param

public static double getPeriodInSA_Param(Parameter<?> param)