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 |
static java.lang.String |
JSON |
protected java.lang.String |
modelName |
protected boolean |
onlyPrintRayP |
protected boolean |
onlyPrintTime |
protected java.lang.String |
outFileBase |
protected Outputs |
outForms |
java.lang.String |
outputFormat |
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 |
static java.lang.String |
TEXT |
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 |
calcTakeoff(double takeoffAngle) |
void |
calcTime(double degrees) |
void |
calculate(double degrees) |
void |
clearArrivals() |
void |
clearPhaseNames() |
void |
clearPhases() |
static boolean |
dashEquals(java.lang.String argName,
java.lang.String arg) |
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 |
getOutFile() |
java.lang.String |
getOutFileBase() |
java.lang.String |
getOutFileExtension() |
java.lang.String |
getOutputFormat() |
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() |
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) |
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() |
static void |
printNoComprendoArgs(java.lang.String[] noComprendoArgs) |
void |
printResult(java.io.PrintWriter out) |
void |
printResultJSON(java.io.PrintWriter out) |
void |
printResultText(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.
|
protected void |
recalcPhases()
recalculates the given phases using a possibly new or changed tau model.
|
void |
setOutFileBase(java.lang.String outFileBase) |
void |
setOutputFormat(java.lang.String val)
usually one of TauP_Time.TEXT or TauP_Time.JSON.
|
void |
setPhaseNames(PhaseName[] phaseNames) |
void |
setPhaseNames(java.lang.String[] phaseNames) |
void |
setReceiverDepth(double receiverDepth) |
void |
setSourceDepth(double depth) |
void |
setTauModel(TauModel tMod) |
void |
setWriter(java.io.PrintWriter writer) |
void |
sortArrivals() |
void |
start() |
public static boolean DEBUG
public boolean verbose
public static boolean expert
public static final java.lang.String JSON
public static final java.lang.String TEXT
public java.lang.String outputFormat
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 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
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
TauModelException
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 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)
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.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 java.io.IOException
java.io.IOException
public java.lang.String getOutputFormat()
public void setOutputFormat(java.lang.String val)
val
- output format for resultspublic 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.IOException
public void setWriter(java.io.PrintWriter writer)
public void printScriptBeginning(java.io.PrintWriter out) throws java.io.IOException
out
- java.io.IOException
public void printHelp()
public void start() throws java.io.IOException, TauModelException, TauPException
java.io.IOException
TauModelException
TauPException
public void destroy() throws java.io.IOException
java.io.IOException
public 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.FileNotFoundException
java.io.IOException
java.io.StreamCorruptedException
java.lang.ClassNotFoundException
java.io.OptionalDataException