org.opensha.sha.earthquake.rupForecastImpl
Class PointEqkSource

java.lang.Object
  extended by org.opensha.sha.earthquake.ProbEqkSource
      extended by org.opensha.sha.earthquake.rupForecastImpl.PointEqkSource
All Implemented Interfaces:
Serializable, Iterable<ProbEqkRupture>, Named, EqkSource

public class PointEqkSource
extends ProbEqkSource
implements Serializable

Title: PointEqkSource

Description: This makes a point source based on the inputs of the various constructors:

If an IncrementalMagFreqDist (or HypoMagFreqDistAtLoc) and duration have been given, then the source is Poissonian and it is assumed that the duration units are the same as those for the rates in the IncrementalMagFreqDist. Also, magnitudes below the minimum are ignored, as are those with zero rates. If magnitude/probability have been given, the source has only one rupture and is not Poissonian.

Version:
1.0
Author:
Edward Field
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.opensha.sha.earthquake.ProbEqkSource
isPoissonian, name
 
Constructor Summary
PointEqkSource(HypoMagFreqDistAtLoc hypoMagFreqDistAtLoc, ArbitrarilyDiscretizedFunc aveRupTopVersusMag, double defaultHypoDepth, double duration, double minMag)
          This constructor takes a HypoMagFreqDistAtLoc object, depth as a function of mag (aveRupTopVersusMag), and a default depth (defaultHypoDepth).
PointEqkSource(Location loc, double magnitude, double probability, double aveRake, double aveDip)
          Constructor specifying the location, a magnitude and probability, the average rake, and the dip.
PointEqkSource(Location loc, IncrementalMagFreqDist magFreqDist, double duration, double aveRake, double aveDip)
          Constructor specifying the location, the IncrementalMagFreqDist, the duration, the average rake, and the dip.
PointEqkSource(Location loc, IncrementalMagFreqDist magFreqDist, double duration, double aveRake, double aveDip, double minMag)
          Constructor specifying the Location, the IncrementalMagFreqDist, the duration, the average rake, the dip, and the minimum magnitude to consider from the magFreqDist in making the source (those below are ingored).
 
Method Summary
 LocationList getAllSourceLocs()
          It returns a list of all the locations which make up the surface for this source.
 double getDuration()
          This gets the duration used in computing Poisson probabilities (it may be NaN if the source is not Poissonian).
 Location getLocation()
          This gets the location
 double getMinDistance(Site site)
          This returns the shortest horizontal dist to the point source.
 double getMinMag()
          This gets the minimum magnitude to be considered from the mag-freq dist (those below are ignored in making the source).
 String getName()
          get the name of this class
 int getNumRuptures()
          Get the number of ruptures for this source
 ProbEqkRupture getRupture(int nthRupture)
          This makes and returns the nth probEqkRupture for this source.
 RuptureSurface getSourceSurface()
          This gives the entire surface of the source
 void setDuration(double duration)
          This sets the duration used in computing Poisson probabilities.
 void setLocation(Location loc)
          This sets the location
 
Methods inherited from class org.opensha.sha.earthquake.ProbEqkSource
computeApproxTotalProbAbove, computeEquivTotalMomentRate, computeTotalEquivMeanAnnualRate, computeTotalProb, computeTotalProbAbove, computeTotalProbAbove, drawRandomEqkRuptureIndices, drawRandomEqkRuptures, drawSingleRandomEqkRuptureIndex, drawSingleRandomEqkRuptureIndex, getInfo, getRuptureClone, getRuptureList, getRupturesIterator, getSourceMetadata, getTectonicRegionType, isPoissonianSource, isSourcePoissonian, iterator, setInfo, setTectonicRegionType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PointEqkSource

public PointEqkSource(Location loc,
                      IncrementalMagFreqDist magFreqDist,
                      double duration,
                      double aveRake,
                      double aveDip,
                      double minMag)
Constructor specifying the Location, the IncrementalMagFreqDist, the duration, the average rake, the dip, and the minimum magnitude to consider from the magFreqDist in making the source (those below are ingored). The source is set as Poissonian with this constructor.


PointEqkSource

public PointEqkSource(Location loc,
                      IncrementalMagFreqDist magFreqDist,
                      double duration,
                      double aveRake,
                      double aveDip)
Constructor specifying the location, the IncrementalMagFreqDist, the duration, the average rake, and the dip. This sets minMag to zero (magnitudes from magFreqDist below are ignored in making the source). The source is set as Poissonian with this constructor.


PointEqkSource

public PointEqkSource(HypoMagFreqDistAtLoc hypoMagFreqDistAtLoc,
                      ArbitrarilyDiscretizedFunc aveRupTopVersusMag,
                      double defaultHypoDepth,
                      double duration,
                      double minMag)
This constructor takes a HypoMagFreqDistAtLoc object, depth as a function of mag (aveRupTopVersusMag), and a default depth (defaultHypoDepth). The depth of each point source is set according to the mag using the aveRupTopVersusMag function; if mag is below the minimum x value of this function, then defaultHypoDepth is applied. Note that the depth value in HypoMagFreqDistAtLoc.getLocation() is ignored here (that location is cloned here and the depth is overwritten). This sets the source as Poissonian


PointEqkSource

public PointEqkSource(Location loc,
                      double magnitude,
                      double probability,
                      double aveRake,
                      double aveDip)
Constructor specifying the location, a magnitude and probability, the average rake, and the dip. The source is set as Poissonian with this constructor.

Method Detail

getAllSourceLocs

public LocationList getAllSourceLocs()
It returns a list of all the locations which make up the surface for this source.

Specified by:
getAllSourceLocs in interface EqkSource
Returns:
LocationList - List of all the locations which constitute the surface of this source

getSourceSurface

public RuptureSurface getSourceSurface()
Description copied from interface: EqkSource
This gives the entire surface of the source

Specified by:
getSourceSurface in interface EqkSource
Returns:

getNumRuptures

public int getNumRuptures()
Description copied from class: ProbEqkSource
Get the number of ruptures for this source

Specified by:
getNumRuptures in interface EqkSource
Specified by:
getNumRuptures in class ProbEqkSource
Returns:
the number of rutures (equals number of mags with non-zero rates)

getRupture

public ProbEqkRupture getRupture(int nthRupture)
This makes and returns the nth probEqkRupture for this source.

Specified by:
getRupture in interface EqkSource
Specified by:
getRupture in class ProbEqkSource

setDuration

public void setDuration(double duration)
This sets the duration used in computing Poisson probabilities. This assumes the same units as in the magFreqDist rates. This is ignored if the source in non-Poissonian.

Parameters:
duration -

getDuration

public double getDuration()
This gets the duration used in computing Poisson probabilities (it may be NaN if the source is not Poissonian).

Parameters:
duration -

setLocation

public void setLocation(Location loc)
This sets the location

Parameters:
loc -

getLocation

public Location getLocation()
This gets the location

Returns:
Location

getMinMag

public double getMinMag()
This gets the minimum magnitude to be considered from the mag-freq dist (those below are ignored in making the source). This will be NaN if the source is not Poissonian.

Returns:
minMag

getMinDistance

public double getMinDistance(Site site)
This returns the shortest horizontal dist to the point source.

Specified by:
getMinDistance in class ProbEqkSource
Parameters:
site -
Returns:
minimum distance

getName

public String getName()
get the name of this class

Specified by:
getName in interface Named
Overrides:
getName in class ProbEqkSource
Returns: