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)
      • baseResultAsJSONObject

        public static org.json.JSONObject baseResultAsJSONObject​(java.lang.String modelName,
                                                                 java.util.List<java.lang.Double> depth,
                                                                 java.util.List<java.lang.Double> receiverDepth,
                                                                 java.util.List<PhaseName> phaseNameList)
      • getPhaseNamesAsString

        public java.lang.String getPhaseNamesAsString()
      • appendPhaseName

        public void appendPhaseName​(PhaseName phaseName)
      • getNumPhases

        public int getNumPhases()
      • clearPhaseNames

        public void clearPhaseNames()
      • setSingleSourceDepth

        public void setSingleSourceDepth​(double depth)
      • setReceiverDepth

        public void setReceiverDepth​(double receiverDepth)
      • setSingleReceiverDepth

        public void setSingleReceiverDepth​(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()
      • calcSeismicPhases

        public java.util.List<SeismicPhase> calcSeismicPhases​(double sourceDepth)
                                                       throws TauPException
        Calculates the seismic phases using a possibly new or changed tau model for the given source depth.
        Throws:
        TauPException
      • 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: