Class LegPuller


  • public class LegPuller
    extends java.lang.Object
    • 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)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LegPuller

        public LegPuller()
    • 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
      • 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.