org.opensha.gem.GEM1.scratch.marco.testParsers
Class GEM1ERF

java.lang.Object
  extended by org.opensha.sha.earthquake.AbstractERF
      extended by org.opensha.gem.GEM1.scratch.marco.testParsers.GEM1ERF
All Implemented Interfaces:
Serializable, Comparable<BaseERF>, Iterable<ProbEqkSource>, EventListener, Named, XMLSaveable, ParameterChangeListener, TimeSpanChangeListener, BaseERF, ERF

public class GEM1ERF
extends AbstractERF

Title: GEM1ERF

Version:
1.0
Author:
:
See Also:
Serialized Form

Field Summary
static double AREA_DISCR_PARAM_MAX
           
static double AREA_DISCR_PARAM_MIN
           
static String AREA_DISCR_PARAM_NAME
           
static String AREA_SRC_RUP_CROSS_HAIR
           
static String AREA_SRC_RUP_FINITE_SURF
           
static String AREA_SRC_RUP_LINE
           
static String AREA_SRC_RUP_NAME
           
static String AREA_SRC_RUP_POINT
           
static String AREA_SRC_RUP_POINT_OLD
           
static String AREA_SRC_RUP_SPOKED
           
static String ASPECT_RATIO_PARAM_NAME
           
static String BACK_SEIS_EXCLUDE
           
static String BACK_SEIS_INCLUDE
           
static String BACK_SEIS_NAME
           
static String BACK_SEIS_ONLY
           
static String BACK_SEIS_RUP_CROSS_HAIR
           
static String BACK_SEIS_RUP_FINITE_SURF
           
static String BACK_SEIS_RUP_LINE
           
static String BACK_SEIS_RUP_NAME
           
static String BACK_SEIS_RUP_POINT
           
static String BACK_SEIS_RUP_SPOKED
           
static double FAULT_DISCR_PARAM_MAX
           
static double FAULT_DISCR_PARAM_MIN
           
static String FAULT_DISCR_PARAM_NAME
           
static String FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP
           
static String FLOATER_TYPE_CENTERED_DOWNDIP
           
static String FLOATER_TYPE_FULL_DDW
           
static String FLOATER_TYPE_PARAM_DEFAULT
           
static String FLOATER_TYPE_PARAM_INFO
           
static String FLOATER_TYPE_PARAM_NAME
           
protected  ArrayList<GEMSourceData> gemSourceDataList
           
static Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_DEFAULT
           
static Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MAX
           
static Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MIN
           
static String LOWER_SEIS_DEPTH_AREA_SRC_PARAM_NAME
           
static String LOWER_SEIS_DEPTH_AREA_SRC_PARAM_UNITS
           
static Double LOWER_SEIS_DEPTH_BACKGR_PARAM_DEFAULT
           
static Double LOWER_SEIS_DEPTH_BACKGR_PARAM_MAX
           
static Double LOWER_SEIS_DEPTH_BACKGR_PARAM_MIN
           
static String LOWER_SEIS_DEPTH_BACKGR_PARAM_NAME
           
static String LOWER_SEIS_DEPTH_BACKGR_PARAM_UNITS
           
static String MAG_SCALING_REL_AREA_SRC_PARAM_NAME
           
static String MAG_SCALING_REL_BACKGR_PARAM_NAME
           
static String MAG_SCALING_REL_PARAM_NAME
           
static String NAME
           
static double RUP_OFFSET_PARAM_MAX
           
static double RUP_OFFSET_PARAM_MIN
           
static String RUP_OFFSET_PARAM_NAME
           
static String SIGMA_PARAM_NAME
           
static String SUB_ASPECT_RATIO_PARAM_NAME
           
static double SUB_FAULT_DISCR_PARAM_MAX
           
static double SUB_FAULT_DISCR_PARAM_MIN
           
static String SUB_FAULT_DISCR_PARAM_NAME
           
static String SUB_FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP
           
static String SUB_FLOATER_TYPE_CENTERED_DOWNDIP
           
static String SUB_FLOATER_TYPE_FULL_DDW
           
static String SUB_FLOATER_TYPE_PARAM_DEFAULT
           
static String SUB_FLOATER_TYPE_PARAM_INFO
           
static String SUB_FLOATER_TYPE_PARAM_NAME
           
static String SUB_MAG_SCALING_REL_PARAM_NAME
           
static double SUB_RUP_OFFSET_PARAM_MAX
           
