Package edu.sc.seis.TauP
Class SeismicPhaseFactory
java.lang.Object
edu.sc.seis.TauP.SeismicPhaseFactory
public class SeismicPhaseFactory
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field 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.protected java.util.ArrayList<java.lang.Boolean>
downGoing
true if the current leg of the phase is down going.protected java.util.List<java.lang.Integer>
headOrDiffractSeq
Array of branchSeq positions where a head or diffracted segment occurs.protected java.util.ArrayList<PhaseInteraction>
legAction
records the end action for the current 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 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.static boolean
PWAVE
protected java.util.List<SeismicPhaseSegment>
segmentList
Description of segments of the phase.static boolean
SWAVE
protected java.util.ArrayList<java.lang.Boolean>
waveType
ArrayList of wave types corresponding to each leg of the phase. -
Method Summary
Modifier and Type Method Description protected void
addToBranch(TauModel tMod, int startBranch, int endBranch, boolean isPWave, PhaseInteraction endAction, java.lang.String currLeg)
protected static int[][]
calcBranchMultiplier(TauModel tMod, java.util.List<java.lang.Integer> branchSeq, java.util.List<java.lang.Boolean> waveType)
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.static void
configure(java.util.Properties toolProps)
static SeismicPhase
createPhase(java.lang.String name, TauModel tMod)
static SeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth)
static SeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth)
static SeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth, boolean debug)
static java.lang.String
endActionString(PhaseInteraction endAction)
static double
getMaxDiffraction()
static double
getMaxKmpsLaps()
static double
getMaxRefraction()
java.lang.String
getName()
boolean
isLegDepth(java.lang.String leg)
find out if the next leg represents a phase conversion depthprotected void
parseName(TauModel tMod)
Constructs a branch sequence from the given phase name and tau model.protected void
phaseConversion(TauModel tMod, int fromBranch, PhaseInteraction endAction, boolean isPtoS)
changes maxRayParam and minRayParam whenever there is a phase conversion.static void
setMaxDiffraction(double max)
static void
setMaxKmpsLaps(double max)
static void
setMaxRefraction(double max)
protected void
sumBranches(TauModel tMod)
Sums the appropriate branches for this phase.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
minRayParam
protected double minRayParamMinimum ray parameter that exists for this phase. -
maxRayParam
protected double maxRayParamMaximum ray parameter that exists for this phase. -
maxRayParamIndex
protected int maxRayParamIndexIndex within TauModel.rayParams that corresponds to maxRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index. -
minRayParamIndex
protected int minRayParamIndexIndex within TauModel.rayParams that corresponds to minRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index. -
minDistance
protected double minDistanceThe minimum distance that this phase can be theoretically observed. -
maxDistance
protected double maxDistanceThe maximum distance that this phase can be theoretically observed. -
currBranch
protected transient int currBranchtemporary branch number so we know where to start add to the branch sequence. Used in addToBranch() and parseName(). -
branchSeq
protected java.util.List<java.lang.Integer> branchSeqArray of branch numbers for the given phase. Note that this depends upon both the earth model and the source depth. -
headOrDiffractSeq
protected java.util.List<java.lang.Integer> headOrDiffractSeqArray of branchSeq positions where a head or diffracted segment occurs. -
segmentList
Description of segments of the phase. -
legAction
records the end action for the current leg. Will be one of SeismicPhase.TURN, SeismicPhase.TRANSDOWN, SeismicPhase.TRANSUP, SeismicPhase.REFLECTBOT, or SeismicPhase.REFLECTTOP. This allows a check to make sure the path is correct. Used in addToBranch() and parseName(). -
downGoing
protected java.util.ArrayList<java.lang.Boolean> downGoingtrue if the current leg of the phase is down going. This allows a check to make sure the path is correct. Used in addToBranch() and parseName(). -
waveType
protected java.util.ArrayList<java.lang.Boolean> waveTypeArrayList of wave types corresponding to each leg of the phase. -
PWAVE
public static final boolean PWAVE- See Also:
- Constant Field Values
-
SWAVE
public static final boolean SWAVE- See Also:
- Constant Field Values
-
maxRefraction
protected static double maxRefractionThe maximum degrees that a Pn or Sn can refract along the moho. Note this is not the total distance, only the segment along the moho. The default is 20 degrees. -
maxDiffraction
protected static double maxDiffractionThe maximum degrees that a Pdiff or Sdiff can diffract along the CMB. Note this is not the total distance, only the segment along the CMB. The default is 60 degrees.
-
-
Method Details
-
getMaxRefraction
public static double getMaxRefraction() -
setMaxRefraction
public static void setMaxRefraction(double max) -
getMaxDiffraction
public static double getMaxDiffraction() -
setMaxDiffraction
public static void setMaxDiffraction(double max) -
getMaxKmpsLaps
public static double getMaxKmpsLaps() -
setMaxKmpsLaps
public static void setMaxKmpsLaps(double max) -
createPhase
public static SeismicPhase createPhase(java.lang.String name, TauModel tMod) throws TauModelException- Throws:
TauModelException
-
createPhase
public static SeismicPhase createPhase(java.lang.String name, TauModel tMod, double sourceDepth) throws TauModelException- Throws:
TauModelException
-
createPhase
public static SeismicPhase createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth) throws TauModelException- Throws:
TauModelException
-
createPhase
public static SeismicPhase createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth, boolean debug) throws TauModelException- Throws:
TauModelException
-
configure
public static void configure(java.util.Properties toolProps) -
getName
public java.lang.String getName() -
parseName
Constructs a branch sequence from the given phase name and tau model.- Throws:
TauModelException
-
phaseConversion
protected void phaseConversion(TauModel tMod, int fromBranch, PhaseInteraction endAction, boolean isPtoS) throws TauModelExceptionchanges maxRayParam and minRayParam whenever there is a phase conversion. For instance, SKP needs to change the maxRayParam because there are SKS ray parameters that cannot propagate from the cmb into the mantle as a p wave.- Throws:
TauModelException
-
addToBranch
protected void addToBranch(TauModel tMod, int startBranch, int endBranch, boolean isPWave, PhaseInteraction endAction, java.lang.String currLeg) throws TauModelException- Throws:
TauModelException
-
calcBranchMultiplier
protected static int[][] calcBranchMultiplier(TauModel tMod, java.util.List<java.lang.Integer> branchSeq, java.util.List<java.lang.Boolean> waveType)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.- Returns:
-
sumBranches
Sums the appropriate branches for this phase.- Throws:
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.
-
isLegDepth
public boolean isLegDepth(java.lang.String leg)find out if the next leg represents a phase conversion depth- Parameters:
leg
-- Returns:
-
endActionString
-