Package edu.sc.seis.TauP.cmdline
Class TauP_Time
- java.lang.Object
-
- edu.sc.seis.TauP.cmdline.TauP_Tool
-
- edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
-
- edu.sc.seis.TauP.cmdline.TauP_AbstractRayTool
-
- edu.sc.seis.TauP.cmdline.TauP_Time
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Integer>
- Direct Known Subclasses:
TauP_Pierce
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 booleanonlyFirstprotected booleanonlyPrintRayPprotected booleanonlyPrintTimeprotected java.util.List<SeismicPhase>relativePhaseListprotected java.util.List<java.lang.String>relativePhaseName-
Fields inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractRayTool
distanceArgs
-
Fields inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
phaseNames
-
Fields inherited from class edu.sc.seis.TauP.cmdline.TauP_Tool
ABREV_SYNOPSIS, abstractOutputTypeArgs, OPTIONS_HEADING, toolProps
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Arrival>calcAll(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> rayCalcList)java.util.List<SeismicPhase>calcSeismicPhases(double sourceDepth, java.util.List<java.lang.Double> receiverDepths, Scatterer scatterer)recalculates the given phases using a possibly new or changed tau model.com.google.gson.GsonBuildercreateGsonBuilder()voiddestroy()java.lang.StringgetOutFileExtension()java.lang.StringgetOutputFormat()AmplitudeArgsgetSourceArgs()voidinit()preforms intialization of the tool.booleanisWithAmplitude()static voidprintArrivalsAsText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList, java.lang.String modelName, java.util.List<java.lang.Double> sourceDepthList, java.util.List<java.lang.Double> receiverDepthList, Scatterer scatterer, boolean onlyPrintTime, boolean onlyPrintRayP, boolean withAmplitude, SeismicSourceArgs sourceArgs, java.util.List<java.lang.String> relativePhaseName)voidprintResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)voidprintResultText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)voidstart()voidvalidateArguments()-
Methods inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractRayTool
getDistanceArgs, getReceiverDepths, getSourceDepths
-
Methods inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
appendPhaseName, appendPhaseName, calcSeismicPhases, clearPhaseNames, clearPhases, createTimeResult, getNumPhases, getPhaseArgs, getRadiusOfEarth, getScatterer, getScattererDepth, getSeismicPhases, getTauModelDepthCorrected, getTauModelName, parsePhaseNameList, setModelName, setPhaseNameList, setPhaseNames, setScatterer, setSingleReceiverDepth, setSingleSourceDepth, setTauModel
-
Methods inherited from class edu.sc.seis.TauP.cmdline.TauP_Tool
call, configDefaults, getCmdLineArgs, isDEBUG, isVerbose, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, toolNameFromClass
-
-
-
-
Field Detail
-
onlyPrintRayP
protected boolean onlyPrintRayP
-
onlyPrintTime
protected boolean onlyPrintTime
-
onlyFirst
protected boolean onlyFirst
-
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 TauModelExceptioncreates 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
-
getSourceArgs
public AmplitudeArgs getSourceArgs()
-
isWithAmplitude
public boolean isWithAmplitude()
-
getOutputFormat
public java.lang.String getOutputFormat()
- Specified by:
getOutputFormatin classTauP_Tool
-
getOutFileExtension
public java.lang.String getOutFileExtension()
- Overrides:
getOutFileExtensionin classTauP_Tool
-
calcAll
public java.util.List<Arrival> calcAll(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> rayCalcList) throws TauPException
- Specified by:
calcAllin classTauP_AbstractRayTool- Throws:
TauPException
-
calcSeismicPhases
public java.util.List<SeismicPhase> calcSeismicPhases(double sourceDepth, java.util.List<java.lang.Double> receiverDepths, Scatterer scatterer) throws TauModelException
recalculates the given phases using a possibly new or changed tau model. Also calculates the relativePhase list.- Overrides:
calcSeismicPhasesin classTauP_AbstractPhaseTool- Throws:
TauModelException
-
createGsonBuilder
public com.google.gson.GsonBuilder createGsonBuilder()
-
printResult
public void printResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList) throws java.io.IOException, TauPException- Specified by:
printResultin classTauP_AbstractRayTool- Throws:
java.io.IOExceptionTauPException
-
printResultText
public void printResultText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
-
printArrivalsAsText
public static void printArrivalsAsText(java.io.PrintWriter out, java.util.List<Arrival> arrivalList, java.lang.String modelName, java.util.List<java.lang.Double> sourceDepthList, java.util.List<java.lang.Double> receiverDepthList, Scatterer scatterer, boolean onlyPrintTime, boolean onlyPrintRayP, boolean withAmplitude, SeismicSourceArgs sourceArgs, java.util.List<java.lang.String> relativePhaseName)
-
init
public void init() throws TauPExceptionpreforms intialization of the tool. Properties are queried for the default model to load, source depth to use, phases to use, etc.- Overrides:
initin classTauP_AbstractPhaseTool- Throws:
TauPException
-
start
public void start() throws java.io.IOException, TauPException- Specified by:
startin classTauP_Tool- Throws:
java.io.IOExceptionTauPException
-
destroy
public void destroy() throws TauPException- Specified by:
destroyin classTauP_Tool- Throws:
TauPException
-
validateArguments
public void validateArguments() throws TauPException- Overrides:
validateArgumentsin classTauP_AbstractRayTool- Throws:
TauPException
-
-