static double SUB_RUP_OFFSET_PARAM_MIN
           
static String SUB_RUP_OFFSET_PARAM_NAME
           
static String SUB_SIGMA_PARAM_NAME
           
 
Fields inherited from class org.opensha.sha.earthquake.AbstractERF
adjustableParams, nthRupIndicesForSource, parameterChangeFlag, rupIndexForNthRup, srcIndexForNthRup, timeSpan, totNumRups, XML_METADATA_NAME
 
Constructor Summary
GEM1ERF()
          No argument constructor
GEM1ERF(ArrayList<GEMSourceData> gemSourceDataList)
          This takes a gemSourceDataList
GEM1ERF(ArrayList<GEMSourceData> gemSourceDataList, CalculationSettings calcSet)
          This takes a gemSourceDataList and a CalculationSettings object
 
Method Summary
 String getName()
          Return the name for this class
 int getNumSources()
          Get the number of earthquake sources
 ArrayList<ProbEqkRupture> getRupturesMag(int sourceId, double mMin, double mMax)
          This method provides a list of ruptures for source sourceId with a magnitude comprised between a lower and an upper threshold
 ProbEqkSource getSource(int iSource)
          Returns the ith earthquake source
 ArrayList getSourceList()
          Get the list of all earthquake sources.
static void main(String[] args)
           
protected  ProbEqkSource mkAreaSource(GEMAreaSourceData areaSourceData)
           
protected  ProbEqkSource mkFaultSource(GEMFaultSourceData gemFaultSourceData)
           
protected  ProbEqkSource mkGridSource(GEMPointSourceData gridSourceData)
           
protected  ProbEqkSource mkSubductionSource(GEMSubductionFaultSourceData gemSubductFaultSourceData)
           
 void parameterChange(ParameterChangeEvent event)
          This acts on a parameter change event.
 void updateForecast()
          update the forecast
 
Methods inherited from class org.opensha.sha.earthquake.AbstractERF
baseERF_FromXML, baseERF_ToXML, compareTo, drawRandomEventSet, fromXMLMetadata, getAdjustableParameterList, getApplicableRegion, getIncludedTectonicRegionTypes, getNumRuptures, getParameter, getRupture, getRuptureClone, getSourceClone, getTimeSpan, iterator, setParameter, setParameter, setParameterChangeFlag, setTimeSpan, timeSpanChange, toXMLMetadata, updateAndSaveForecast
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME

gemSourceDataList

protected ArrayList<GEMSourceData> gemSourceDataList

AREA_SRC_RUP_NAME

public static final String AREA_SRC_RUP_NAME

AREA_SRC_RUP_POINT

public static final String AREA_SRC_RUP_POINT

AREA_SRC_RUP_LINE

public static final String AREA_SRC_RUP_LINE

AREA_SRC_RUP_CROSS_HAIR

public static final String AREA_SRC_RUP_CROSS_HAIR

AREA_SRC_RUP_SPOKED

public static final String AREA_SRC_RUP_SPOKED

AREA_SRC_RUP_FINITE_SURF

public static final String AREA_SRC_RUP_FINITE_SURF

AREA_SRC_RUP_POINT_OLD

public static final String AREA_SRC_RUP_POINT_OLD

LOWER_SEIS_DEPTH_AREA_SRC_PARAM_NAME

public static final String LOWER_SEIS_DEPTH_AREA_SRC_PARAM_NAME
See Also:
Constant Field Values

LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MIN

public static final Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MIN

LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MAX

public static final Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_MAX

LOWER_SEIS_DEPTH_AREA_SRC_PARAM_DEFAULT

public static final Double LOWER_SEIS_DEPTH_AREA_SRC_PARAM_DEFAULT

LOWER_SEIS_DEPTH_AREA_SRC_PARAM_UNITS

public static final String LOWER_SEIS_DEPTH_AREA_SRC_PARAM_UNITS
See Also:
Constant Field Values

AREA_DISCR_PARAM_NAME

public static final String AREA_DISCR_PARAM_NAME
See Also:
Constant Field Values

AREA_DISCR_PARAM_MIN

public static final double AREA_DISCR_PARAM_MIN

AREA_DISCR_PARAM_MAX

public static final double AREA_DISCR_PARAM_MAX

MAG_SCALING_REL_AREA_SRC_PARAM_NAME

public static final String MAG_SCALING_REL_AREA_SRC_PARAM_NAME
See Also:
Constant Field Values

