public class TauP_Time
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<Arrival> |
arrivals |
protected double |
azimuth |
protected double |
backAzimuth |
static boolean |
DEBUG
Turns on debugging output.
|
protected double |
degrees |
protected double |
depth |
protected double |
eventLat |
protected double |
eventLon |
static boolean |
expert
Turns on expert mode.
|
protected boolean |
GUI |
protected java.lang.String |
modelName |
protected boolean |
onlyPrintRayP |
protected boolean |
onlyPrintTime |
protected java.lang.String |
outFileBase |
protected Outputs |
outForms |
protected java.util.List<PhaseName> |
phaseNames
names of phases to be used, ie PKIKP.
|
protected java.util.List<SeismicPhase> |
phases
vector to hold the SeismicPhases for the phases named in phaseNames.
|
protected Arrival |
relativeArrival |
protected java.lang.String |
relativePhaseName |
protected double |
stationLat |
protected double |
stationLon |
protected TauModel |
tMod
Tau model calculated previously.
|
protected TauModel |
tModDepth
TauModel derived from tMod by correcting it for a non-surface source.
|
protected java.util.Properties |
toolProps |
boolean |
verbose
Turns on verbose output.
|
protected java.io.PrintWriter |
writer |
| Modifier | Constructor and Description |
|---|---|
protected |
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 |
calcTime(double degrees) |
void |
calculate(double degrees) |
void |
clearArrivals() |
void |
clearPhaseNames() |
static boolean |
dashEquals(java.lang.String argName,
java.lang.String arg) |
void |
depthCorrect(double depth)
corrects the TauModel for the given source depth.
|
void |
destroy() |
Arrival |
getArrival(int i) |
java.util.List<Arrival> |
getArrivals() |
double[] |
getDisconDepths() |
int |
getNumArrivals() |
int |
getNumPhases() |
java.lang.String |
getOutFile() |
java.lang.String |
getOutFileBase() |
java.lang.String |
getOutFileExtension() |
java.lang.String[] |
getPhaseNames() |
static java.util.List<java.lang.String> |
getPhaseNames(java.lang.String phaseName) |
java.lang.String |
getPhaseNameString() |
java.util.List<SeismicPhase> |
getSeismicPhases() |
double |
getSourceDepth() |
TauModel |
getTauModel() |
java.lang.String |
getTauModelName() |
java.io.PrintWriter |
getWriter() |
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[] args) |
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() |
static void |
printNoComprendoArgs(java.lang.String[] noComprendoArgs) |
void |
printResult(java.io.PrintWriter out) |
void |
printScriptBeginning(java.io.PrintWriter out)
a noop that allows overriding classes to print things
before results are calculated.
|
void |
printStdUsage()
Prints the command line arguments common to all TauP tools.
|
void |
printStdUsageHead() |
static void |
printStdUsageHead(java.lang.Class toolClass) |
void |
printStdUsageTail() |
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.
|
void |
recalcPhases()
reclaulates the given phases using a possibly new or changed tau model.
|
void |
setOutFileBase(java.lang.String outFileBase) |
void |
setPhaseNames(PhaseName[] phaseNames) |
void |
setPhaseNames(java.lang.String[] phaseNames) |
void |
setSourceDepth(double depth) |
void |
setTauModel(TauModel tMod) |
void |
sortArrivals() |
void |
start() |
public static boolean DEBUG
public boolean verbose
public static boolean expert
protected java.lang.String modelName
protected transient TauModel tModDepth
protected java.util.List<SeismicPhase> phases
protected java.util.List<PhaseName> phaseNames
protected double depth
protected double degrees
protected double azimuth
protected double backAzimuth
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
protected java.lang.String outFileBase
protected java.io.PrintWriter writer
protected java.util.Properties toolProps
protected Outputs outForms
protected TauP_Time()
public TauP_Time(TauModel tMod) throws TauModelException
TauModelExceptionpublic 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
TauModelExceptionpublic 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
TauModelExceptionpublic void appendPhaseName(PhaseName phaseName)
public int getNumPhases()
public void clearPhaseNames()
public double getSourceDepth()
public void setSourceDepth(double depth)
public java.lang.String getTauModelName()
public TauModel getTauModel()
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.FileNotFoundExceptionjava.io.InvalidClassExceptionjava.io.IOExceptionjava.io.StreamCorruptedExceptionjava.io.OptionalDataExceptionTauModelExceptionpublic double[] getDisconDepths()
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
TauModelExceptionprotected void readPhaseFile(java.lang.String filename)
throws java.io.IOException
java.io.IOExceptionpublic void parsePhaseList(java.lang.String phaseList)
public java.util.List<java.lang.Double> parseDegreeList(java.lang.String degList)
public static boolean dashEquals(java.lang.String argName,
java.lang.String arg)
protected java.lang.String[] parseCmdLineArgs(java.lang.String[] args)
throws java.io.IOException
java.io.IOExceptionpublic void sortArrivals()
public void calculate(double degrees)
throws TauModelException
TauModelExceptionpublic void calcTime(double degrees)
public void depthCorrect(double depth)
throws TauModelException
TauModelExceptionpublic void recalcPhases()
public void printResult(java.io.PrintWriter out)
throws java.io.IOException
java.io.IOExceptionpublic void init()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getOutFileBase()
public void setOutFileBase(java.lang.String outFileBase)
public java.lang.String getOutFileExtension()
public java.lang.String getOutFile()
public java.io.PrintWriter getWriter()
throws java.io.IOException
java.io.IOExceptionpublic void printScriptBeginning(java.io.PrintWriter out)
throws java.io.IOException
out - java.io.IOExceptionpublic void printHelp()
public void start()
throws java.io.IOException,
TauModelException,
TauPException
java.io.IOExceptionTauModelExceptionTauPExceptionpublic void destroy()
throws java.io.IOException
java.io.IOExceptionpublic void printStdUsageHead()
public static void printStdUsageHead(java.lang.Class toolClass)
public void printStdUsage()
public void printStdUsageTail()
public void printUsage()
public static void printNoComprendoArgs(java.lang.String[] noComprendoArgs)
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.FileNotFoundException,
java.io.IOException,
java.io.StreamCorruptedException,
java.lang.ClassNotFoundException,
java.io.OptionalDataException
java.io.FileNotFoundExceptionjava.io.IOExceptionjava.io.StreamCorruptedExceptionjava.lang.ClassNotFoundExceptionjava.io.OptionalDataException