Package edu.sc.seis.TauP
Class TauP_Time
- java.lang.Object
-
- edu.sc.seis.TauP.TauP_Tool
-
- edu.sc.seis.TauP.TauP_AbstractPhaseTool
-
- edu.sc.seis.TauP.TauP_AbstractRayTool
-
- edu.sc.seis.TauP.TauP_Time
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Integer>
- Direct Known Subclasses:
TauP_Pierce
,TauP_WKBJ
public class TauP_Time extends TauP_AbstractRayTool
Calculate travel times for different branches using linear interpolation between known slowness samples.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
onlyFirst
protected boolean
onlyPrintRayP
protected boolean
onlyPrintTime
protected java.util.List<SeismicPhase>
relativePhaseList
protected java.util.List<java.lang.String>
relativePhaseName
protected boolean
withAmplitude
-
Fields inherited from class edu.sc.seis.TauP.TauP_AbstractRayTool
distanceArgs
-
Fields inherited from class edu.sc.seis.TauP.TauP_AbstractPhaseTool
DEFAULT_PHASES, phaseNames
-
Fields inherited from class edu.sc.seis.TauP.TauP_Tool
abstractOutputTypeArgs, cmdLineArgs, toolProps
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.List<Arrival>
calcAll(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> shootables)
void
calcAndPrint(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> shootables)
java.util.List<Arrival>
calcTime(java.util.List<DistanceRay> degreesList)
Deprecated.java.util.List<Arrival>
calculate(double degrees)
Deprecated.java.util.List<Arrival>
calculate(java.util.List<DistanceRay> distanceRays)
Deprecated.Arrival
calculateRelativeArrival(double degrees)
void
destroy()
java.lang.String
getDistanceUsage()
java.lang.String
getLimitUsage()
java.lang.String
getOutFileExtension()
java.lang.String
getOutputFormat()
java.lang.String
getStdUsage()
Prints the command line arguments common to all TauP tools.java.lang.String
getStdUsageHead()
void
init()
preforms intialization of the tool.static void
main(java.lang.String[] args)
Allows TauP_Time to run as an application.void
printHelp()
void
printResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
void
printResultJSON(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
void
printResultText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
protected void
recalcPhases()
recalculates the given phases using a possibly new or changed tau model.static org.json.JSONObject
resultAsJSONObject(java.lang.String modelName, double depth, double receiverDepth, java.lang.String[] phases, java.util.List<Arrival> arrivals)
void
start()
static void
writeJSON(java.io.PrintWriter pw, java.lang.String indent, java.lang.String modelName, double depth, double receiverDepth, java.util.List<SeismicPhase> phases, java.util.List<Arrival> arrivals)
void
writeJSON(java.io.PrintWriter pw, java.lang.String indent, java.util.List<Arrival> arrivalList)
-
Methods inherited from class edu.sc.seis.TauP.TauP_AbstractRayTool
getDistanceArgs, resultAsJSON, validateArguments
-
Methods inherited from class edu.sc.seis.TauP.TauP_AbstractPhaseTool
appendPhaseName, appendPhaseName, baseResultAsJSONObject, clearPhaseNames, clearPhases, extractPhaseNames, getNumPhases, getPhaseNameList, getPhaseNames, getPhaseNameString, getPhaseUsage, getRadiusOfEarth, getReceiverDepth, getScatterer, getScattererDepth, getSeismicPhases, getSourceDepth, getTauModelDepthCorrected, getTauModelName, linearInterp, parsePhaseList, readPhaseFile, setModelName, setPhaseNameList, setPhaseNames, setPhaseNames, setReceiverDepth, setScatterer, setSourceDepth, setTauModel, splitPhaseNameList
-
Methods inherited from class edu.sc.seis.TauP.TauP_Tool
call, configDefaults, endGmtAndCleanUp, getModDepthUsage, getOutFileBase, getStdUsageHead, getStdUsageTail, isDEBUG, isVerbose, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, toolNameFromClass
-
-
-
-
Field Detail
-
onlyPrintRayP
protected boolean onlyPrintRayP
-
onlyPrintTime
protected boolean onlyPrintTime
-
onlyFirst
protected boolean onlyFirst
-
withAmplitude
protected boolean withAmplitude
-
relativePhaseName
protected java.util.List<java.lang.String> relativePhaseName
-
relativePhaseList
protected java.util.List<SeismicPhase> relativePhaseList
-
-
Constructor Detail
-
TauP_Time
public TauP_Time()
-
TauP_Time
public TauP_Time(TauModel tMod)
-
TauP_Time
public TauP_Time(java.lang.String modelName) throws TauModelException
creates a TauP_Time object with the tau model specified by modelName already loaded.- Throws:
TauModelException
- if the file can't be found or is corrupted in some way.
-
-
Method Detail
-
getOutputFormat
public java.lang.String getOutputFormat()
- Specified by:
getOutputFormat
in classTauP_Tool
-
getOutFileExtension
public java.lang.String getOutFileExtension()
- Overrides:
getOutFileExtension
in classTauP_Tool
-
calculate
@Deprecated public java.util.List<Arrival> calculate(double degrees) throws TauPException
Deprecated.- Throws:
TauPException
-
calculate
@Deprecated public java.util.List<Arrival> calculate(java.util.List<DistanceRay> distanceRays) throws TauPException
Deprecated.- Throws:
TauPException
-
calculateRelativeArrival
public Arrival calculateRelativeArrival(double degrees) throws TauModelException
- Throws:
TauModelException
-
calcAll
public java.util.List<Arrival> calcAll(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> shootables) throws TauPException
- Specified by:
calcAll
in classTauP_AbstractRayTool
- Throws:
TauPException
-
recalcPhases
protected void recalcPhases() throws TauModelException
recalculates the given phases using a possibly new or changed tau model. This should not need to be called by outside classes as it is called by depthCorrect, and calculate.- Overrides:
recalcPhases
in classTauP_AbstractPhaseTool
- Throws:
TauModelException
-
calcTime
@Deprecated public java.util.List<Arrival> calcTime(java.util.List<DistanceRay> degreesList) throws TauPException
Deprecated.- Throws:
TauPException
-
printResult
public void printResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList) throws java.io.IOException, TauModelException
- Specified by:
printResult
in classTauP_AbstractRayTool
- Throws:
java.io.IOException
TauModelException
-
printResultText
public void printResultText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
-
printResultJSON
public void printResultJSON(java.io.PrintWriter out, java.util.List<Arrival> arrivalList) throws java.io.IOException, TauModelException
- Throws:
java.io.IOException
TauModelException
-
writeJSON
public void writeJSON(java.io.PrintWriter pw, java.lang.String indent, java.util.List<Arrival> arrivalList) throws java.io.IOException, TauModelException
- Throws:
java.io.IOException
TauModelException
-
writeJSON
public static void writeJSON(java.io.PrintWriter pw, java.lang.String indent, java.lang.String modelName, double depth, double receiverDepth, java.util.List<SeismicPhase> phases, java.util.List<Arrival> arrivals) throws java.io.IOException
- Throws:
java.io.IOException
-
resultAsJSONObject
public static org.json.JSONObject resultAsJSONObject(java.lang.String modelName, double depth, double receiverDepth, java.lang.String[] phases, java.util.List<Arrival> arrivals)
-
init
public void init() throws TauPException
preforms intialization of the tool. Properties are queried for the default model to load, source depth to use, phases to use, etc.- Overrides:
init
in classTauP_AbstractPhaseTool
- Throws:
TauPException
-
printHelp
public void printHelp()
-
calcAndPrint
public void calcAndPrint(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> shootables) throws TauPException, java.io.IOException
- Throws:
TauPException
java.io.IOException
-
start
public void start() throws java.io.IOException, TauPException
- Specified by:
start
in classTauP_Tool
- Throws:
java.io.IOException
TauPException
-
getStdUsageHead
public java.lang.String getStdUsageHead()
-
getStdUsage
public java.lang.String getStdUsage()
Prints the command line arguments common to all TauP tools.
-
getDistanceUsage
public java.lang.String getDistanceUsage()
-
getLimitUsage
public java.lang.String getLimitUsage()
-
destroy
public void destroy() throws TauPException
- Specified by:
destroy
in classTauP_Tool
- Throws:
TauPException
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
Allows TauP_Time to run as an application. Creates an instance of TauP_Time. ToolRun.main should be used instead.- Throws:
java.io.IOException
-
-