BACK_SEIS_NAME

public static final String BACK_SEIS_NAME

BACK_SEIS_INCLUDE

public static final String BACK_SEIS_INCLUDE

BACK_SEIS_EXCLUDE

public static final String BACK_SEIS_EXCLUDE

BACK_SEIS_ONLY

public static final String BACK_SEIS_ONLY

BACK_SEIS_RUP_NAME

public static final String BACK_SEIS_RUP_NAME

BACK_SEIS_RUP_POINT

public static final String BACK_SEIS_RUP_POINT

BACK_SEIS_RUP_LINE

public static final String BACK_SEIS_RUP_LINE

BACK_SEIS_RUP_CROSS_HAIR

public static final String BACK_SEIS_RUP_CROSS_HAIR

BACK_SEIS_RUP_SPOKED

public static final String BACK_SEIS_RUP_SPOKED

BACK_SEIS_RUP_FINITE_SURF

public static final String BACK_SEIS_RUP_FINITE_SURF

LOWER_SEIS_DEPTH_BACKGR_PARAM_NAME

public static final String LOWER_SEIS_DEPTH_BACKGR_PARAM_NAME
See Also:
Constant Field Values

LOWER_SEIS_DEPTH_BACKGR_PARAM_MIN

public static final Double LOWER_SEIS_DEPTH_BACKGR_PARAM_MIN

LOWER_SEIS_DEPTH_BACKGR_PARAM_MAX

public static final Double LOWER_SEIS_DEPTH_BACKGR_PARAM_MAX

LOWER_SEIS_DEPTH_BACKGR_PARAM_DEFAULT

public static final Double LOWER_SEIS_DEPTH_BACKGR_PARAM_DEFAULT

LOWER_SEIS_DEPTH_BACKGR_PARAM_UNITS

public static final String LOWER_SEIS_DEPTH_BACKGR_PARAM_UNITS
See Also:
Constant Field Values

MAG_SCALING_REL_BACKGR_PARAM_NAME

public static final String MAG_SCALING_REL_BACKGR_PARAM_NAME
See Also:
Constant Field Values

RUP_OFFSET_PARAM_NAME

public static final String RUP_OFFSET_PARAM_NAME
See Also:
Constant Field Values

RUP_OFFSET_PARAM_MIN

public static final double RUP_OFFSET_PARAM_MIN
See Also:
Constant Field Values

RUP_OFFSET_PARAM_MAX

public static final double RUP_OFFSET_PARAM_MAX
See Also:
Constant Field Values

FAULT_DISCR_PARAM_NAME

public static final String FAULT_DISCR_PARAM_NAME
See Also:
Constant Field Values

FAULT_DISCR_PARAM_MIN

public static final double FAULT_DISCR_PARAM_MIN
See Also:
Constant Field Values

FAULT_DISCR_PARAM_MAX

public static final double FAULT_DISCR_PARAM_MAX
See Also:
Constant Field Values

MAG_SCALING_REL_PARAM_NAME

public static final String MAG_SCALING_REL_PARAM_NAME
See Also:
Constant Field Values

SIGMA_PARAM_NAME

public static final String SIGMA_PARAM_NAME
See Also:
Constant Field Values

ASPECT_RATIO_PARAM_NAME

public static final String ASPECT_RATIO_PARAM_NAME
See Also:
Constant Field Values

FLOATER_TYPE_PARAM_NAME

public static final String FLOATER_TYPE_PARAM_NAME
See Also:
Constant Field Values

FLOATER_TYPE_PARAM_INFO

public static final String FLOATER_TYPE_PARAM_INFO
See Also:
Constant Field Values

FLOATER_TYPE_FULL_DDW

public static final String FLOATER_TYPE_FULL_DDW
See Also:
Constant Field Values

FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP

public static final String FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP
See Also:
Constant Field Values

FLOATER_TYPE_CENTERED_DOWNDIP

public static final String FLOATER_TYPE_CENTERED_DOWNDIP
See Also:
Constant Field Values

FLOATER_TYPE_PARAM_DEFAULT

public static final String FLOATER_TYPE_PARAM_DEFAULT
See Also:
Constant Field Values

SUB_RUP_OFFSET_PARAM_NAME

public static final String SUB_RUP_OFFSET_PARAM_NAME
See Also:
Constant Field Values

SUB_RUP_OFFSET_PARAM_MIN

