public class TauP_Time extends TauP_Tool
Modifier and Type | Field and Description |
---|---|
protected java.util.List<Arrival> |
arrivals |
protected double |
azimuth |
protected double |
backAzimuth |
protected double |
degrees |
protected double |
depth |
protected double |
distKilometers
For when command line args uses --km for distance.
|
protected double |
eventLat |
protected double |
eventLon |
protected boolean |
GUI |
protected java.lang.String |
modelName |
protected boolean |
onlyPrintRayP |
protected boolean |
onlyPrintTime |
protected java.util.List<PhaseName> |
phaseNames
names of phases to be used, ie PKIKP.
|
protected double |
receiverDepth |
protected Arrival |
relativeArrival |
protected java.lang.String |
relativePhaseName |
protected double |
stationLat |
protected double |
stationLon |
protected double |
takeoffAngle |
protected TauModel |
tMod
Tau model calculated previously.
|
protected TauModel |
tModDepth
TauModel derived from tMod by correcting it for a non-surface source.
|
Constructor and Description |
---|
TauP_Time() |
TauP_Time(java.lang.String modelName)
creates a TauP_Time object with the tau model specified by modelName
already loaded.
|
TauP_Time(TauModel tMod) |
Modifier and Type | Method and Description |
---|---|
void |
appendPhaseName(PhaseName phaseName) |
void |
appendPhaseName(java.lang.String phaseName) |
void |
calcTakeoff(double takeoffAngle) |
void |
calcTime(double degrees) |
void |
calculate(double degrees) |
void |
clearArrivals() |
void |
clearPhaseNames() |
void |
clearPhases() |
void |
depthCorrect(double depth)
Deprecated.
use setSourceDepth instead
|
void |
depthCorrect(double depth,
double receiverDepth)
In general, this is called by each tool's calculate methods, and so should
not need to be called by outside code.
|
void |
destroy() |
Arrival |
getArrival(int i) |
java.util.List<Arrival> |
getArrivals() |
double[] |
getDisconDepths() |
int |
getNumArrivals() |
int |
getNumPhases() |
java.lang.String[] |
getPhaseNames() |
static java.util.List<java.lang.String> |
getPhaseNames(java.lang.String phaseName) |
java.lang.String |
getPhaseNameString() |
double |
getReceiverDepth() |
java.util.List<SeismicPhase> |
getSeismicPhases() |
double |
getSourceDepth() |
TauModel |
getTauModel() |
TauModel |
getTauModelDepthCorrected()
Gets depth corrected TauModel.
|
java.lang.String |
getTauModelName() |
void |
init()
preforms intialization of the tool.
|
static double |
linearInterp(double xa,
double ya,
double xb,
double yb,
double x)
solves the equation (yb-ya)/(xb-xa) = (y-ya)/(x-xa) for y given x.
|
void |
loadTauModel(java.lang.String modelName) |
static void |
main(java.lang.String[] args)
Allows TauP_Time to run as an application.
|
protected java.lang.String[] |
parseCmdLineArgs(java.lang.String[] origArgs) |
static java.util.List<java.lang.Double> |
parseDegreeList(java.lang.String degList)
Parses a comma separated list of distances and returns them in an array.
|
void |
parsePhaseList(java.lang.String phaseList)
parses a comma separated list of phase names and adds them to the
phaseNames vector.
|
void |
printHelp() |
void |
printResult(java.io.PrintWriter out) |
void |
printResultJSON(java.io.PrintWriter out) |
void |
printResultText(java.io.PrintWriter out) |
void |
printStdUsage()
Prints the command line arguments common to all TauP tools.
|
void |
printStdUsageHead() |
void |
printUsage() |
protected void |
readPhaseFile(java.lang.String filename)
Reads in list of phase names from a text file.
|
protected void |
readTauModel()
Reads the velocity model, slowness model, and tau model from a file saved
using Java's Serializable interface.
|
protected void |
recalcPhases()
recalculates the given phases using a possibly new or changed tau model.
|
void |
setPhaseNames(PhaseName[] phaseNames) |
void |
setPhaseNames(java.lang.String[] phaseNames) |
void |
setReceiverDepth(double receiverDepth) |
void |
setSourceDepth(double depth) |
void |
setTauModel(TauModel tMod) |
void |
sortArrivals() |
void |
start() |
dashEquals, endGmtAndCleanUp, getOutFile, getOutFileBase, getOutFileExtension, getOutputFormat, getWriter, parseCommonCmdLineArgs, printNoComprendoArgs, printScriptBeginning, printStdUsageHead, printStdUsageTail, setOutFileBase, setOutFileExtension, setOutputFormat, setWriter, toolNameFromClass
protected java.lang.String modelName
protected transient TauModel tModDepth
protected java.util.List<PhaseName> phaseNames
protected double depth
protected double receiverDepth
protected double degrees
protected double distKilometers
protected double azimuth
protected double backAzimuth
protected double takeoffAngle
protected double stationLat
protected double stationLon
protected double eventLat
protected double eventLon
protected java.util.List<Arrival> arrivals
protected boolean GUI
protected boolean onlyPrintRayP
protected boolean onlyPrintTime
protected java.lang.String relativePhaseName
protected Arrival relativeArrival
public TauP_Time()
public TauP_Time(TauModel tMod)
public TauP_Time(java.lang.String modelName) throws TauModelException
TauModelException
- if the file can't be found or is corrupted in some way.public java.lang.String[] getPhaseNames()
public java.lang.String getPhaseNameString()
public void setPhaseNames(java.lang.String[] phaseNames) throws TauModelException
TauModelException
public void setPhaseNames(PhaseName[] phaseNames)
public static java.util.List<java.lang.String> getPhaseNames(java.lang.String phaseName)
public void appendPhaseName(java.lang.String phaseName) throws TauModelException
TauModelException
public void appendPhaseName(PhaseName phaseName)
public int getNumPhases()
public void clearPhaseNames()
public double getSourceDepth()
public void setSourceDepth(double depth)
public double getReceiverDepth()
public void setReceiverDepth(double receiverDepth)
public java.lang.String getTauModelName()
public TauModel getTauModel()
public TauModel getTauModelDepthCorrected()
public void setTauModel(TauModel tMod)
public void loadTauModel(java.lang.String modelName) throws java.io.FileNotFoundException, java.io.InvalidClassException, java.io.IOException, java.io.StreamCorruptedException, java.io.OptionalDataException, TauModelException
java.io.FileNotFoundException
java.io.InvalidClassException
java.io.IOException
java.io.StreamCorruptedException
java.io.OptionalDataException
TauModelException
public double[] getDisconDepths()
public void clearPhases()
public void clearArrivals()
public int getNumArrivals()
public Arrival getArrival(int i)
public java.util.List<Arrival> getArrivals()
public java.util.List<SeismicPhase> getSeismicPhases()
protected void readTauModel() throws TauModelException
TauModelException
protected void readPhaseFile(java.lang.String filename) throws java.io.IOException
java.io.IOException
public void parsePhaseList(java.lang.String phaseList)
public static java.util.List<java.lang.Double> parseDegreeList(java.lang.String degList)
protected java.lang.String[] parseCmdLineArgs(java.lang.String[] origArgs) throws java.io.IOException
parseCmdLineArgs
in class TauP_Tool
java.io.IOException
public void sortArrivals()
public void calculate(double degrees) throws TauModelException
TauModelException
public void calcTime(double degrees) throws TauModelException
TauModelException
public void calcTakeoff(double takeoffAngle) throws TauModelException
TauModelException
@Deprecated public void depthCorrect(double depth) throws TauModelException
TauModelException
public void depthCorrect(double depth, double receiverDepth) throws TauModelException
depth
- the source depthreceiverDepth
- the receiver depthTauModelException
protected void recalcPhases()
public void printResult(java.io.PrintWriter out) throws java.io.IOException
java.io.IOException
public void printResultText(java.io.PrintWriter out) throws java.io.IOException
java.io.IOException
public void printResultJSON(java.io.PrintWriter out)
public void init() throws TauPException
init
in class TauP_Tool
TauPException
public void printHelp()
public void start() throws java.io.IOException, TauModelException, TauPException
start
in class TauP_Tool
java.io.IOException
TauModelException
TauPException
public void destroy() throws TauPException
destroy
in class TauP_Tool
TauPException
public void printStdUsageHead()
public void printStdUsage()
public void printUsage()
printUsage
in class TauP_Tool
public static final double linearInterp(double xa, double ya, double xb, double yb, double x)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException