Package edu.sc.seis.TauP
Class SeismicPhaseFactory
- java.lang.Object
-
- edu.sc.seis.TauP.SeismicPhaseFactory
-
public class SeismicPhaseFactory extends java.lang.Object
Factory for calculating seismic phase from a phase name within a model.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CRUST_MANTLE_FACTORY
static int
INNER_CORE_FACTORY
protected static double
maxDiffraction
The maximum degrees that a Pdiff or Sdiff can diffract along the CMB.protected static double
maxRefraction
The maximum degrees that a Pn or Sn can refract along the moho.static int
OUTER_CORE_FACTOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static int[][]
calcBranchMultiplier(TauModel tMod, java.util.List<SeismicPhaseSegment> segmentList)
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 java.util.List<TauBranch>
calcBranchSeqForRayparam(ProtoSeismicPhase proto, double rp)
static java.util.List<TauBranch>
calcBranchSeqForRayparam(ProtoSeismicPhase proto, double rp, SeismicPhaseSegment seg, SeismicPhaseSegment prevSeg)
static TimeDist
calcForIndex(ProtoSeismicPhase proto, int idx, int maxRayParamIndex, double[] rayParams)
static java.util.List<TimeDist>
calcPierceForIndex(ProtoSeismicPhase proto, int idx, int maxRayParamIndex, double[] rayParams)
int
calcStartBranch(ProtoSeismicPhase proto, java.lang.String currLeg)
static java.util.List<SeismicPhase>
calculateSeismicPhases(TauModel tMod, java.util.List<PhaseName> phaseNameList, double sourceDepth, java.util.List<java.lang.Double> receiverDepths, Scatterer scatterer)
static void
configure(java.util.Properties toolProps)
static SimpleSeismicPhase
createPhase(java.lang.String name, TauModel tMod)
static SimpleSeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth)
static SimpleSeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth)
static SimpleSeismicPhase
createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth, boolean debug)
static java.util.List<SeismicPhase>
createSeismicPhases(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth, Scatterer scat, boolean debug)
static java.lang.String
endActionString(PhaseInteraction endAction)
static double
getMaxDiffraction()
static double
getMaxKmpsLaps()
static double
getMaxRefraction()
java.lang.String
getName()
protected static SimpleContigSeismicPhase
internalSumContigPhase(ProtoSeismicPhase proto)
static java.lang.Boolean
legIsPWave(java.lang.String currLeg)
static boolean[]
legsArePWave(java.util.ArrayList<java.lang.String> legs)
protected ProtoSeismicPhase
parseName(TauModel tMod, java.util.ArrayList<java.lang.String> legs)
Constructs a branch sequence from the given phase name and tau model.static void
setMaxDiffraction(double max)
static void
setMaxKmpsLaps(double max)
static void
setMaxRefraction(double max)
protected static SimpleSeismicPhase
sumBranches(TauModel tModA, ProtoSeismicPhase proto)
Sums the appropriate branches for this phase.
-
-
-
Field Detail
-
CRUST_MANTLE_FACTORY
public static final int CRUST_MANTLE_FACTORY
- See Also:
- Constant Field Values
-
OUTER_CORE_FACTOR
public static final int OUTER_CORE_FACTOR
- See Also:
- Constant Field Values
-
INNER_CORE_FACTORY
public static final int INNER_CORE_FACTORY
- See Also:
- Constant Field Values
-
maxRefraction
protected static double maxRefraction
The 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 maxDiffraction
The 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 Detail
-
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 SimpleSeismicPhase createPhase(java.lang.String name, TauModel tMod) throws TauModelException
- Throws:
TauModelException
-
createPhase
public static SimpleSeismicPhase createPhase(java.lang.String name, TauModel tMod, double sourceDepth) throws TauModelException
- Throws:
TauModelException
-
createPhase
public static SimpleSeismicPhase createPhase(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth) throws TauModelException
- Throws:
TauModelException
-
createPhase
public static SimpleSeismicPhase 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)
-
createSeismicPhases
public static java.util.List<SeismicPhase> createSeismicPhases(java.lang.String name, TauModel tMod, double sourceDepth, double receiverDepth, Scatterer scat, boolean debug) throws TauModelException
- Throws:
TauModelException
-
calculateSeismicPhases
public static java.util.List<SeismicPhase> calculateSeismicPhases(TauModel tMod, java.util.List<PhaseName> phaseNameList, double sourceDepth, java.util.List<java.lang.Double> receiverDepths, Scatterer scatterer) throws TauModelException
- Throws:
TauModelException
-
getName
public java.lang.String getName()
-
legIsPWave
public static java.lang.Boolean legIsPWave(java.lang.String currLeg)
-
legsArePWave
public static boolean[] legsArePWave(java.util.ArrayList<java.lang.String> legs)
-
parseName
protected ProtoSeismicPhase parseName(TauModel tMod, java.util.ArrayList<java.lang.String> legs) throws TauModelException
Constructs a branch sequence from the given phase name and tau model.- Throws:
TauModelException
-
calcBranchMultiplier
protected static int[][] calcBranchMultiplier(TauModel tMod, java.util.List<SeismicPhaseSegment> segmentList)
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
protected static SimpleSeismicPhase sumBranches(TauModel tModA, ProtoSeismicPhase proto) throws TauModelException
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.
-
internalSumContigPhase
protected static SimpleContigSeismicPhase internalSumContigPhase(ProtoSeismicPhase proto) throws TauModelException
- Throws:
TauModelException
-
calcBranchSeqForRayparam
public static java.util.List<TauBranch> calcBranchSeqForRayparam(ProtoSeismicPhase proto, double rp) throws TauModelException
- Throws:
TauModelException
-
calcBranchSeqForRayparam
public static java.util.List<TauBranch> calcBranchSeqForRayparam(ProtoSeismicPhase proto, double rp, SeismicPhaseSegment seg, SeismicPhaseSegment prevSeg) throws TauModelException
- Throws:
TauModelException
-
calcForIndex
public static TimeDist calcForIndex(ProtoSeismicPhase proto, int idx, int maxRayParamIndex, double[] rayParams)
-
calcPierceForIndex
public static java.util.List<TimeDist> calcPierceForIndex(ProtoSeismicPhase proto, int idx, int maxRayParamIndex, double[] rayParams)
-
calcStartBranch
public int calcStartBranch(ProtoSeismicPhase proto, java.lang.String currLeg)
-
endActionString
public static java.lang.String endActionString(PhaseInteraction endAction)
-
-