public static final double SUB_RUP_OFFSET_PARAM_MIN
See Also:
Constant Field Values

SUB_RUP_OFFSET_PARAM_MAX

public static final double SUB_RUP_OFFSET_PARAM_MAX
See Also:
Constant Field Values

SUB_FAULT_DISCR_PARAM_NAME

public static final String SUB_FAULT_DISCR_PARAM_NAME
See Also:
Constant Field Values

SUB_FAULT_DISCR_PARAM_MIN

public static final double SUB_FAULT_DISCR_PARAM_MIN
See Also:
Constant Field Values

SUB_FAULT_DISCR_PARAM_MAX

public static final double SUB_FAULT_DISCR_PARAM_MAX
See Also:
Constant Field Values

SUB_MAG_SCALING_REL_PARAM_NAME

public static final String SUB_MAG_SCALING_REL_PARAM_NAME
See Also:
Constant Field Values

SUB_SIGMA_PARAM_NAME

public static final String SUB_SIGMA_PARAM_NAME
See Also:
Constant Field Values

SUB_ASPECT_RATIO_PARAM_NAME

public static final String SUB_ASPECT_RATIO_PARAM_NAME
See Also:
Constant Field Values

SUB_FLOATER_TYPE_PARAM_NAME

public static final String SUB_FLOATER_TYPE_PARAM_NAME
See Also:
Constant Field Values

SUB_FLOATER_TYPE_PARAM_INFO

public static final String SUB_FLOATER_TYPE_PARAM_INFO
See Also:
Constant Field Values

SUB_FLOATER_TYPE_FULL_DDW

public static final String SUB_FLOATER_TYPE_FULL_DDW
See Also:
Constant Field Values

SUB_FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP

public static final String SUB_FLOATER_TYPE_ALONG_STRIKE_AND_DOWNDIP
See Also:
Constant Field Values

SUB_FLOATER_TYPE_CENTERED_DOWNDIP

public static final String SUB_FLOATER_TYPE_CENTERED_DOWNDIP
See Also:
Constant Field Values

SUB_FLOATER_TYPE_PARAM_DEFAULT

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

GEM1ERF

public GEM1ERF()
No argument constructor


GEM1ERF

public GEM1ERF(ArrayList<GEMSourceData> gemSourceDataList)
This takes a gemSourceDataList


GEM1ERF

public GEM1ERF(ArrayList<GEMSourceData> gemSourceDataList,
               CalculationSettings calcSet)
This takes a gemSourceDataList and a CalculationSettings object

Method Detail

mkFaultSource

protected ProbEqkSource mkFaultSource(GEMFaultSourceData gemFaultSourceData)

mkSubductionSource

protected ProbEqkSource mkSubductionSource(GEMSubductionFaultSourceData gemSubductFaultSourceData)

mkAreaSource

protected ProbEqkSource mkAreaSource(GEMAreaSourceData areaSourceData)
Parameters:
areaSourceData -
Returns:
ProbEqkSource

mkGridSource

protected ProbEqkSource mkGridSource(GEMPointSourceData gridSourceData)
Parameters:
gridSourceData -
Returns:
ProbEqkSource

getSource

public ProbEqkSource getSource(int iSource)
Returns the ith earthquake source

Parameters:
iSource - : index of the source needed
Returns:
the source at idx

getNumSources

public int getNumSources()
Get the number of earthquake sources

Returns:
integer

getSourceList

public ArrayList getSourceList()
Get the list of all earthquake sources.

Specified by:
getSourceList in interface ERF
Overrides:
getSourceList in class AbstractERF
Returns:
ArrayList of Prob Earthquake sources

getName

public String getName()
Return the name for this class

Returns:
: return the name for this class

updateForecast

public void updateForecast()
update the forecast


parameterChange

public void parameterChange(ParameterChangeEvent event)
This acts on a parameter change event. This sets the flag to indicate that the sources need to be updated

Specified by:
parameterChange in interface ParameterChangeListener
Overrides:
parameterChange in class AbstractERF
Parameters:
event -

main

public static void main(String[] args)

getRupturesMag

public ArrayList<ProbEqkRupture> getRupturesMag(int sourceId,
                                                double mMin,
                                                double mMax)
This method provides a list of ruptures for source sourceId with a magnitude comprised between a lower and an upper threshold

Parameters:
sourceId - Index of the source
mMin - Minimum value of magnitude
Returns:
rupList List of ruptures with magnitude in a given interval