Class TauP_AbstractPhaseTool

    • Field Detail

      • phaseNames

        protected java.util.List<PhaseName> phaseNames
        names of phases to be used, ie PKIKP.
    • Method Detail

      • getRadiusOfEarth

        public double getRadiusOfEarth()
      • setPhaseNameList

        public void setPhaseNameList​(java.util.List<PhaseName> phaseNames)
      • extractPhaseNames

        public static java.util.List<java.lang.String> extractPhaseNames​(java.lang.String phaseNames)
        Parse comma separated list of phase names, expanding convience phase names like ttp into real phase names.
        Parameters:
        phaseNames - string to parse
        Returns:
        parsed list of phase names
      • splitPhaseNameList

        public static java.lang.String[] splitPhaseNameList​(java.lang.String phaseList)
      • linearInterp

        public static double linearInterp​(double xa,
                                          double ya,
                                          double xb,
                                          double yb,
                                          double x)
        solves the equation (yb-ya)/(xb-xa) = (y-ya)/(x-xa) for y given x. Useful for finding the pixel for a value given the dimension of the area and the range of values it is supposed to cover. Note, this does not check for xa == xb, in which case a divide by zero would occur.
      • baseResultAsJSONObject

        public static org.json.JSONObject baseResultAsJSONObject​(java.lang.String modelName,
                                                                 double depth,
                                                                 double receiverDepth,
                                                                 java.lang.String[] phases)
      • getPhaseNames

        @Deprecated
        public java.lang.String[] getPhaseNames()
        Deprecated.
      • getPhaseNameString

        @Deprecated
        public java.lang.String getPhaseNameString()
        Deprecated.
      • setPhaseNames

        @Deprecated
        public void setPhaseNames​(PhaseName[] phaseNames)
        Deprecated.
      • getNumPhases

        public int getNumPhases()
      • clearPhaseNames

        public void clearPhaseNames()
      • getSourceDepth

        @Deprecated
        public double getSourceDepth()
        Deprecated.
      • setSourceDepth

        public void setSourceDepth​(double depth)
      • getReceiverDepth

        public double getReceiverDepth()
      • setReceiverDepth

        public void setReceiverDepth​(double receiverDepth)
      • getScattererDepth

        public double getScattererDepth()
      • getScatterer

        public Scatterer getScatterer()
      • setScatterer

        public void setScatterer​(Scatterer scatterer)
      • getTauModelName

        public java.lang.String getTauModelName()
      • setModelName

        public void setModelName​(java.lang.String modelName)
      • setTauModel

        public void setTauModel​(TauModel tMod)
      • clearPhases

        public void clearPhases()
      • readPhaseFile

        protected java.util.List<java.lang.String> readPhaseFile​(java.lang.String filename)
                                                          throws java.io.IOException
        Reads in list of phase names from a text file. So long as each phase name is separated by some whitespace, " " or newline or tab, it should read them fine. Also, comments are allowed, either # or // are comments to the end of the line while c style slash-star make a block a comment.
        Returns:
        Throws:
        java.io.IOException
      • parsePhaseList

        public java.util.List<PhaseName> parsePhaseList​(java.lang.String phaseList)
        parses a comma separated list of phase names and adds them to the phaseNames vector. Each phase can have an optional argument after a dash. This would be used for specifying which sac header to put the time in, or for other unforeseen uses. This may be called multiple times to append more phases. For example: P-0,PcP-1,ScP-4,Sn,SS,S^410S would, assuming no previous phases have been added, put P in T0, PcP in T1, ScP in T5, Sn in T2, SS in T3, and S^410S in T6.
        Returns:
      • recalcPhases

        protected void recalcPhases()
                             throws TauModelException
        recalculates the given phases using a possibly new or changed tau model. This should not need to be called by outside classes as it is called by depthCorrect, and calculate.
        Throws:
        TauModelException
      • getPhaseUsage

        public java.lang.String getPhaseUsage()