Package edu.sc.seis.TauP
Class SimpleContigSeismicPhase
- java.lang.Object
-
- edu.sc.seis.TauP.SimpleSeismicPhase
-
- edu.sc.seis.TauP.SimpleContigSeismicPhase
-
- All Implemented Interfaces:
SeismicPhase
,java.io.Serializable
,java.lang.Cloneable
- Direct Known Subclasses:
FailedSeismicPhase
public class SimpleContigSeismicPhase extends SimpleSeismicPhase
Stores and transforms seismic phase names to and from their corresponding sequence of branches.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description boolean
DEBUG
Enables debugging output.protected double[]
dist
Array of distances corresponding to the ray parameters stored in rayParams.protected double
maxDistance
The maximum distance that this phase can be theoretically observed.protected double
maxRayParam
Maximum ray parameter that exists for this phase.protected int
maxRayParamIndex
Index within TauModel.rayParams that corresponds to maxRayParam.protected int
maxRecursion
Maximum recursion for refine arrival.protected double
minDistance
The minimum distance that this phase can be theoretically observed.protected double
minRayParam
Minimum ray parameter that exists for this phase.protected int
minRayParamIndex
Index within TauModel.rayParams that corresponds to minRayParam.protected java.lang.String
name
The phase name, ie PKiKP.protected java.lang.String
puristName
name with depths corrected to be actuall discontinuities in the model.protected double[]
rayParams
Array of possible ray parameters for this phase.protected double
receiverDepth
The receiver depth within the TauModel that was used to generate this phase.protected double
refineDistToleranceRadian
protected double
sourceDepth
The source depth within the TauModel that was used to generate this phase.protected double[]
time
Array of times corresponding to the ray parameters stored in rayParams.protected TauModel
tMod
TauModel to generate phase for.boolean
verbose
Enables verbose output.-
Fields inherited from interface edu.sc.seis.TauP.SeismicPhase
PWAVE, SWAVE
-
-
Constructor Summary
Constructors Constructor Description SimpleContigSeismicPhase(ProtoSeismicPhase proto, double[] rayParams, double[] time, double[] dist, double minRayParam, double maxRayParam, int minRayParamIndex, int maxRayParamIndex, double minDistance, double maxDistance, boolean debug)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
calcEnergyFluxFactorReflTranPSV(Arrival arrival)
double
calcEnergyFluxFactorReflTranSH(Arrival arrival)
double
calcIncidentAngle(double arrivalRayParam)
double
calcIncidentAngleDegree(double arrivalRayParam)
double
calcRayParamForIncidentAngle(double incidentDegree)
static double
calcRayParamForIncidentAngleInModel(double incidentDegree, boolean isPWave, ProtoSeismicPhase proto, boolean isDownGoing)
double
calcRayParamForTakeoffAngle(double takeoffDegree)
static double
calcRayParamForTakeoffAngleInModel(double takeoffDegree, boolean isPWave, TauModel tMod, boolean isDownGoing)
double
calcTakeoffAngle(double arrivalRayParam)
double
calcTakeoffAngleDegree(double arrivalRayParam)
java.util.List<Arrival>
calcTimeExactDistance(double searchDist)
Calculates arrivals for this phase, but only for the exact distance in radians.double
calcTstar(Arrival currArrival)
int
countFlatLegs()
Arrival
createArrivalAtIndex(int rayNum)
Creates an Arrival for a sampled ray parameter from the model.double
densityAtReceiver()
double
densityAtSource()
java.lang.String
describe()
java.lang.String
describeShort()
void
dump()
java.lang.String
failReason()
boolean
finalSegmentIsPWave()
True if the final, incident, wavetype is a P wave, false if an S wave.double[]
getDist()
double
getDist(int i)
Arrival
getEarliestArrival(double degrees)
SeismicPhaseSegment
getFinalPhaseSegment()
SeismicPhaseSegment
getInitialPhaseSegment()
java.util.List<java.util.List<SeismicPhaseSegment>>
getListPhaseSegments()
double
getMaxDistance()
double
getMaxDistanceDeg()
double
getMaxRayParam()
int
getMaxRayParamIndex()
double
getMaxTime()
double
getMinDistance()
double
getMinDistanceDeg()
double
getMinRayParam()
int
getMinRayParamIndex()
double
getMinTime()
java.lang.String
getName()
int
getNumRays()
java.util.List<SeismicPhaseSegment>
getPhaseSegments()
Description of segments of the phase.ProtoSeismicPhase
getProto()
java.lang.String
getPuristName()
double[]
getRayParams()
double
getRayParams(int i)
double
getReceiverDepth()
java.util.List<ShadowZone>
getShadowZones()
double
getSourceDepth()
double[]
getTau()
double
getTau(int i)
TauModel
getTauModel()
double[]
getTime()
double
getTime(int i)
TauModel
gettMod()
boolean
hasArrivals()
SimpleContigSeismicPhase
interpolatePhase(double maxDeltaDeg)
SimpleContigSeismicPhase
interpolateSimplePhase(double maxDeltaDeg)
Interpolates the time-dist arrays so adjacent rays are no more than maxDeltaDeg apart.java.util.List<TimeDist>
interpPierceTimeDist(Arrival currArrival)
boolean
isAllPWave()
True is all segments of this path are only P waves.boolean
isAllSWave()
True is all segments of this path are only S waves.boolean
isFail()
boolean
phasesExistsInModel()
Arrival
refineArrival(int rayNum, double distRadian, double distTolRadian, int maxRecursion)
Arrival
refineArrival(Arrival leftEstimate, Arrival rightEstimate, double searchDist, double distTolRadian, int maxRecursion)
static java.util.List<TimeDist>
removeDuplicatePathPoints(java.util.List<TimeDist> inPath)
Arrival
shootRay(double rayParam)
boolean
sourceSegmentIsPWave()
True if the initial leg, leaving the source, wavetype is a P wave, false if an S wave.java.lang.String
toString()
double
velocityAtReceiver()
double
velocityAtSource()
-
Methods inherited from class edu.sc.seis.TauP.SimpleSeismicPhase
calcSegmentPaths, calcSegmentPaths
-
-
-
-
Field Detail
-
DEBUG
public transient boolean DEBUG
Enables debugging output.
-
verbose
public transient boolean verbose
Enables verbose output.
-
tMod
protected TauModel tMod
TauModel to generate phase for.
-
sourceDepth
protected double sourceDepth
The source depth within the TauModel that was used to generate this phase.
-
receiverDepth
protected double receiverDepth
The receiver depth within the TauModel that was used to generate this phase. Normally this is 0.0 for a surface stations, but can be different for borehole or scattering calculations.
-
dist
protected double[] dist
Array of distances corresponding to the ray parameters stored in rayParams.
-
time
protected double[] time
Array of times corresponding to the ray parameters stored in rayParams.
-
rayParams
protected double[] rayParams
Array of possible ray parameters for this phase.
-
minRayParam
protected double minRayParam
Minimum ray parameter that exists for this phase.
-
maxRayParam
protected double maxRayParam
Maximum ray parameter that exists for this phase.
-
maxRayParamIndex
protected int maxRayParamIndex
Index within TauModel.rayParams that corresponds to maxRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index.
-
minRayParamIndex
protected int minRayParamIndex
Index within TauModel.rayParams that corresponds to minRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index.
-
minDistance
protected double minDistance
The minimum distance that this phase can be theoretically observed.
-
maxDistance
protected double maxDistance
The maximum distance that this phase can be theoretically observed.
-
name
protected java.lang.String name
The phase name, ie PKiKP.
-
puristName
protected java.lang.String puristName
name with depths corrected to be actuall discontinuities in the model.
-
refineDistToleranceRadian
protected double refineDistToleranceRadian
-
maxRecursion
protected int maxRecursion
Maximum recursion for refine arrival.
-
-
Constructor Detail
-
SimpleContigSeismicPhase
public SimpleContigSeismicPhase(ProtoSeismicPhase proto, double[] rayParams, double[] time, double[] dist, double minRayParam, double maxRayParam, int minRayParamIndex, int maxRayParamIndex, double minDistance, double maxDistance, boolean debug)
-
-
Method Detail
-
phasesExistsInModel
public boolean phasesExistsInModel()
-
getEarliestArrival
public Arrival getEarliestArrival(double degrees)
-
getTauModel
public TauModel getTauModel()
-
getMinDistanceDeg
public double getMinDistanceDeg()
-
getMinDistance
public double getMinDistance()
-
getMaxDistanceDeg
public double getMaxDistanceDeg()
-
getMaxDistance
public double getMaxDistance()
-
getMaxRayParam
public double getMaxRayParam()
-
getMinRayParam
public double getMinRayParam()
-
getMaxRayParamIndex
public int getMaxRayParamIndex()
-
getMinRayParamIndex
public int getMinRayParamIndex()
-
getMinTime
public double getMinTime()
-
getMaxTime
public double getMaxTime()
-
getProto
public ProtoSeismicPhase getProto()
-
isFail
public boolean isFail()
-
failReason
public java.lang.String failReason()
-
gettMod
public TauModel gettMod()
-
getName
public java.lang.String getName()
-
getPuristName
public java.lang.String getPuristName()
-
getSourceDepth
public double getSourceDepth()
-
getReceiverDepth
public double getReceiverDepth()
-
getListPhaseSegments
public java.util.List<java.util.List<SeismicPhaseSegment>> getListPhaseSegments()
-
getPhaseSegments
public java.util.List<SeismicPhaseSegment> getPhaseSegments()
Description of segments of the phase.
-
countFlatLegs
public int countFlatLegs()
-
getRayParams
public double getRayParams(int i)
-
getRayParams
public double[] getRayParams()
-
getDist
public double getDist(int i)
-
getDist
public double[] getDist()
-
getTime
public double getTime(int i)
-
getTime
public double[] getTime()
-
getTau
public double getTau(int i)
-
getTau
public double[] getTau()
-
hasArrivals
public boolean hasArrivals()
-
getShadowZones
public java.util.List<ShadowZone> getShadowZones()
-
calcTimeExactDistance
public java.util.List<Arrival> calcTimeExactDistance(double searchDist)
Calculates arrivals for this phase, but only for the exact distance in radians. This does not check multiple laps nor going the long way around.- Specified by:
calcTimeExactDistance
in classSimpleSeismicPhase
-
createArrivalAtIndex
public Arrival createArrivalAtIndex(int rayNum)
Creates an Arrival for a sampled ray parameter from the model. No interpolation between rays as this is a sample.- Parameters:
rayNum
-- Returns:
-
refineArrival
public Arrival refineArrival(int rayNum, double distRadian, double distTolRadian, int maxRecursion)
-
refineArrival
public Arrival refineArrival(Arrival leftEstimate, Arrival rightEstimate, double searchDist, double distTolRadian, int maxRecursion)
-
interpolatePhase
public SimpleContigSeismicPhase interpolatePhase(double maxDeltaDeg)
-
interpolateSimplePhase
public SimpleContigSeismicPhase interpolateSimplePhase(double maxDeltaDeg)
Interpolates the time-dist arrays so adjacent rays are no more than maxDeltaDeg apart.- Specified by:
interpolateSimplePhase
in classSimpleSeismicPhase
- Parameters:
maxDeltaDeg
- max separation in degrees- Returns:
- new phase interpolated
-
shootRay
public Arrival shootRay(double rayParam) throws SlownessModelException, TauModelException
-
calcRayParamForTakeoffAngle
public double calcRayParamForTakeoffAngle(double takeoffDegree) throws NoArrivalException
- Throws:
NoArrivalException
-
calcRayParamForTakeoffAngleInModel
public static double calcRayParamForTakeoffAngleInModel(double takeoffDegree, boolean isPWave, TauModel tMod, boolean isDownGoing) throws NoSuchLayerException, SlownessModelException
-
calcRayParamForIncidentAngle
public double calcRayParamForIncidentAngle(double incidentDegree) throws NoArrivalException
- Throws:
NoArrivalException
-
calcRayParamForIncidentAngleInModel
public static double calcRayParamForIncidentAngleInModel(double incidentDegree, boolean isPWave, ProtoSeismicPhase proto, boolean isDownGoing) throws NoSuchLayerException, SlownessModelException
-
velocityAtSource
public double velocityAtSource()
-
velocityAtReceiver
public double velocityAtReceiver()
-
densityAtSource
public double densityAtSource()
-
densityAtReceiver
public double densityAtReceiver()
-
calcTakeoffAngleDegree
public double calcTakeoffAngleDegree(double arrivalRayParam)
-
calcTakeoffAngle
public double calcTakeoffAngle(double arrivalRayParam)
-
calcIncidentAngleDegree
public double calcIncidentAngleDegree(double arrivalRayParam)
-
calcIncidentAngle
public double calcIncidentAngle(double arrivalRayParam)
-
sourceSegmentIsPWave
public boolean sourceSegmentIsPWave()
Description copied from interface:SeismicPhase
True if the initial leg, leaving the source, wavetype is a P wave, false if an S wave.
-
getInitialPhaseSegment
public SeismicPhaseSegment getInitialPhaseSegment()
-
getFinalPhaseSegment
public SeismicPhaseSegment getFinalPhaseSegment()
-
finalSegmentIsPWave
public boolean finalSegmentIsPWave()
Description copied from interface:SeismicPhase
True if the final, incident, wavetype is a P wave, false if an S wave.
-
interpPierceTimeDist
public java.util.List<TimeDist> interpPierceTimeDist(Arrival currArrival) throws TauModelException
- Throws:
TauModelException
-
calcTstar
public double calcTstar(Arrival currArrival)
-
getNumRays
public int getNumRays()
-
isAllPWave
public boolean isAllPWave()
True is all segments of this path are only P waves.- Returns:
-
isAllSWave
public boolean isAllSWave()
True is all segments of this path are only S waves.- Returns:
-
calcEnergyFluxFactorReflTranPSV
public double calcEnergyFluxFactorReflTranPSV(Arrival arrival) throws VelocityModelException
- Throws:
VelocityModelException
-
calcEnergyFluxFactorReflTranSH
public double calcEnergyFluxFactorReflTranSH(Arrival arrival) throws VelocityModelException
- Throws:
VelocityModelException
-
removeDuplicatePathPoints
public static java.util.List<TimeDist> removeDuplicatePathPoints(java.util.List<TimeDist> inPath)
-
describe
public java.lang.String describe()
-
describeShort
public java.lang.String describeShort()
-
toString
public java.lang.String toString()
- Specified by:
toString
in interfaceSeismicPhase
- Overrides:
toString
in classjava.lang.Object
-
dump
public void dump()
-
-