Class SimpleContigSeismicPhase

  • All Implemented Interfaces:
    SeismicPhase, java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    FailedSeismicPhase

    public class SimpleContigSeismicPhase
    extends SimpleSeismicPhase
    Stores and transforms seismic phase names to and from their corresponding sequence of branches.
    See Also:
    Serialized Form
    • Field Detail

      • DEBUG

        public transient boolean DEBUG
        Enables debugging output.
      • verbose

        public transient boolean verbose
        Enables verbose output.
      • tMod

        protected TauModel tMod
        TauModel to generate phase for.
      • sourceDepth

        protected double sourceDepth
        The source depth within the TauModel that was used to generate this phase.
      • receiverDepth

        protected double receiverDepth
        The receiver depth within the TauModel that was used to generate this phase. Normally this is 0.0 for a surface stations, but can be different for borehole or scattering calculations.
      • dist

        protected double[] dist
        Array of distances corresponding to the ray parameters stored in rayParams.
      • time

        protected double[] time
        Array of times corresponding to the ray parameters stored in rayParams.
      • rayParams

        protected double[] rayParams
        Array of possible ray parameters for this phase.
      • minRayParam

        protected double minRayParam
        Minimum ray parameter that exists for this phase.
      • maxRayParam

        protected double maxRayParam
        Maximum ray parameter that exists for this phase.
      • maxRayParamIndex

        protected int maxRayParamIndex
        Index within TauModel.rayParams that corresponds to maxRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index.
      • minRayParamIndex

        protected int minRayParamIndex
        Index within TauModel.rayParams that corresponds to minRayParam. Note that maxRayParamIndex < minRayParamIndex as ray parameter decreases with increasing index.
      • minDistance

        protected double minDistance
        The minimum distance that this phase can be theoretically observed.
      • maxDistance

        protected double maxDistance
        The maximum distance that this phase can be theoretically observed.
      • name

        protected java.lang.String name
        The phase name, ie PKiKP.
      • puristName

        protected java.lang.String puristName
        name with depths corrected to be actuall discontinuities in the model.
      • refineDistToleranceRadian

        protected double refineDistToleranceRadian
      • maxRecursion

        protected int maxRecursion
        Maximum recursion for refine arrival.
    • Constructor Detail

      • SimpleContigSeismicPhase

        public SimpleContigSeismicPhase​(ProtoSeismicPhase proto,
                                        double[] rayParams,
                                        double[] time,
                                        double[] dist,
                                        double minRayParam,
                                        double maxRayParam,
                                        int minRayParamIndex,
                                        int maxRayParamIndex,
                                        double minDistance,
                                        double maxDistance,
                                        boolean debug)
    • Method Detail

      • phasesExistsInModel

        public boolean phasesExistsInModel()
      • getEarliestArrival

        public Arrival getEarliestArrival​(double degrees)
      • getTauModel

        public TauModel getTauModel()
      • getMinDistanceDeg

        public double getMinDistanceDeg()
      • getMinDistance

        public double getMinDistance()
      • getMaxDistanceDeg

        public double getMaxDistanceDeg()
      • getMaxDistance

        public double getMaxDistance()
      • getMaxRayParam

        public double getMaxRayParam()
      • getMinRayParam

        public double getMinRayParam()
      • getMaxRayParamIndex

        public int getMaxRayParamIndex()
      • getMinRayParamIndex

        public int getMinRayParamIndex()
      • getMinTime

        public double getMinTime()
      • getMaxTime

        public double getMaxTime()
      • isFail

        public boolean isFail()
      • failReason

        public java.lang.String failReason()
      • getName

        public java.lang.String getName()
      • getPuristName

        public java.lang.String getPuristName()
      • getSourceDepth

        public double getSourceDepth()
      • getReceiverDepth

        public double getReceiverDepth()
      • getListPhaseSegments

        public java.util.List<java.util.List<SeismicPhaseSegment>> getListPhaseSegments()
      • getPhaseSegments

        public java.util.List<SeismicPhaseSegment> getPhaseSegments()
        Description of segments of the phase.
      • countFlatLegs

        public int countFlatLegs()
      • getRayParams

        public double getRayParams​(int i)
      • getRayParams

        public double[] getRayParams()
      • getDist

        public double getDist​(int i)
      • getDist

        public double[] getDist()
      • getTime

        public double getTime​(int i)
      • getTime

        public double[] getTime()
      • getTau

        public double getTau​(int i)
      • getTau

        public double[] getTau()
      • hasArrivals

        public boolean hasArrivals()
      • getShadowZones

        public java.util.List<ShadowZone> getShadowZones()
      • calcTimeExactDistance

        public java.util.List<Arrival> calcTimeExactDistance​(double searchDist)
        Calculates arrivals for this phase, but only for the exact distance in radians. This does not check multiple laps nor going the long way around.
        Specified by:
        calcTimeExactDistance in class SimpleSeismicPhase
      • createArrivalAtIndex

        public Arrival createArrivalAtIndex​(int rayNum)
        Creates an Arrival for a sampled ray parameter from the model. No interpolation between rays as this is a sample.
        Parameters:
        rayNum -
        Returns:
      • refineArrival

        public Arrival refineArrival​(int rayNum,
                                     double distRadian,
                                     double distTolRadian,
                                     int maxRecursion)
      • refineArrival

        public Arrival refineArrival​(Arrival leftEstimate,
                                     Arrival rightEstimate,
                                     double searchDist,
                                     double distTolRadian,
                                     int maxRecursion)
      • interpolateSimplePhase

        public SimpleContigSeismicPhase interpolateSimplePhase​(double maxDeltaDeg)
        Interpolates the time-dist arrays so adjacent rays are no more than maxDeltaDeg apart.
        Specified by:
        interpolateSimplePhase in class SimpleSeismicPhase
        Parameters:
        maxDeltaDeg - max separation in degrees
        Returns:
        new phase interpolated
      • velocityAtSource

        public double velocityAtSource()
      • velocityAtReceiver

        public double velocityAtReceiver()
      • densityAtSource

        public double densityAtSource()
      • densityAtReceiver

        public double densityAtReceiver()
      • calcTakeoffAngleDegree

        public double calcTakeoffAngleDegree​(double arrivalRayParam)
      • calcTakeoffAngle

        public double calcTakeoffAngle​(double arrivalRayParam)
      • calcIncidentAngleDegree

        public double calcIncidentAngleDegree​(double arrivalRayParam)
      • calcIncidentAngle

        public double calcIncidentAngle​(double arrivalRayParam)
      • sourceSegmentIsPWave

        public boolean sourceSegmentIsPWave()
        Description copied from interface: SeismicPhase
        True if the initial leg, leaving the source, wavetype is a P wave, false if an S wave.
      • finalSegmentIsPWave

        public boolean finalSegmentIsPWave()
        Description copied from interface: SeismicPhase
        True if the final, incident, wavetype is a P wave, false if an S wave.
      • calcTstar

        public double calcTstar​(Arrival currArrival)
      • getNumRays

        public int getNumRays()
      • isAllPWave

        public boolean isAllPWave()
        True is all segments of this path are only P waves.
        Returns:
      • isAllSWave

        public boolean isAllSWave()
        True is all segments of this path are only S waves.
        Returns:
      • removeDuplicatePathPoints

        public static java.util.List<TimeDist> removeDuplicatePathPoints​(java.util.List<TimeDist> inPath)
      • describe

        public java.lang.String describe()
      • describeShort

        public java.lang.String describeShort()
      • toString

        public java.lang.String toString()
        Specified by:
        toString in interface SeismicPhase
        Overrides:
        toString in class java.lang.Object
      • dump

        public void dump()