Package edu.sc.seis.TauP
Class TauP_Path
- 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_Path
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Integer>
public class TauP_Path extends TauP_AbstractRayTool
Calculate travel paths for different phases using a linear interpolated ray parameter between known slowness samples.
-
-
Field Summary
Fields Modifier and Type Field Description protected static double
maxPathInc
protected float
maxPathTime
protected java.lang.String
psFile
protected boolean
withTime
-
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
cmdLineArgs, outFileBase, outputFormat, outputType, toolProps, writer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
allowedOutputFormats()
java.util.List<Arrival>
calcAll(java.util.List<SeismicPhase> phaseList, java.util.List<RayCalculateable> shootables)
void
destroy()
double[]
getDepthAxisMinMax()
GraphicOutputTypeArgs
getGraphicOutputTypeArgs()
java.lang.String
getLimitUsage()
float
getMapWidth()
Gets the gmt map width to be used with the output script and for creating the circles for each discontinuity.java.lang.String
getMapWidthUnit()
static double
getMaxPathInc()
float
getMaxPathTime()
java.lang.String
getOutFileExtension()
java.lang.String
getOutputFormat()
void
init()
boolean
isWithTime()
void
labelPathsSVG(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
static void
main(java.lang.String[] args)
Allows TauP_Path to run as an application.void
printLabelsGMT(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
void
printResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
void
printResultJSON(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
void
printScriptBeginning(java.io.PrintWriter out)
a noop that allows overriding classes to print things before results are calculated.void
printScriptBeginningGMT(java.io.PrintWriter out)
void
printScriptBeginningSVG(java.io.PrintWriter out, java.util.List<Arrival> arrivalList, float pixelWidth, DistDepthRange distDepthRange, ModelArgs modelArgs, java.lang.String[] cmdLineArgs)
void
setDefaultOutputFormat()
void
setMapWidth(float mapWidth)
Sets the gmt map width to be used with the output script and for creating the circles for each discontinuity.void
setMapWidthUnit(java.lang.String mapWidthUnit)
static void
setMaxPathInc(double max)
void
setMaxPathTime(float maxPathTime)
void
setWithTime(boolean withTime)
void
start()
-
Methods inherited from class edu.sc.seis.TauP.TauP_AbstractRayTool
getDistanceArgs, parseDegreeList, parseDoubleList, resultAsJSON, validateArguments
-
Methods inherited from class edu.sc.seis.TauP.TauP_AbstractPhaseTool
appendPhaseName, appendPhaseName, baseResultAsJSONObject, clearPhaseNames, clearPhases, extractPhaseNames, getNumPhases, getPhaseNames, getPhaseNameString, getPhaseUsage, getRadiusOfEarth, getReceiverDepth, getScatterer, getScattererDepth, getSeismicPhases, getSourceDepth, getTauModelDepthCorrected, getTauModelName, linearInterp, parsePhaseList, readPhaseFile, recalcPhases, setModelName, setPhaseNames, setPhaseNames, setReceiverDepth, setScatterer, setSourceDepth, setTauModel, splitPhaseNameList
-
Methods inherited from class edu.sc.seis.TauP.TauP_Tool
call, configDefaults, dashEquals, endGmtAndCleanUp, getModDepthUsage, getOutFileBase, getStdUsageHead, getStdUsageTail, isDEBUG, isVerbose, parseOutputFormatCmdLineArgs, printNoComprendoArgs, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, setWriter, toolNameFromClass
-
-
-
-
Constructor Detail
-
TauP_Path
public TauP_Path()
-
TauP_Path
public TauP_Path(TauModel tMod) throws TauModelException
- Throws:
TauModelException
-
TauP_Path
public TauP_Path(java.lang.String modelName) throws TauModelException
- Throws:
TauModelException
-
TauP_Path
public TauP_Path(TauModel tMod, java.lang.String outFileBase) throws TauModelException
- Throws:
TauModelException
-
TauP_Path
public TauP_Path(java.lang.String modelName, java.lang.String outFileBase) throws TauModelException
- Throws:
TauModelException
-
-
Method Detail
-
allowedOutputFormats
public java.lang.String[] allowedOutputFormats()
- Specified by:
allowedOutputFormats
in classTauP_Tool
-
setDefaultOutputFormat
public void setDefaultOutputFormat()
- Specified by:
setDefaultOutputFormat
in classTauP_Tool
-
getOutFileExtension
public java.lang.String getOutFileExtension()
- Overrides:
getOutFileExtension
in classTauP_Tool
-
setMapWidth
public void setMapWidth(float mapWidth)
Sets the gmt map width to be used with the output script and for creating the circles for each discontinuity. Default is 6 inches.
-
getMapWidth
public float getMapWidth()
Gets the gmt map width to be used with the output script and for creating the circles for each discontinuity.
-
getMapWidthUnit
public java.lang.String getMapWidthUnit()
-
setMapWidthUnit
public void setMapWidthUnit(java.lang.String mapWidthUnit)
-
getMaxPathTime
public float getMaxPathTime()
-
setMaxPathTime
public void setMaxPathTime(float maxPathTime)
-
isWithTime
public boolean isWithTime()
-
setWithTime
public void setWithTime(boolean withTime)
-
getDepthAxisMinMax
public double[] getDepthAxisMinMax()
-
getMaxPathInc
public static double getMaxPathInc()
-
setMaxPathInc
public static void setMaxPathInc(double max)
-
getGraphicOutputTypeArgs
public GraphicOutputTypeArgs getGraphicOutputTypeArgs()
-
getOutputFormat
public java.lang.String getOutputFormat()
- Specified by:
getOutputFormat
in classTauP_Tool
-
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
-
destroy
public void destroy() throws TauPException
- Specified by:
destroy
in classTauP_Tool
- Throws:
TauPException
-
printResult
public void printResult(java.io.PrintWriter out, java.util.List<Arrival> arrivalList) throws java.io.IOException, TauPException
- Specified by:
printResult
in classTauP_AbstractRayTool
- Throws:
java.io.IOException
TauPException
-
printLabelsGMT
public void printLabelsGMT(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
-
labelPathsSVG
public void labelPathsSVG(java.io.PrintWriter out, java.util.List<Arrival> arrivalList) throws java.io.IOException
- Throws:
java.io.IOException
-
printResultJSON
public void printResultJSON(java.io.PrintWriter out, java.util.List<Arrival> arrivalList)
-
printScriptBeginning
public void printScriptBeginning(java.io.PrintWriter out) throws java.io.IOException
Description copied from class:TauP_Tool
a noop that allows overriding classes to print things before results are calculated. For example to set up GMT commands before drawing paths.- Overrides:
printScriptBeginning
in classTauP_Tool
- Throws:
java.io.IOException
-
printScriptBeginningGMT
public void printScriptBeginningGMT(java.io.PrintWriter out) throws java.io.IOException
- Throws:
java.io.IOException
-
printScriptBeginningSVG
public void printScriptBeginningSVG(java.io.PrintWriter out, java.util.List<Arrival> arrivalList, float pixelWidth, DistDepthRange distDepthRange, ModelArgs modelArgs, java.lang.String[] cmdLineArgs) throws java.io.IOException, TauModelException
- Throws:
java.io.IOException
TauModelException
-
getLimitUsage
public java.lang.String getLimitUsage()
-
init
public void init() throws TauPException
- Overrides:
init
in classTauP_AbstractPhaseTool
- Throws:
TauPException
-
start
public void start() throws java.io.IOException, TauModelException, TauPException
- Specified by:
start
in classTauP_Tool
- Throws:
java.io.IOException
TauModelException
TauPException
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
Allows TauP_Path to run as an application. Creates an instance of TauP_Path and calls TauP_Path.init() and TauP_Path.start(). ToolRun.main should be used instead.- Throws:
java.io.IOException
-
-