edu.sc.seis.TauP
Class SlownessLayer

java.lang.Object
  |
  +--edu.sc.seis.TauP.SlownessLayer
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class SlownessLayer
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Class to hold a single slowness layer sample.

See Also:
Serialized Form

Field Summary
 double botDepth
          Depth at the bottom of the layer.
 double botP
          Slowness at the bottom of the layer.
 double topDepth
          Depth at the top of the layer.
 double topP
          Slowness at the top of the layer.
 
Constructor Summary
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
 double bullenDepthFor(double rayParam, double radiusOfEarth)
          Finds the depth for a ray parameter within this layer.
 TimeDist bullenRadialSlowness(double p, double radiusOfEarth)
          Calculates the time and distance (in radians) increments accumulated by a ray of spherical ray parameter p when passing through this layer.
 java.lang.Object clone()
           
 double evaluateAt_bullen(double depth, double radiusOfEarth)
          Finds the slowness at the given depth.
 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

topP

public double topP
Slowness at the top of the layer.

botP

public double botP
Slowness at the bottom of the layer.

topDepth

public double topDepth
Depth at the top of the layer.

botDepth

public double botDepth
Depth at the bottom of the layer.
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

isZeroThickness

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

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.

bullenRadialSlowness

public TimeDist bullenRadialSlowness(double p,
                                     double radiusOfEarth)
                              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.

clone

public java.lang.Object clone()

toString

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

validate

public boolean validate()
                 throws SlownessModelException