public class TauBranch
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
boolean |
DEBUG
Turns on debugging output.
|
protected double[] |
dist
Holds distance (radians) evaluated at the ith ray parameter for this
branch.
|
protected boolean |
isPWave
The type of wave for this branch, P or S.
|
protected double[] |
tau
Holds tau evaluated at the ith ray parameter for this branch.
|
protected double[] |
time
Holds time (seconds) evaluated at the ith ray parameter for this branch.
|
Constructor and Description |
---|
TauBranch(boolean isPWave,
double topDepth,
double botDepth,
double maxRayParam,
double minTurnRayParam,
double minRayParam,
double[] dist,
double[] time,
double[] tau) |
TauBranch(double topDepth,
double botDepth,
boolean isPWave) |
Modifier and Type | Method and Description |
---|---|
TimeDist |
calcTimeDist(SlownessModel sMod,
int topLayerNum,
int botLayerNum,
double p)
calculates the time and distance increments for the given ray parameter.
|
TimeDist |
calcTimeDist(SlownessModel sMod,
int topLayerNum,
int botLayerNum,
double p,
boolean allowTurnInLayer) |
TauBranch |
clone()
Returns a clone of this TauBranch object.
|
void |
createBranch(SlownessModel sMod,
double minPSoFar,
double[] rayParams)
Calculates tau for this branch, between slowness layers topLayerNum and
botLayerNum, inclusive.
|
protected TauBranch |
difference(TauBranch topBranch,
int indexP,
int indexS,
SlownessModel sMod,
double minPSoFar,
double[] rayParams)
generates a new tau branch by "subtracting" the given tau branch from
this tau branch.
|
double |
getBotDepth() |
double[] |
getDist() |
double |
getDist(int i) |
double |
getMaxRayParam() |
double |
getMinRayParam() |
double |
getMinTurnRayParam() |
double[] |
getTau() |
double |
getTau(int i) |
double[] |
getTime() |
double |
getTime(int i) |
double |
getTopDepth() |
protected void |
insert(double rayParam,
SlownessModel sMod,
int index)
Inserts the distance, time, and tau increment for the slowness sample
given to the branch.
|
TimeDist[] |
path(double rayParam,
boolean downgoing,
SlownessModel sMod) |
static TauBranch |
readFromStream(java.io.DataInputStream dis) |
void |
shiftBranch(int index) |
java.lang.String |
toString() |
void |
writeToStream(java.io.DataOutputStream dos) |
public transient boolean DEBUG
protected boolean isPWave
protected double[] dist
protected double[] time
protected double[] tau
public TauBranch(boolean isPWave, double topDepth, double botDepth, double maxRayParam, double minTurnRayParam, double minRayParam, double[] dist, double[] time, double[] tau)
public TauBranch(double topDepth, double botDepth, boolean isPWave)
public double getTopDepth()
public double getBotDepth()
public double getMaxRayParam()
public double getMinTurnRayParam()
public double getMinRayParam()
public double[] getDist()
public double getDist(int i)
public double[] getTime()
public double getTime(int i)
public double[] getTau()
public double getTau(int i)
public void createBranch(SlownessModel sMod, double minPSoFar, double[] rayParams) throws NoSuchLayerException, SlownessModelException, TauModelException
NoSuchLayerException
- if a needed slowness layer cannot be found.SlownessModelException
- if there is a problem with the slowness modelTauModelException
- if the slownessmodel and taumodel are not compatiblepublic TimeDist calcTimeDist(SlownessModel sMod, int topLayerNum, int botLayerNum, double p) throws NoSuchLayerException, SlownessModelException
NoSuchLayerException
- if topLayerNum or botLayerNum are not in the slowness
model.SlownessModelException
- if the ray with ray parameter p turns within a layer
instead of at the bottom.public TimeDist calcTimeDist(SlownessModel sMod, int topLayerNum, int botLayerNum, double p, boolean allowTurnInLayer) throws NoSuchLayerException, SlownessModelException
protected void insert(double rayParam, SlownessModel sMod, int index) throws NoSuchLayerException, SlownessModelException, TauModelException
TauModelException
- if the tau branch is not compatable with the slowness
sampling
see edu.sc.seis.TauP.TauModel.depthCorrect(double)NoSuchLayerException
SlownessModelException
protected TauBranch difference(TauBranch topBranch, int indexP, int indexS, SlownessModel sMod, double minPSoFar, double[] rayParams) throws NoSuchLayerException, SlownessModelException, TauModelException
public void shiftBranch(int index)
public TimeDist[] path(double rayParam, boolean downgoing, SlownessModel sMod) throws SlownessModelException
SlownessModelException
public void writeToStream(java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public static TauBranch readFromStream(java.io.DataInputStream dis) throws java.io.IOException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public TauBranch clone()
clone
in class java.lang.Object
Cloneable
public java.lang.String toString()
toString
in class java.lang.Object