Package edu.sc.seis.TauP
Class Arrival
- java.lang.Object
-
- edu.sc.seis.TauP.Arrival
-
- Direct Known Subclasses:
ScatteredArrival
public class Arrival extends java.lang.Object
convenience class for storing the parameters associated with a phase arrival.
-
-
Field Summary
Fields Modifier and Type Field Description static float
DEFAULT_ATTENUATION_FREQUENCY
protected static double
KMtoM
static double
MANY_LAPS_PLUS_180
protected static double
MgtoKg
-
Constructor Summary
Constructors Constructor Description Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, double time, double dist, double rayParam, int rayParamIndex, double dRPdDist)
Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, double time, double dist, double rayParam, int rayParamIndex, RayCalculateable searchDist, java.lang.String name, java.lang.String puristName, double sourceDepth, double receiverDepth, double takeoffAngleRadian, double incidentAngleRadian, double dRPdDist)
Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, java.util.List<TimeDist> pierce, int rayParamIndex, double dRPdDist)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
asCSVRow()
ArrivalAmplitude
calcAmplitude()
double
calcAttenuation()
Calculate attenuation over path at the default frequency.double
calcAttenuation(double maxfreq, int N)
Calculate attenuation over path at the given frequency.double
calcFreeFactor()
double
calcPathLength()
double[]
calcRadiationPattern()
Calculate radiation pattern terms, Fp, Fsv, Fsh for the given fault orientation and az,takeoff.double
calcRadiationTerm()
double
calcTStar()
Calculate t* over path at the given frequency.static java.lang.String
CSVHeader()
double
getAmplitudeFactorPSV()
Calculates the amplitude factor, 1/sqrt(density*vel) times reflection/tranmission coefficient times geometric spreading, for the arrival.double
getAmplitudeFactorPSV(double momentRate, double attenuationFrequency, int numFreq)
double
getAmplitudeFactorSH()
Calculates the amplitude factor, 1/sqrt(density*vel) times reflection/tranmission coefficient times geometric spreading, for the arrival.double
getAmplitudeFactorSH(double momentRate, double attenuationFrequency, int numFreq)
double
getAmplitudeGeometricSpreadingFactor()
Geometrical spreading factor for amplitude, sqrt of energy spreading.java.lang.String
getCommentLine()
TimeDist
getDeepestPierce()
returns deepest point on path, in kilometersdouble
getDist()
returns travel distance in radiansdouble
getDistDeg()
returns travel distance in degrees.double
getDRayParamDDelta()
double
getDRayParamDDeltaDeg()
java.time.Duration
getDuration()
static Arrival
getEarliestArrival(java.util.List<Arrival> arrivals)
double
getEnergyFluxFactorReflTransPSV()
Calculates the product of the reflection and transmission coefficients for all discontinuities along the path of this arrival in the P-SV plane.double
getEnergyFluxFactorReflTransSH()
Calculates the product of the reflection and transmission coefficients for all discontinuities along the path of this arrival for transverse, SH, waves.double
getEnergyGeometricSpreadingFactor()
Energy Geometrical spreading factor.TimeDist
getFirstPiercePoint(double depth)
finds the first pierce point at the given depth.TimeDist
getFurthestPierce()
returns furthest distance point module pi/180 on path, in radiansdouble
getIncidentAngleDegree()
double
getIncidentAngleRadian()
TimeDist
getLastPiercePoint(double depth)
finds the last pierce point at the given depth.static Arrival
getLatestArrival(java.util.List<Arrival> arrivals)
LatLonable
getLatLonable()
double
getModuloDist()
returns distance in radians and in the range 0-PI.double
getModuloDistDeg()
returns distance in degrees and in the range 0-180.double
getModuloSearchDistDeg()
returns search distance in degrees and in the range 0-180.java.lang.String
getName()
returns phase nameint
getNumPathPoints()
int
getNumPiercePoints()
TimeDist[]
getPath()
returns path points as TimeDist objects.java.util.List<ArrivalPathSegment>
getPathSegments()
SeismicPhase
getPhase()
TimeDist[]
getPierce()
returns pierce points as TimeDist objects.TimeDist
getPiercePoint(int i)
java.lang.String
getPuristName()
returns purist's version of name.double
getRadiationPatternPSV()
double
getRadiationPatternSH()
RayCalculateable
getRayCalculateable()
double
getRayParam()
returns ray parameter in seconds per radiandouble
getRayParamDeg()
returns ray parameter in seconds per degint
getRayParamIndex()
double
getReceiverDepth()
returns receiver (station) depth in kilometersArrival
getRelativeToArrival()
double
getSearchDistDeg()
returns search distance in degrees.TimeDist
getShallowestPierce()
returns shallowest point on path, in kilometersSimpleContigSeismicPhase
getSimpleContigSeismicPhase()
Returns the contiguous part of the phase that generated this arrival.double
getSourceDepth()
returns source depth in kilometersTimeDist
getSourceTimeDist()
Create TimeDist point for source, first point in pierce or path.double
getTakeoffAngleDegree()
double
getTakeoffAngleRadian()
TauModel
getTauModel()
double
getTime()
boolean
isFromCompositePhase()
boolean
isLatLonable()
boolean
isLongWayAround()
boolean
isRelativeToArrival()
java.util.List<SeismicPhaseSegment>
listPhaseSegments()
Arrival
negateDistance()
Negates the arrival distance.static java.util.List<Arrival>
onlyFirst(java.util.List<Arrival> arrivalList)
double
radialSlownessAtReceiver()
double
radialSlownessAtSource()
void
setRelativeToArrival(Arrival relativeToArrival)
void
setSearchValue(RayCalculateable searchVal)
static java.util.List<Arrival>
sortArrivals(java.util.List<Arrival> arrivals)
java.lang.String
toString()
static java.lang.String
toStringHeader()
double
velocityAtReceiver()
double
velocityAtSource()
-
-
-
Field Detail
-
MANY_LAPS_PLUS_180
public static final double MANY_LAPS_PLUS_180
- See Also:
- Constant Field Values
-
DEFAULT_ATTENUATION_FREQUENCY
public static final float DEFAULT_ATTENUATION_FREQUENCY
- See Also:
- Constant Field Values
-
KMtoM
protected static final double KMtoM
- See Also:
- Constant Field Values
-
MgtoKg
protected static final double MgtoKg
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Arrival
public Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, java.util.List<TimeDist> pierce, int rayParamIndex, double dRPdDist)
-
Arrival
public Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, double time, double dist, double rayParam, int rayParamIndex, double dRPdDist)
-
Arrival
public Arrival(SeismicPhase phase, SimpleContigSeismicPhase simpleContigSeismicPhase, double time, double dist, double rayParam, int rayParamIndex, RayCalculateable searchDist, java.lang.String name, java.lang.String puristName, double sourceDepth, double receiverDepth, double takeoffAngleRadian, double incidentAngleRadian, double dRPdDist)
-
-
Method Detail
-
getCommentLine
public java.lang.String getCommentLine()
-
getPhase
public SeismicPhase getPhase()
- Returns:
- the phase used to calculate this arrival.
-
getSimpleContigSeismicPhase
public SimpleContigSeismicPhase getSimpleContigSeismicPhase()
Returns the contiguous part of the phase that generated this arrival. Usually the same as getPhase(), except in the case of CompositeSeismicPhase where several contiguous phases are separated by shadow zones.- Returns:
-
isFromCompositePhase
public boolean isFromCompositePhase()
-
listPhaseSegments
public java.util.List<SeismicPhaseSegment> listPhaseSegments()
-
getTauModel
public TauModel getTauModel()
- Returns:
- TauModel used to generate the phase that this arrival came from
-
getTime
public double getTime()
- Returns:
- travel time in seconds
-
getDuration
public java.time.Duration getDuration()
- Returns:
- travel time as a Duration
-
getDist
public double getDist()
returns travel distance in radians
-
getDistDeg
public double getDistDeg()
returns travel distance in degrees.
-
getModuloDist
public double getModuloDist()
returns distance in radians and in the range 0-PI. Note this may not be the actual distance traveled.
-
getModuloDistDeg
public double getModuloDistDeg()
returns distance in degrees and in the range 0-180. Note this may not be the actual distance traveled.
-
setSearchValue
public void setSearchValue(RayCalculateable searchVal)
-
getSearchDistDeg
public double getSearchDistDeg()
returns search distance in degrees.
-
getModuloSearchDistDeg
public double getModuloSearchDistDeg()
returns search distance in degrees and in the range 0-180. Note this may not be the actual distance traveled.
-
isLongWayAround
public boolean isLongWayAround()
-
getRayParam
public double getRayParam()
returns ray parameter in seconds per radian
-
getRayParamDeg
public double getRayParamDeg()
returns ray parameter in seconds per deg
-
getDRayParamDDelta
public double getDRayParamDDelta()
-
getDRayParamDDeltaDeg
public double getDRayParamDDeltaDeg()
-
calcAmplitude
public ArrivalAmplitude calcAmplitude() throws SlownessModelException, TauModelException
-
getAmplitudeGeometricSpreadingFactor
public double getAmplitudeGeometricSpreadingFactor() throws TauModelException
Geometrical spreading factor for amplitude, sqrt of energy spreading. See Fundamentals of Modern Global Seismology, ch 13, eq 13.19.- Throws:
TauModelException
-
getEnergyGeometricSpreadingFactor
public double getEnergyGeometricSpreadingFactor()
Energy Geometrical spreading factor. See Fundamentals of Modern Global Seismology, ch 13, eq 13.10. Note that eq 13.10 has divide by zero in case of a horizontal ray arriving at the receiver.
-
getEnergyFluxFactorReflTransPSV
public double getEnergyFluxFactorReflTransPSV() throws VelocityModelException, SlownessModelException
Calculates the product of the reflection and transmission coefficients for all discontinuities along the path of this arrival in the P-SV plane. Note that this may not give accurate results for certain wave types, such as head or diffracted waves.- Returns:
- Throws:
VelocityModelException
SlownessModelException
-
getEnergyFluxFactorReflTransSH
public double getEnergyFluxFactorReflTransSH() throws VelocityModelException, SlownessModelException
Calculates the product of the reflection and transmission coefficients for all discontinuities along the path of this arrival for transverse, SH, waves. If any segment on the path is a P wave, the result will be zero. Note that this may not give accurate results for certain wave types, such as head or diffracted waves.- Returns:
- Throws:
VelocityModelException
SlownessModelException
-
getAmplitudeFactorPSV
public double getAmplitudeFactorPSV() throws TauModelException, SlownessModelException
Calculates the amplitude factor, 1/sqrt(density*vel) times reflection/tranmission coefficient times geometric spreading, for the arrival. Note this is only an approximation of amplitude as the source radiation magnitude and pattern is not included, and this may not give accurate results for certain wave types, such as head or diffracted waves.See FMGS eq 17.74
-
getAmplitudeFactorPSV
public double getAmplitudeFactorPSV(double momentRate, double attenuationFrequency, int numFreq) throws TauModelException, SlownessModelException
-
getAmplitudeFactorSH
public double getAmplitudeFactorSH() throws TauModelException, VelocityModelException, SlownessModelException
Calculates the amplitude factor, 1/sqrt(density*vel) times reflection/tranmission coefficient times geometric spreading, for the arrival. Note this is only an approximation of amplitude as the source radiation magnitude and pattern is not included, and this may not give accurate results for certain wave types, such as head or diffracted waves.- Returns:
- Throws:
TauModelException
VelocityModelException
SlownessModelException
-
getAmplitudeFactorSH
public double getAmplitudeFactorSH(double momentRate, double attenuationFrequency, int numFreq) throws TauModelException, SlownessModelException
-
getRadiationPatternPSV
public double getRadiationPatternPSV()
-
getRadiationPatternSH
public double getRadiationPatternSH()
-
getIncidentAngleDegree
public double getIncidentAngleDegree()
-
getIncidentAngleRadian
public double getIncidentAngleRadian()
-
getTakeoffAngleDegree
public double getTakeoffAngleDegree()
-
getTakeoffAngleRadian
public double getTakeoffAngleRadian()
-
velocityAtSource
public double velocityAtSource()
-
radialSlownessAtSource
public double radialSlownessAtSource()
-
velocityAtReceiver
public double velocityAtReceiver()
-
radialSlownessAtReceiver
public double radialSlownessAtReceiver()
-
getRayParamIndex
public int getRayParamIndex()
-
getName
public java.lang.String getName()
returns phase name
-
getPuristName
public java.lang.String getPuristName()
returns purist's version of name. Depths are changed to reflect the true depth of the interface.
-
getSourceDepth
public double getSourceDepth()
returns source depth in kilometers
-
getReceiverDepth
public double getReceiverDepth()
returns receiver (station) depth in kilometers
-
getShallowestPierce
public TimeDist getShallowestPierce()
returns shallowest point on path, in kilometers
-
getDeepestPierce
public TimeDist getDeepestPierce()
returns deepest point on path, in kilometers
-
getFurthestPierce
public TimeDist getFurthestPierce()
returns furthest distance point module pi/180 on path, in radians
-
getPierce
public TimeDist[] getPierce()
returns pierce points as TimeDist objects.
-
calcFreeFactor
public double calcFreeFactor() throws VelocityModelException
- Throws:
VelocityModelException
-
calcAttenuation
public double calcAttenuation()
Calculate attenuation over path at the default frequency. See eq B13.2.2 in FMGS, p374.
-
calcAttenuation
public double calcAttenuation(double maxfreq, int N)
Calculate attenuation over path at the given frequency. See eq B13.2.2 in FMGS, p374. Averages over N+1 frequencies from 0 to maxfreq.
-
calcTStar
public double calcTStar()
Calculate t* over path at the given frequency. See eq B13.2.2 in FMGS, p374.
-
calcRadiationPattern
public double[] calcRadiationPattern()
Calculate radiation pattern terms, Fp, Fsv, Fsh for the given fault orientation and az,takeoff.- Returns:
- Fp, Fsv, Fsh
-
calcRadiationTerm
public double calcRadiationTerm()
-
calcPathLength
public double calcPathLength()
-
getPath
public TimeDist[] getPath()
returns path points as TimeDist objects.
-
getPathSegments
public java.util.List<ArrivalPathSegment> getPathSegments()
-
negateDistance
public Arrival negateDistance()
Negates the arrival distance. Primarily used when printing a scatter arrival that is at negative distance. No other fields are changed.- Returns:
- new Arrival with dist and search dist negated
-
isRelativeToArrival
public boolean isRelativeToArrival()
-
getRelativeToArrival
public Arrival getRelativeToArrival()
-
setRelativeToArrival
public void setRelativeToArrival(Arrival relativeToArrival)
-
toStringHeader
public static java.lang.String toStringHeader()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getSourceTimeDist
public TimeDist getSourceTimeDist()
Create TimeDist point for source, first point in pierce or path.
-
getNumPiercePoints
public int getNumPiercePoints()
-
getNumPathPoints
public int getNumPathPoints()
-
getPiercePoint
public TimeDist getPiercePoint(int i)
-
getFirstPiercePoint
public TimeDist getFirstPiercePoint(double depth)
finds the first pierce point at the given depth.- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if depth is not found
-
getLastPiercePoint
public TimeDist getLastPiercePoint(double depth)
finds the last pierce point at the given depth.- Throws:
java.lang.ArrayIndexOutOfBoundsException
- if depth is not found
-
CSVHeader
public static java.lang.String CSVHeader()
-
asCSVRow
public java.lang.String asCSVRow()
-
getRayCalculateable
public RayCalculateable getRayCalculateable()
-
isLatLonable
public boolean isLatLonable()
-
getLatLonable
public LatLonable getLatLonable()
-
-