public class SeismicPhase
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected java.util.List<java.lang.Integer> |
branchSeq
Array of branch numbers for the given phase.
|
protected int |
currBranch
temporary branch number so we know where to start add to the branch
sequence.
|
boolean |
DEBUG
Enables debugging output.
|
protected double[] |
dist
Array of distances corresponding to the ray parameters stored in
rayParams.
|
protected java.util.ArrayList<java.lang.Boolean> |
downGoing
true if the current leg of the phase is down going.
|
static boolean |
expert
Enables phases originating in core.
|
protected java.util.ArrayList<java.lang.Integer> |
legAction
records the end action for the current leg.
|
protected java.util.ArrayList<java.lang.String> |
legs
ArrayList containing Strings for each leg.
|
protected static double |
maxDiffraction
The maximum degrees that a Pdiff or Sdiff can diffract along the CMB.
|
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 |
protected static double |
maxRefraction
The maximum degrees that a Pn or Sn can refract along the moho.
|
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.
|
static boolean |
PWAVE |
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 |
static int |
REFLECT_TOPSIDE
Used by addToBranch when the path reflects off the bottom of the end of a
segment, ie v.
|
static int |
REFLECT_UNDERSIDE
Used by addToBranch when the path reflects off the top of the end of a
segment, ie ^.
|
protected double |
sourceDepth
The source depth within the TauModel that was used to generate this
phase.
|
static boolean |
SWAVE |
protected double[] |
time
Array of times corresponding to the ray parameters stored in rayParams.
|
protected TauModel |
tMod
TauModel to generate phase for.
|
static int |
TRANSDOWN
Used by addToBranch when the path transmits down through the end of a
segment.
|
static int |
TRANSUP
Used by addToBranch when the path transmits up through the end of a
segment.
|
static int |
TURN
Used by addToBranch when the path turns within a segment.
|
boolean |
verbose
Enables verbose output.
|
protected java.util.ArrayList<java.lang.Boolean> |
waveType
ArrayList of wave types corresponding to each leg of the phase.
|
Constructor and Description |
---|
SeismicPhase(java.lang.String name,
java.lang.String modelName,
double depth) |
SeismicPhase(java.lang.String name,
TauModel tMod) |
SeismicPhase(java.lang.String name,
TauModel tMod,
double receiverDepth) |
Modifier and Type | Method and Description |
---|---|
protected void |
addToBranch(TauModel tMod,
int startBranch,
int endBranch,
boolean isPWave,
int endAction) |
protected int[][] |
calcBranchMultiplier()
Calculates how many times the phase passes through a branch, up or down,
so that we can just multiply instead of doing the ray calc for each time.
|
double |
calcIncidentAngle(double arrivalRayParam) |
Arrival |
calcPath(Arrival currArrival)
Deprecated.
use the getPath() method on the arrival.
|
java.util.List<Arrival> |
calcPath(double deg)
Deprecated.
Use the getPath() method on each Arrival from calcTime()
|
protected java.util.List<TimeDist> |
calcPathTimeDist(Arrival currArrival) |
Arrival |
calcPierce(Arrival currArrival)
Deprecated.
Use the getPierce() method on each Arrival from calcTime()
|
java.util.List<Arrival> |
calcPierce(double deg)
Deprecated.
Use the getPierce() method on each Arrival from calcTime()
|
protected java.util.List<TimeDist> |
calcPierceTimeDist(Arrival currArrival) |
double |
calcRayParamForTakeoffAngle(double takeoffDegree) |
double |
calcTakeoffAngle(double arrivalRayParam) |
java.util.List<Arrival> |
calcTime(double deg)
calculates arrival times for this phase, sorted by time.
|
int |
closestBranchToDepth(TauModel tMod,
java.lang.String depthString)
Finds the closest discontinuity to the given depth that can have
refletions and phase transformations.
|
protected void |
createPuristName(TauModel tMod) |
void |
dump() |
static java.lang.String |
endActionString(int endAction) |
double[] |
getDist() |
double |
getDist(int i) |
boolean[] |
getDownGoing()
Direction of the leg between pierce point i and i+1, true is downgoing,
false if upgoing
|
Arrival |
getEarliestArrival(double degrees) |
static Arrival |
getEarliestArrival(java.util.List<SeismicPhase> phases,
double degrees) |
int[] |
getLegAction()
Leg type i layer interaction, one of TURN, REFLECTTOP, REFLECTBOT,
TRANSUP, TRANSDOWN
|
java.util.List<java.lang.String> |
getLegs() |
static double |
getMaxDiffraction() |
double |
getMaxDistance() |
double |
getMaxDistanceDeg() |
double |
getMaxRayParam() |
int |
getMaxRayParamIndex() |
static double |
getMaxRefraction() |
double |
getMinDistance() |
double |
getMinDistanceDeg() |
double |
getMinRayParam() |
int |
getMinRayParamIndex() |
java.lang.String |
getName() |
java.lang.String |
getPuristName() |
double[] |
getRayParams() |
double |
getRayParams(int i) |
double[] |
getTau() |
double |
getTau(int i) |
TauModel |
getTauModel() |
double[] |
getTime() |
double |
getTime(int i) |
java.lang.String |
getValidationFailMessage() |
boolean[] |
getWaveType()
Wave type of the leg between pierce point i and i+1, true is P, false if
S
|
boolean |
hasArrivals() |
protected static java.util.ArrayList<java.lang.String> |
legPuller(java.lang.String name)
Tokenizes a phase name into legs, ie PcS becomes 'P'+'c'+'S' while p^410P
would become 'p'+'^410'+'P'.
|
static void |
main(java.lang.String[] args) |
protected void |
parseName(TauModel tMod)
Constructs a branch sequence from the given phase name and tau model.
|
protected void |
phaseConversion(TauModel tMod,
int fromBranch,
int endAction,
boolean isPtoS)
changes maxRayParam and minRayParam whenever there is a phase conversion.
|
boolean |
phasesExistsInModel() |
static java.lang.String |
phaseValidate(java.util.ArrayList<java.lang.String> legs)
Performs consistency checks on the previously tokenized phase name stored
in legs.
|
Arrival |
refineArrival(Arrival leftEstimate,
Arrival rightEstimate,
double searchDist,
double distTolRadian,
int maxRecursion) |
Arrival |
refineArrival(int rayNum,
double distRadian,
double distTolRadian,
int maxRecursion) |
static void |
setMaxDiffraction(double max) |
static void |
setMaxRefraction(double max) |
Arrival |
shootRay(double rayParam) |
protected void |
sumBranches(TauModel tMod)
Sums the appropriate branches for this phase.
|
java.lang.String |
toString() |
public transient boolean DEBUG
public transient boolean verbose
public static transient boolean expert
protected TauModel tMod
public static final int TURN
public static final int REFLECT_UNDERSIDE
public static final int REFLECT_TOPSIDE
public static final int TRANSUP
public static final int TRANSDOWN
protected static double maxRefraction
protected static double maxDiffraction
protected double sourceDepth
protected double receiverDepth
protected double[] dist
protected double[] time
protected double[] rayParams
protected double minRayParam
protected double maxRayParam
protected int maxRayParamIndex
protected int minRayParamIndex
protected double minDistance
protected double maxDistance
protected java.util.List<java.lang.Integer> branchSeq
protected java.lang.String name
protected java.lang.String puristName
protected java.util.ArrayList<java.lang.String> legs
protected transient int currBranch
protected java.util.ArrayList<java.lang.Integer> legAction
protected java.util.ArrayList<java.lang.Boolean> downGoing
protected java.util.ArrayList<java.lang.Boolean> waveType
legs
protected double refineDistToleranceRadian
protected int maxRecursion
public static final boolean PWAVE
public static final boolean SWAVE
public SeismicPhase(java.lang.String name, java.lang.String modelName, double depth) throws TauModelException
TauModelException
public SeismicPhase(java.lang.String name, TauModel tMod) throws TauModelException
name
- String containing a name of the phase.tMod
- Tau model to be used to construct the phase. This should be corrected for the source
depth.TauModelException
public SeismicPhase(java.lang.String name, TauModel tMod, double receiverDepth) throws TauModelException
TauModelException
public boolean phasesExistsInModel()
public Arrival getEarliestArrival(double degrees)
public TauModel getTauModel()
public double getMinDistanceDeg()
public double getMinDistance()
public double getMaxDistanceDeg()
public double getMaxDistance()
public double getMaxRayParam()
public double getMinRayParam()
public int getMaxRayParamIndex()
public int getMinRayParamIndex()
public static double getMaxRefraction()
public static void setMaxRefraction(double max)
public static double getMaxDiffraction()
public static void setMaxDiffraction(double max)
public java.lang.String getName()
public java.lang.String getPuristName()
public java.util.List<java.lang.String> getLegs()
public double getRayParams(int i)
public double[] getRayParams()
public double getDist(int i)
public double[] getDist()
public double getTime(int i)
public double[] getTime()
public double getTau(int i)
public double[] getTau()
public boolean[] getDownGoing()
public boolean[] getWaveType()
public int[] getLegAction()
public boolean hasArrivals()
public java.util.List<Arrival> calcTime(double deg)
public Arrival refineArrival(int rayNum, double distRadian, double distTolRadian, int maxRecursion)
public Arrival refineArrival(Arrival leftEstimate, Arrival rightEstimate, double searchDist, double distTolRadian, int maxRecursion)
public Arrival shootRay(double rayParam) throws SlownessModelException, NoSuchLayerException
public double calcRayParamForTakeoffAngle(double takeoffDegree)
public double calcTakeoffAngle(double arrivalRayParam)
public double calcIncidentAngle(double arrivalRayParam)
protected void phaseConversion(TauModel tMod, int fromBranch, int endAction, boolean isPtoS) throws TauModelException
TauModelException
public static final java.lang.String endActionString(int endAction)
protected void addToBranch(TauModel tMod, int startBranch, int endBranch, boolean isPWave, int endAction) throws TauModelException
TauModelException
public int closestBranchToDepth(TauModel tMod, java.lang.String depthString)
protected void parseName(TauModel tMod) throws TauModelException
TauModelException
protected static java.util.ArrayList<java.lang.String> legPuller(java.lang.String name) throws TauModelException
TauModelException
- if the phase name cannot be tokenized.protected void createPuristName(TauModel tMod)
protected int[][] calcBranchMultiplier()
protected void sumBranches(TauModel tMod) throws TauModelException
TauModelException
- if the topDepth of the high slowness zone is not contained
within the TauModel. This should never happen and would
indicate an invalid TauModel.@Deprecated public java.util.List<Arrival> calcPierce(double deg) throws TauModelException
TauModelException
@Deprecated public Arrival calcPierce(Arrival currArrival)
currArrival
- @Deprecated public java.util.List<Arrival> calcPath(double deg)
@Deprecated public Arrival calcPath(Arrival currArrival)
currArrival
- public java.lang.String getValidationFailMessage()
public static java.lang.String phaseValidate(java.util.ArrayList<java.lang.String> legs)
public static Arrival getEarliestArrival(java.util.List<SeismicPhase> phases, double degrees)
public java.lang.String toString()
toString
in class java.lang.Object
public void dump()
public static void main(java.lang.String[] args)