Package edu.sc.seis.TauP
Class LegPuller
java.lang.Object
edu.sc.seis.TauP.LegPuller
Converts a seismic phase name like PKiKP into a list of tokens P K i K P
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final doublestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Patternstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intclosestDisconBranchToDepth(TauModel tMod, String depthString) Finds the closest discontinuity to the given depth that can have reflections and phase transformations.static intclosestDisconBranchToDepth(TauModel tMod, String depthString, double tolerance) static StringcreatePuristName(TauModel tMod, List<String> legs) static StringextractBoundaryId(String name, int offset, boolean includeHeadDiff) static intextractPhaseBoundaryInteraction(String name, int offset, int phaseCharLength, List<String> legs) static booleanisBoundary(String leg) Tests if the leg is a model boundary, like m, c, i or a number as a depth like 410static DoublelegAsDepthBoundary(TauModel tMod, String leg) Converts leg name to depth, if is a number (depth) or m, c, i.Tokenizes a phase name into legs, ie PcS becomes 'P'+'c'+'S' while p^410P would become 'p'+'^410'+'P'.static StringphaseValidate(ArrayList<String> legs) Performs consistency checks on the previously tokenized phase name stored in legs.static booleanregExCheck(String name) check against regex for coarse validation.
-
Field Details
-
number
- See Also:
-
customDiscon
- See Also:
-
discon
- See Also:
-
travelSuffix
- See Also:
-
headDiffRE
- See Also:
-
namedHeadDiffRE
- See Also:
-
upDiffRE
- See Also:
-
travelLeg
- See Also:
-
interactPrefix
- See Also:
-
interactPointsRE
- See Also:
-
surfaceWave
- See Also:
-
bodyWave
- See Also:
-
scatterWave
- See Also:
-
phaseRegEx
-
DISCON_DEPTH_TOLERANCE
public static final double DISCON_DEPTH_TOLERANCE- See Also:
-
-
Constructor Details
-
LegPuller
public LegPuller()
-
-
Method Details
-
regExCheck
check against regex for coarse validation. currently disabled as regex has issues and is really big- Parameters:
name-- Returns:
-
legPuller
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(String name, int offset, int phaseCharLength, List<String> legs) throws PhaseParseException - Throws:
PhaseParseException
-
extractBoundaryId
public static String extractBoundaryId(String name, int offset, boolean includeHeadDiff) throws PhaseParseException - Throws:
PhaseParseException
-
isBoundary
Tests if the leg is a model boundary, like m, c, i or a number as a depth like 410- Parameters:
leg- leg name- Returns:
- true if a boundary
-
legAsDepthBoundary
Converts leg name to depth, if is a number (depth) or m, c, i. Null otherwise. -
closestDisconBranchToDepth
Finds the closest discontinuity to the given depth that can have reflections and phase transformations. May return 1 past total number of branchs if depth is center of earth or -1 if no layer is within 10 km of depth as a number.- Returns:
- the branch number with the closest top depth.
-
closestDisconBranchToDepth
-
createPuristName
-
phaseValidate
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.
-