Class SlownessLayer

  • All Implemented Interfaces:
    java.io.Serializable

    public class SlownessLayer
    extends java.lang.Object
    implements java.io.Serializable
    Class to hold a single slowness layer sample.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SlownessLayer​(double topP, double topDepth, double botP, double botDepth)
      top slowness, top depth, bottom slowness, bottom depth
      SlownessLayer​(VelocityLayer vLayer, boolean isPWave)
      Compute the slowness layer from a velocity layer.
      SlownessLayer​(VelocityLayer vLayer, boolean isPWave, double radiusOfEarth)
      Compute the slowness layer from a velocity layer.
      SlownessLayer​(VelocityLayer vLayer, boolean spherical, double radiusOfEarth, boolean isPWave)
      Compute the slowness layer from a velocity layer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.json.JSONObject asJSON()  
      double bullenDepthFor​(double rayParam, double radiusOfEarth)
      Finds the depth for a ray parameter within this layer.
      TimeDist bullenRadialSlowness​(double p, double radiusOfEarth, boolean downgoing)
      Calculates the time and distance (in radians) increments accumulated by a ray of spherical ray parameter p when passing through this layer.
      boolean containsDepth​(double depth)  
      double evaluateAt_bullen​(double depth, double radiusOfEarth)
      Finds the slowness at the given depth.
      double getBotDepth()  
      double getBotP()  
      double getTopDepth()  
      double getTopP()  
      boolean isZeroThickness()
      Is the layer a zero thickness layer, ie a total reflection?
      java.lang.String toString()
      returns a String description of this SlownessLayer.
      boolean validate()  
      • Methods inherited from class java.lang.Object

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

      • SlownessLayer

        public SlownessLayer​(double topP,
                             double topDepth,
                             double botP,
                             double botDepth)
        top slowness, top depth, bottom slowness, bottom depth
      • SlownessLayer

        public SlownessLayer​(VelocityLayer vLayer,
                             boolean spherical,
                             double radiusOfEarth,
                             boolean isPWave)
        Compute the slowness layer from a velocity layer.
      • SlownessLayer

        public SlownessLayer​(VelocityLayer vLayer,
                             boolean isPWave,
                             double radiusOfEarth)
        Compute the slowness layer from a velocity layer. Since radiusOfEarth is given we assume a spherical model.
      • SlownessLayer

        public SlownessLayer​(VelocityLayer vLayer,
                             boolean isPWave)
        Compute the slowness layer from a velocity layer. Since radiusOfEarth is not given we assume a flat model.
    • Method Detail

      • asJSON

        public org.json.JSONObject asJSON()
      • getTopP

        public double getTopP()
      • getBotP

        public double getBotP()
      • getTopDepth

        public double getTopDepth()
      • getBotDepth

        public double getBotDepth()
      • isZeroThickness

        public boolean isZeroThickness()
        Is the layer a zero thickness layer, ie a total reflection?
      • containsDepth

        public boolean containsDepth​(double depth)
      • evaluateAt_bullen

        public double evaluateAt_bullen​(double depth,
                                        double radiusOfEarth)
                                 throws SlownessModelException
        Finds the slowness at the given depth. radiusOfEarth is needed as a slowness layer doesn't have access to the slowness model. Note that this method assumes a Bullen type of slowness interpolation, ie p(r) = a*r^b. This will produce results consistent with a tau model that uses this interpolant, but it may differ slightly from going directly to the velocity model. Also, if the tau model is generated using another interpolant, linear for instance, then the result may not be consistent with the tau model.
        Throws:
        SlownessModelException
      • bullenRadialSlowness

        public TimeDist bullenRadialSlowness​(double p,
                                             double radiusOfEarth,
                                             boolean downgoing)
                                      throws SlownessModelException
        Calculates the time and distance (in radians) increments accumulated by a ray of spherical ray parameter p when passing through this layer. Note that this gives 1/2 of the true range and time increments since there will be both an up going and a downgoing path. Here we use the Mohorovicic or Bullen law p=A*r^B
        Throws:
        SlownessModelException - occurs if the calculated distance or time increments are negative or NaN, this indicates a bug in the code (and hopefully will never happen).
      • bullenDepthFor

        public double bullenDepthFor​(double rayParam,
                                     double radiusOfEarth)
                              throws SlownessModelException
        Finds the depth for a ray parameter within this layer. Uses a Bullen interpolant, Ar^B. Special case for botP == 0 or botDepth == radiusOfEarth as these cause div by 0, use linear interpolation in this case.
        Throws:
        SlownessModelException
      • toString

        public java.lang.String toString()
        returns a String description of this SlownessLayer.
        Overrides:
        toString in class java.lang.Object