Package edu.sc.seis.TauP
Class LegPuller
- java.lang.Object
-
- edu.sc.seis.TauP.LegPuller
-
public class LegPuller extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
bodyWave
static java.lang.String
headDiffRE
static java.lang.String
interactPointsRE
static java.lang.String
interactPrefix
static java.lang.String
number
static java.util.regex.Pattern
phaseRegEx
static java.lang.String
scatterWave
static java.lang.String
surfaceWave
static java.lang.String
travelLeg
static java.lang.String
travelSuffix
-
Constructor Summary
Constructors Constructor Description LegPuller()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
closestBranchToDepth(TauModel tMod, java.lang.String depthString)
Finds the closest discontinuity to the given depth that can have reflections and phase transformations.static java.lang.String
createPuristName(TauModel tMod, java.util.List<java.lang.String> legs)
static java.lang.String
extractBoundaryId(java.lang.String name, int offset, boolean allowHeadDiff)
static int
extractPhaseBoundaryInteraction(java.lang.String name, int offset, int phaseCharLength, java.util.List<java.lang.String> legs)
static boolean
isBoundary(java.lang.String leg)
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 java.lang.String
phaseValidate(java.util.ArrayList<java.lang.String> legs)
Performs consistency checks on the previously tokenized phase name stored in legs.static boolean
regExCheck(java.lang.String name)
-
-
-
Field Detail
-
number
public static final java.lang.String number
- See Also:
- Constant Field Values
-
travelSuffix
public static final java.lang.String travelSuffix
- See Also:
- Constant Field Values
-
headDiffRE
public static final java.lang.String headDiffRE
- See Also:
- Constant Field Values
-
travelLeg
public static final java.lang.String travelLeg
- See Also:
- Constant Field Values
-
interactPrefix
public static final java.lang.String interactPrefix
- See Also:
- Constant Field Values
-
interactPointsRE
public static final java.lang.String interactPointsRE
- See Also:
- Constant Field Values
-
surfaceWave
public static final java.lang.String surfaceWave
- See Also:
- Constant Field Values
-
bodyWave
public static final java.lang.String bodyWave
- See Also:
- Constant Field Values
-
scatterWave
public static final java.lang.String scatterWave
- See Also:
- Constant Field Values
-
phaseRegEx
public static final java.util.regex.Pattern phaseRegEx
-
-
Method Detail
-
regExCheck
public static boolean regExCheck(java.lang.String name)
-
legPuller
protected static java.util.ArrayList<java.lang.String> legPuller(java.lang.String name) throws PhaseParseException
Tokenizes a phase name into legs, ie PcS becomes 'P'+'c'+'S' while p^410P would become 'p'+'^410'+'P'. Once a phase name has been broken into tokens we can begin to construct the sequence of branches to which it corresponds. Only minor error checking is done at this point, for instance pIP generates an exception but ^410 doesn't. It also appends "END" as the last leg.- Throws:
PhaseParseException
- if the phase name cannot be tokenized.
-
extractPhaseBoundaryInteraction
public static int extractPhaseBoundaryInteraction(java.lang.String name, int offset, int phaseCharLength, java.util.List<java.lang.String> legs) throws PhaseParseException
- Throws:
PhaseParseException
-
extractBoundaryId
public static java.lang.String extractBoundaryId(java.lang.String name, int offset, boolean allowHeadDiff) throws PhaseParseException
- Throws:
PhaseParseException
-
isBoundary
public static boolean isBoundary(java.lang.String leg)
-
closestBranchToDepth
public static int closestBranchToDepth(TauModel tMod, java.lang.String depthString)
Finds the closest discontinuity to the given depth that can have reflections and phase transformations.- Returns:
- the branch number with the closest top depth.
-
createPuristName
public static java.lang.String createPuristName(TauModel tMod, java.util.List<java.lang.String> legs)
-
phaseValidate
public static java.lang.String phaseValidate(java.util.ArrayList<java.lang.String> legs)
Performs consistency checks on the previously tokenized phase name stored in legs. Returns null if all is ok, a message if there is a problem.
-
-