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
Calculate travel times for different branches using linear interpolation
between known slowness samples.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected List<SeismicPhase>protected booleanFields inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractRayTool
distanceArgsFields inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
phaseNamesFields inherited from class edu.sc.seis.TauP.cmdline.TauP_Tool
ABREV_SYNOPSIS, abstractOutputTypeArgs, OPTIONS_HEADING, toolProps -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcAll(List<SeismicPhase> phaseList, List<RayCalculateable> rayCalcList) calcAllIndexRays(List<SeismicPhase> seismicPhases) calcRelativeSeismicPhases(TauModel tauModel, double receiverDepth, Scatterer scatterer) calcSeismicPhases(double sourceDepth, List<Double> receiverDepths, Scatterer scatterer) recalculates the given phases using a possibly new or changed tau model.combineHeadLines(List<List<String>> headLines) Combines two header line lists into single single list by concate each pair.com.google.gson.GsonBuildercreateHeaderLines(List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String phaseFormat, String phasePuristFormat, boolean withDerivative, List<GeoDistType> geoDistTypes) createModelHeaderLine(String modelName, Scatterer scatterer, List<GeoDistType> geoDistTypes) voiddestroy()voidinit()preforms intialization of the tool.static booleanisRayOkForPhase(RayCalculateable rayCalc, SeismicPhase phase) Check if ray source and receiver depths are compatible with the phase, to avoid duplicate results when using earthquakes or station/channels that have depths.booleanstatic voidprintArrivalsAsCsv(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) static voidprintArrivalsAsHtml(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) static voidprintArrivalsAsHtmlTable(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) static voidprintArrivalsAsText(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean onlyPrintTime, boolean onlyPrintRayP, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, boolean withDerivative, List<GeoDistType> geoDistTypes) voidprintResult(PrintWriter out, List<Arrival> arrivalList) voidprintResultCsv(PrintWriter out, List<Arrival> arrivalList) voidprintResultHtml(PrintWriter out, List<Arrival> arrivalList) voidprintResultText(PrintWriter out, List<Arrival> arrivalList) voidstart()voidMethods inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractRayTool
getDistanceArgs, getReceiverDepths, getSourceDepthsMethods 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, setTauModelMethods inherited from class edu.sc.seis.TauP.cmdline.TauP_Tool
call, configDefaults, getCmdLineArgs, isDEBUG, isVerbose, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, toolNameFromClass
-
Field Details
-
onlyPrintRayP
protected boolean onlyPrintRayP -
onlyPrintTime
protected boolean onlyPrintTime -
onlyFirst
protected boolean onlyFirst -
withDerivative
protected boolean withDerivative -
relativePhaseName
-
relativePhaseList
-
-
Constructor Details
-
TauP_Time
public TauP_Time() -
TauP_Time
-
TauP_Time
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 Details
-
getSourceArgs
-
isWithAmplitude
public boolean isWithAmplitude() -
getOutputFormat
- Specified by:
getOutputFormatin classTauP_Tool
-
getOutFileExtension
- Overrides:
getOutFileExtensionin classTauP_Tool
-
calcAll
public List<Arrival> calcAll(List<SeismicPhase> phaseList, List<RayCalculateable> rayCalcList) throws TauPException - Specified by:
calcAllin classTauP_AbstractRayTool- Throws:
TauPException
-
isRayOkForPhase
Check if ray source and receiver depths are compatible with the phase, to avoid duplicate results when using earthquakes or station/channels that have depths.- Parameters:
rayCalc- ray to check if has source/receiver depthsphase- phase to see if compatible- Returns:
- true if source and receiver depths are compatible
-
calcSeismicPhases
public List<SeismicPhase> calcSeismicPhases(double sourceDepth, List<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
-
calcRelativeSeismicPhases
public List<SeismicPhase> calcRelativeSeismicPhases(TauModel tauModel, double receiverDepth, Scatterer scatterer) throws TauModelException - Throws:
TauModelException
-
createGsonBuilder
public com.google.gson.GsonBuilder createGsonBuilder() -
printResult
- Specified by:
printResultin classTauP_AbstractRayTool- Throws:
TauPException
-
printResultText
- Throws:
TauModelException
-
printResultHtml
- Throws:
TauPException
-
createModelHeaderLine
-
createHeaderLines
public static List<List<String>> createHeaderLines(List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String phaseFormat, String phasePuristFormat, boolean withDerivative, List<GeoDistType> geoDistTypes) -
combineHeadLines
Combines two header line lists into single single list by concate each pair.- Parameters:
headLines- header lines, size 2- Returns:
- combined items
-
printArrivalsAsText
public static void printArrivalsAsText(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean onlyPrintTime, boolean onlyPrintRayP, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, boolean withDerivative, List<GeoDistType> geoDistTypes) -
printArrivalsAsHtml
public static void printArrivalsAsHtml(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) throws TauPException - Throws:
TauPException
-
printArrivalsAsHtmlTable
public static void printArrivalsAsHtmlTable(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) throws TauPException - Throws:
TauPException
-
printResultCsv
- Throws:
TauPException
-
printArrivalsAsCsv
public static void printArrivalsAsCsv(PrintWriter out, List<Arrival> arrivalList, String modelName, Scatterer scatterer, boolean withAmplitude, SeismicSourceArgs sourceArgs, List<String> relativePhaseName, String toolname, boolean withDerivative, List<GeoDistType> geoDistTypes) throws TauPException - Throws:
TauPException
-
init
preforms 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
-
calcAllIndexRays
public static List<Arrival> calcAllIndexRays(List<SeismicPhase> seismicPhases) throws SlownessModelException, NoSuchLayerException -
start
- Specified by:
startin classTauP_Tool- Throws:
IOExceptionTauPException
-
destroy
- Specified by:
destroyin classTauP_Tool- Throws:
TauPException
-
validateArguments
- Overrides:
validateArgumentsin classTauP_AbstractRayTool- Throws:
TauPException
-