org.opensha.sha.earthquake.rupForecastImpl
Class PointToLineSourceERF

java.lang.Object
  extended by org.opensha.sha.earthquake.AbstractERF
      extended by org.opensha.sha.earthquake.rupForecastImpl.PointToLineSourceERF
All Implemented Interfaces:
Serializable, Comparable<BaseERF>, Iterable<ProbEqkSource>, EventListener, Named, XMLSaveable, ParameterChangeListener, TimeSpanChangeListener, BaseERF, ERF

public class PointToLineSourceERF
extends AbstractERF

Title: PointToLineSourceERF This is an ERF wrapper for PointToLineSource. Only one mag-freq dist and focal mechanism is used (the latter being created from adjustable params for rake, strike, and dip). A random strike is applied if strike is null (or blank in the GUI). See PointToLineSource for further description. Tests: I confirmed that averaging a bunch of hazard curves for random strikes equals the curve for a spoked source with numStrikes=45.

Version:
1.0
Author:
Ned Field Date : Feb , 2010
See Also:
Serialized Form

Field Summary
static String DEFAULT_HYPO_DEPTH_PARAM_NAME
           
static String DIP_PARAM_NAME
           
static String FIRST_STRIKE_PARAM_NAME
           
static String LOC_PARAM_NAME
           
static String LOWER_SEIS_DEPTH_PARAM_NAME
           
static String MAG_DIST_PARAM_NAME
           
static String MAG_SCALING_REL_PARAM_NAME
           
static String MIN_MAG_PARAM_NAME
           
static String NAME
           
static String NUM_STRIKE_PARAM_NAME
           
static String RAKE_PARAM_NAME
           
static String RUP_TOP_DEPTH_FUNC_PARAM_NAME
           
static String SPOKED_RUPTURES_PARAM_NAME
           
static String STRIKE_PARAM_NAME
           
 
Fields inherited from class org.opensha.sha.earthquake.AbstractERF
adjustableParams, nthRupIndicesForSource, parameterChangeFlag, rupIndexForNthRup, srcIndexForNthRup, timeSpan, totNumRups, XML_METADATA_NAME
 
Constructor Summary
PointToLineSourceERF()
          Constructor for this source (no arguments)
 
Method Summary
 String getName()
          Return the name for this class
 int getNumSources()
          Returns the number of earthquake sources (always "1" here)
 ProbEqkSource getSource(int iSource)
          Return the earthquake source at index i.
 ArrayList getSourceList()
          This returns a list of sources (contains only one here)
static void main(String[] args)
           
 void parameterChange(ParameterChangeEvent event)
          This acts on a parameter change event.
 void updateForecast()
          update the source based on the parameters
 
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
See Also:
Constant Field Values

LOC_PARAM_NAME

public static final String LOC_PARAM_NAME
See Also:
Constant Field Values

MAG_DIST_PARAM_NAME

public static final String MAG_DIST_PARAM_NAME
See Also:
Constant Field Values

RAKE_PARAM_NAME

public static final String RAKE_PARAM_NAME
See Also:
Constant Field Values

STRIKE_PARAM_NAME

public static final String STRIKE_PARAM_NAME
See Also:
Constant Field Values

DIP_PARAM_NAME

public static final String DIP_PARAM_NAME
See Also:
Constant Field Values

MAG_SCALING_REL_PARAM_NAME

public static final String MAG_SCALING_REL_PARAM_NAME
See Also:
Constant Field Values

RUP_TOP_DEPTH_FUNC_PARAM_NAME

public static final String RUP_TOP_DEPTH_FUNC_PARAM_NAME
See Also:
Constant Field Values

DEFAULT_HYPO_DEPTH_PARAM_NAME

public static final String DEFAULT_HYPO_DEPTH_PARAM_NAME
See Also:
Constant Field Values

LOWER_SEIS_DEPTH_PARAM_NAME

public static final String LOWER_SEIS_DEPTH_PARAM_NAME
See Also:
Constant Field Values

MIN_MAG_PARAM_NAME

public static final String MIN_MAG_PARAM_NAME
See Also:
Constant Field Values

SPOKED_RUPTURES_PARAM_NAME

public static final String SPOKED_RUPTURES_PARAM_NAME
See Also:
Constant Field Values

NUM_STRIKE_PARAM_NAME

public static final String NUM_STRIKE_PARAM_NAME
See Also:
Constant Field Values

FIRST_STRIKE_PARAM_NAME

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

PointToLineSourceERF

public PointToLineSourceERF()
Constructor for this source (no arguments)

Method Detail

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 -

updateForecast

public void updateForecast()
update the source based on the parameters


getSource

public ProbEqkSource getSource(int iSource)
Return the earthquake source at index i. Note that this returns a pointer to the source held internally, so that if any parameters are changed, and this method is called again, the source obtained by any previous call to this method will no longer be valid.

Parameters:
iSource - : index of the desired source (only "0" allowed here).
Returns:
Returns the ProbEqkSource at index i

getNumSources

public int getNumSources()
Returns the number of earthquake sources (always "1" here)

Returns:
integer value specifying the number of earthquake sources

getSourceList

public ArrayList getSourceList()
This returns a list of sources (contains only one here)

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

main

public static void main(String[] args)