|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sc.seis.TauP.SlownessModel
This class provides storage and methods for generating slowness-depth pairs.
Field Summary | |
protected boolean |
allowInnerCoreS
Should we allow J phases, S waves in the inner core? If true, then the slowness sampling for S will use the S velocity structure for the inner core. |
protected java.util.Vector |
criticalDepthVector
Stores the layer number for layers in the velocity model with a critical point at their top. |
boolean |
DEBUG
True to enable debugging output. |
protected java.util.Vector |
fluidLayerDepths
Stores depth ranges that are fluid, ie S velocity is zero. |
protected java.util.Vector |
highSlownessLayerDepthsP
Stores depth ranges that contains a high slowness zone for P. |
protected java.util.Vector |
highSlownessLayerDepthsS
Stores depth ranges that contains a high slowness zone for S. |
protected double |
maxDeltaP
Maximum difference between successive slowness samples. |
protected double |
maxDepthInterval
Maximum difference between successive depth samples, default is 115 km. |
protected double |
maxInterpError
|
protected double |
maxRangeInterval
Maximum difference between successive ranges, in radians. |
protected double |
minDeltaP
Minimum difference between successive slowness samples. |
protected java.util.Vector |
PLayers
Stores the final slowness-depth layers for P waves. |
static boolean |
PWAVE
Just useful for calling methods that need to know whether to use P or S waves. |
protected double |
radiusOfEarth
Radius of the Earth in km, usually input from the velocity model. |
protected java.util.Vector |
SLayers
Stores the final slowness-depth layers for S waves. |
protected double |
slownessTolerance
Tolerance for slownesses. |
static boolean |
SWAVE
Just useful for calling methods that need to know whether to use P or S waves. |
protected static int |
vectorLength
Initial length of the slowness vectors. |
boolean |
verbose
True to enable verbose output. |
protected VelocityModel |
vMod
Velocity Model used to get slowness model. |
Constructor Summary | |
SlownessModel()
|
Method Summary | |
protected void |
addSlowness(double p,
boolean isPWave)
Adds the given ray parameter, p, to the slowness sampling for the given waveType. |
TimeDist |
approxDistance(int slownessTurnLayer,
double p,
boolean isPWave)
generate approximate distance, in radians, for a ray from a surface source that turns at the bottom of the given slowness layer. |
java.lang.Object |
clone()
|
protected void |
coarseSample()
Creates a coarse slowness sampling of the velocity model (vMod). |
void |
createSample(VelocityModel velModel)
This method takes a velocity model and creates a vector containing slowness-depth layers that, hopefully, adequately sample both slowness and depth so that the travel time as a function of distance can be reconstructed from the theta function. |
protected void |
depthIncCheck()
Checks to make sure no slowness layer spans more than maxDepthInterval. |
boolean |
depthInFluid(double depth)
Determines if the given depth is contained within a fluid zone. |
boolean |
depthInFluid(double depth,
DepthRange fluidZoneDepth)
Determines if the given depth is contained within a fluid zone. |
boolean |
depthInHighSlowness(double depth,
double rayParam,
boolean isPWave)
Determines if the given depth and corresponding slowness is contained within a high slowness zone. |
boolean |
depthInHighSlowness(double depth,
double rayParam,
DepthRange highSZoneDepth,
boolean isPWave)
Determines if the given depth and corresponding slowness is contained within a high slowness zone. |
protected void |
distanceCheck()
Checks to make sure no slowness layer spans more than maxRangeInterval and that the (estimated) error due to linear interpolation is less than maxInterpError. |
protected void |
findCriticalPoints()
Finds all critical points within a velocity model. |
double |
findDepth(double rayParam,
boolean isPWave)
Finds a depth corresponding to a slowness over the whole VelocityModel. |
double |
findDepth(double rayParam,
double topDepth,
double botDepth,
boolean isPWave)
Finds a depth corresponding to a slowness between two given depths in the Velocity Model. |
double |
findDepth(double p,
int topCriticalLayer,
int botCriticalLayer,
boolean isPWave)
Finds a depth corresponding to a slowness between two given velocity layers, including the top and the bottom. |
protected void |
fixCriticalPoints()
Resets the slowness layers that correspond to critical points. |
CriticalDepth |
getCriticalDepth(int i)
|
DepthRange[] |
getHighSlowness(boolean isPWave)
|
double |
getMaxDeltaP()
|
double |
getMaxDepthInterval()
|
double |
getMaxInterpError()
gets the maximum value of the estimated error due to linear interpolation. |
double |
getMaxRangeInterval()
|
double |
getMinDeltaP()
|
double |
getMinRayParam(double depth,
boolean isPWave)
|
double |
getMinTurnRayParam(double depth,
boolean isPWave)
|
int |
getNumCriticalDepths()
|
int |
getNumLayers(boolean isPWave)
|
double |
getRadiusOfEarth()
|
protected SlownessLayer |
getSlownessLayer(int layerNum,
boolean isPWave)
Returns the SlownessLayer of the requested waveType. |
SlownessLayer |
getSlownessLayerClone(int layerNum,
boolean isPWave)
|
double |
getSlownessTolerance()
|
abstract double |
interpolate(double p,
double topVelocity,
double topDepth,
double slope)
|
boolean |
isAllowInnerCoreS()
|
int |
layerNumberAbove(double depth,
boolean isPWave)
Finds the index of the slowness layer that contains the given depth Note that if the depth is a layer boundary, it returns the shallower of the two or possibly more (since total reflections are zero thickness layers) layers. |
int |
layerNumberBelow(double depth,
boolean isPWave)
Finds the index of the slowness layer that contains the given depth Note that if the depth is a layer boundary, it returns the deeper of the two or possibly more (since total reflections are zero thickness layers) layers. |
abstract TimeDist |
layerTimeDist(double rayParam,
int layerNum,
boolean isPWave)
|
protected void |
rayParamIncCheck()
Checks to make sure that no slowness layer spans more than maxDeltaP. |
void |
setAllowInnerCoreS(boolean allowInnerCoreS)
|
void |
setMaxDeltaP(double maxDeltaP)
|
void |
setMaxDepthInterval(double maxDepthInterval)
|
void |
setMaxInterpError(double maxInterpError)
sets the maximum value of the estimated error due to linear interpolation. |
void |
setMaxRangeInterval(double maxRangeInterval)
sets the maximum range interval for surface focus turning waves between slowness samples, input in degrees. |
void |
setMinDeltaP(double minDeltaP)
|
void |
setRadiusOfEarth(double radiusOfEarth)
|
void |
setSlownessTolerance(double slownessTolerance)
|
SplitLayerInfo |
splitLayer(double depth,
boolean isPWave)
|
abstract double |
toSlowness(double velocity,
double depth)
|
abstract SlownessLayer |
toSlownessLayer(VelocityLayer vLayer,
boolean isPWave)
|
java.lang.String |
toString()
|
abstract double |
toVelocity(double slowness,
double depth)
|
boolean |
validate()
Performs consistency check on the slowness model. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public transient boolean DEBUG
public transient boolean verbose
protected double radiusOfEarth
protected VelocityModel vMod
protected java.util.Vector criticalDepthVector
CriticalDepth
protected java.util.Vector highSlownessLayerDepthsP
DepthRange
protected java.util.Vector highSlownessLayerDepthsS
DepthRange
protected java.util.Vector fluidLayerDepths
DepthRange
protected static int vectorLength
protected java.util.Vector PLayers
SlownessLayer
protected java.util.Vector SLayers
SlownessLayer
protected double minDeltaP
protected double maxDeltaP
protected double maxDepthInterval
protected double maxRangeInterval
radiusOfEarth
protected double maxInterpError
protected boolean allowInnerCoreS
minInnerCoreDepth
protected double slownessTolerance
public static final boolean PWAVE
public static final boolean SWAVE
Constructor Detail |
public SlownessModel()
Method Detail |
public void setRadiusOfEarth(double radiusOfEarth)
public void setMinDeltaP(double minDeltaP)
public void setMaxDeltaP(double maxDeltaP)
public void setMaxDepthInterval(double maxDepthInterval)
public void setMaxRangeInterval(double maxRangeInterval)
public void setMaxInterpError(double maxInterpError)
public void setAllowInnerCoreS(boolean allowInnerCoreS)
public void setSlownessTolerance(double slownessTolerance)
public final double getRadiusOfEarth()
public final double getMinDeltaP()
public final double getMaxDeltaP()
public final double getMaxDepthInterval()
public final double getMaxRangeInterval()
public final double getMaxInterpError()
public final boolean isAllowInnerCoreS()
public final double getSlownessTolerance()
public final int getNumCriticalDepths()
public final CriticalDepth getCriticalDepth(int i)
public final int getNumLayers(boolean isPWave)
public double getMinTurnRayParam(double depth, boolean isPWave) throws NoSuchLayerException, SlownessModelException
NoSuchLayerException
SlownessModelException
public double getMinRayParam(double depth, boolean isPWave) throws NoSuchLayerException, SlownessModelException
NoSuchLayerException
SlownessModelException
public DepthRange[] getHighSlowness(boolean isPWave)
public SlownessLayer getSlownessLayerClone(int layerNum, boolean isPWave)
protected SlownessLayer getSlownessLayer(int layerNum, boolean isPWave)
public abstract double toSlowness(double velocity, double depth) throws SlownessModelException
SlownessModelException
public abstract double toVelocity(double slowness, double depth) throws SlownessModelException
SlownessModelException
public abstract TimeDist layerTimeDist(double rayParam, int layerNum, boolean isPWave) throws SlownessModelException
SlownessModelException
public abstract SlownessLayer toSlownessLayer(VelocityLayer vLayer, boolean isPWave) throws SlownessModelException
SlownessModelException
public abstract double interpolate(double p, double topVelocity, double topDepth, double slope) throws SlownessModelException
SlownessModelException
public TimeDist approxDistance(int slownessTurnLayer, double p, boolean isPWave) throws NoSuchLayerException, SlownessModelException
NoSuchLayerException
- occurs if no layer in the
velocity model contains the given depth.
SlownessModelException
- occurs if getNumLayers() == 0 as
we cannot compute a distance without a
layer.public boolean depthInHighSlowness(double depth, double rayParam, boolean isPWave)
depthInHighSlowness.
public boolean depthInHighSlowness(double depth, double rayParam, DepthRange highSZoneDepth, boolean isPWave)
public boolean depthInFluid(double depth)
depthInFluid(double, DepthRange).
public boolean depthInFluid(double depth, DepthRange fluidZoneDepth)
public SplitLayerInfo splitLayer(double depth, boolean isPWave) throws SlownessModelException, NoSuchLayerException
SlownessModelException
NoSuchLayerException
protected void findCriticalPoints() throws SlownessModelException
NoSuchMatPropException
- occurs if wavetype is not
recognized.
SlownessModelException
- occurs if validate() returns
false, this indicates a bug in the code.public double findDepth(double rayParam, boolean isPWave) throws SlownessModelException
SlownessModelException
public double findDepth(double rayParam, double topDepth, double botDepth, boolean isPWave) throws SlownessModelException
SlownessModelException
public double findDepth(double p, int topCriticalLayer, int botCriticalLayer, boolean isPWave) throws SlownessModelException
SlownessModelException
- occurs if
topCriticalLayer > botCriticalLayer because there are no layers
to search, or if there is an increase in slowness, ie a negative
velocity gradient, that just balances the decrease in slowness due
to the spherical earth, or if the ray parameter p is not contained
within the specified layer range.public void createSample(VelocityModel velModel) throws SlownessModelException, NoSuchMatPropException, NoSuchLayerException
SlownessModelException
- occurs if the validation on the
velocity model fails, or if the velocity model
has no layers.
NoSuchMatPropException
- occurs if wavetype is not
recognized.
NoSuchLayerException
VelocityModel
protected void coarseSample() throws SlownessModelException, NoSuchLayerException
SlownessModelException
NoSuchLayerException
protected void rayParamIncCheck() throws SlownessModelException, NoSuchLayerException
SlownessModelException
NoSuchLayerException
protected void depthIncCheck() throws SlownessModelException, NoSuchLayerException
SlownessModelException
NoSuchLayerException
protected void distanceCheck() throws SlownessModelException, NoSuchMatPropException, NoSuchLayerException
SlownessModelException
NoSuchMatPropException
NoSuchLayerException
protected void addSlowness(double p, boolean isPWave) throws SlownessModelException, NoSuchLayerException
SlownessModelException
NoSuchLayerException
protected void fixCriticalPoints() throws NoSuchLayerException
NoSuchLayerException
public int layerNumberAbove(double depth, boolean isPWave) throws NoSuchLayerException
NoSuchLayerException
- occurs if no layer in the slowness
model contains the given depth.public int layerNumberBelow(double depth, boolean isPWave) throws NoSuchLayerException
NoSuchLayerException
- occurs if no layer in the slowness
model contains the given depth.public boolean validate() throws SlownessModelException
SlownessModelException
- if any check failspublic java.lang.Object clone()
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |