Class Arrival

  • Direct Known Subclasses:
    ScatteredArrival

    public class Arrival
    extends java.lang.Object
    convenience class for storing the parameters associated with a phase arrival.
    • Constructor Detail

      • Arrival

        public Arrival​(SeismicPhase phase,
                       double time,
                       double dist,
                       double rayParam,
                       int rayParamIndex,
                       double dRPdDist)
      • Arrival

        public Arrival​(SeismicPhase phase,
                       double time,
                       double dist,
                       double rayParam,
                       int rayParamIndex,
                       RayCalculateable searchDist,
                       java.lang.String name,
                       java.lang.String puristName,
                       double sourceDepth,
                       double receiverDepth,
                       double takeoffAngle,
                       double incidentAngle,
                       double dRPdDist)
    • Method Detail

      • sortArrivals

        public static java.util.List<Arrival> sortArrivals​(java.util.List<Arrival> arrivals)
      • getCommentLine

        public java.lang.String getCommentLine()
      • getPhase

        public SeismicPhase getPhase()
        Returns:
        the phase used to calculate this arrival.
      • getTime

        public double getTime()
        Returns:
        travel time in seconds
      • getDuration

        public java.time.Duration getDuration()
        Returns:
        travel time as a Duration
      • getDist

        public double getDist()
        returns travel distance in radians
      • getDistDeg

        public double getDistDeg()
        returns travel distance in degrees.
      • getModuloDist

        public double getModuloDist()
        returns distance in radians and in the range 0-PI. Note this may not be the actual distance traveled.
      • getModuloDistDeg

        public double getModuloDistDeg()
        returns distance in degrees and in the range 0-180. Note this may not be the actual distance traveled.
      • getSearchDistDeg

        public double getSearchDistDeg()
        returns search distance in degrees.
      • getModuloSearchDistDeg

        public double getModuloSearchDistDeg()
        returns search distance in degrees and in the range 0-180. Note this may not be the actual distance traveled.
      • isLongWayAround

        public boolean isLongWayAround()
      • getRayParam

        public double getRayParam()
        returns ray parameter in seconds per radian
      • getRayParamDeg

        public double getRayParamDeg()
        returns ray parameter in seconds per deg
      • getDRayParamDDelta

        public double getDRayParamDDelta()
      • getDRayParamDDeltaDeg

        public double getDRayParamDDeltaDeg()
      • getGeometricSpreadingFactor

        public double getGeometricSpreadingFactor()
                                           throws TauModelException
        Geometrical spreading factor. See Fundamentals of Modern Global Seismology, ch 13, eq 13.9. Note that eq 13.10 has divide by zero in case of a horizontal ray leaving the source.
        Throws:
        TauModelException
      • getReflTransSH

        public double getReflTransSH()
                              throws VelocityModelException,
                                     SlownessModelException
        Calculates the product of the reflection and transmission coefficients for all discontinuities along the path of this arrival for transverse, SH, waves. If any segment on the path is a P wave, the result will be zero. Note that this may not give accurate results for certain wave types, such as head or diffracted waves.
        Returns:
        Throws:
        VelocityModelException
        SlownessModelException
      • getIncidentAngle

        public double getIncidentAngle()
      • getTakeoffAngle

        public double getTakeoffAngle()
      • velocityAtSource

        public double velocityAtSource()
      • radialSlownessAtSource

        public double radialSlownessAtSource()
      • velocityAtReceiver

        public double velocityAtReceiver()
      • radialSlownessAtReceiver

        public double radialSlownessAtReceiver()
      • getRayParamIndex

        public int getRayParamIndex()
      • getName

        public java.lang.String getName()
        returns phase name
      • getPuristName

        public java.lang.String getPuristName()
        returns purist's version of name. Depths are changed to reflect the true depth of the interface.
      • getSourceDepth

        public double getSourceDepth()
        returns source depth in kilometers
      • getReceiverDepth

        public double getReceiverDepth()
        returns receiver (station) depth in kilometers
      • getShallowestPierce

        public TimeDist getShallowestPierce()
        returns shallowest point on path, in kilometers
      • getDeepestPierce

        public TimeDist getDeepestPierce()
        returns deepest point on path, in kilometers
      • getFurthestPierce

        public TimeDist getFurthestPierce()
        returns furthest distance point module pi/180 on path, in radians
      • getPierce

        public TimeDist[] getPierce()
        returns pierce points as TimeDist objects.
      • getPath

        public TimeDist[] getPath()
        returns path points as TimeDist objects.
      • negateDistance

        public Arrival negateDistance()
        Negates the arrival distance. Primarily used when printing a scatter arrival that is at negative distance. No other fields are changed.
        Returns:
        new Arrival with dist and search dist negated
      • isRelativeToArrival

        public boolean isRelativeToArrival()
      • getRelativeToArrival

        public Arrival getRelativeToArrival()
      • setRelativeToArrival

        public void setRelativeToArrival​(Arrival relativeToArrival)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getSourceTimeDist

        public TimeDist getSourceTimeDist()
        Create TimeDist point for source, first point in pierce or path.
      • getNumPiercePoints

        public int getNumPiercePoints()
      • getNumPathPoints

        public int getNumPathPoints()
      • getPiercePoint

        public TimeDist getPiercePoint​(int i)
      • getFirstPiercePoint

        public TimeDist getFirstPiercePoint​(double depth)
        finds the first pierce point at the given depth.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if depth is not found
      • getLastPiercePoint

        public TimeDist getLastPiercePoint​(double depth)
        finds the last pierce point at the given depth.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - if depth is not found
      • getEarliestArrival

        public static Arrival getEarliestArrival​(java.util.List<Arrival> arrivals)
      • getLatestArrival

        public static Arrival getLatestArrival​(java.util.List<Arrival> arrivals)
      • writeJSON

        public void writeJSON​(java.io.PrintWriter pw,
                              java.lang.String indent)
      • asJSONObject

        public org.json.JSONObject asJSONObject()
      • isLatLonable

        public boolean isLatLonable()
      • getLatLonable

        public LatLonable getLatLonable()