Package edu.sc.seis.TauP
Class TauP_SetSac
- 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
-
- edu.sc.seis.TauP.TauP_SetSac
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Integer>
public class TauP_SetSac extends TauP_Time
Calculate times for phases and set sac headers based on gcarc or dist or station lat and lon and event lat and lon. Note that triplicated phases will cause problems, as there is only one spot to put a time. An improved method would allow a phase to have several t#'s associated with it, so that all arrivals could be marked. Currently however, only the first arrival for a phase name is used. Warning: I assume the evdp header has depth in meters unless the -evdpkm flag is set, in which case I assume kilometers. This may be a problem for users that improperly use kilometers for the depth units. Due to much abuse of the sac depth header units I output a warning message if the depth appears to be in kilometers, ie it is less than 1000. This can be safely ignored if the event really is less than 1000 meters deep.
-
-
Field Summary
Fields Modifier and Type Field Description static int
A_HEADER
protected boolean
evdpkm
protected java.util.List<java.lang.String>
sacFileNames
static int
SKIP_HEADER
-
Fields inherited from class edu.sc.seis.TauP.TauP_Time
onlyFirst, onlyPrintRayP, onlyPrintTime, relativePhaseList, relativePhaseName, 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
cmdLineArgs, outFileBase, outputFormat, outputType, toolProps, writer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TauP_SetSac()
TauP_SetSac(TauModel tMod)
TauP_SetSac(java.lang.String modelName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getEvdpkm()
java.lang.String
getStdUsage()
Prints the command line arguments common to all TauP tools.java.lang.String
getUsageTail()
void
init()
preforms intialization of the tool.static void
main(java.lang.String[] args)
Allows TauP_SetSac to run as an application.void
processSacFile(java.io.File f)
void
setEvdpkm(boolean evdpkm)
void
setSacFileNames(java.lang.String[] sacFileNames)
static void
setSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival)
protected void
setSacVarNums()
void
start()
-
Methods inherited from class edu.sc.seis.TauP.TauP_Time
allowedOutputFormats, calcAll, calcAndPrint, calcTime, calculate, calculate, calculateRelativeArrival, destroy, getDistanceUsage, getLimitUsage, getOutFileExtension, getOutputFormat, getStdUsageHead, printHelp, printResult, printResultJSON, printResultText, recalcPhases, resultAsJSONObject, setDefaultOutputFormat, writeJSON, writeJSON
-
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, 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, printScriptBeginning, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, setWriter, toolNameFromClass
-
-
-
-
Field Detail
-
sacFileNames
protected java.util.List<java.lang.String> sacFileNames
-
evdpkm
protected boolean evdpkm
-
A_HEADER
public static final int A_HEADER
- See Also:
- Constant Field Values
-
SKIP_HEADER
public static final int SKIP_HEADER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TauP_SetSac
protected TauP_SetSac()
-
TauP_SetSac
public TauP_SetSac(TauModel tMod) throws TauModelException
- Throws:
TauModelException
-
TauP_SetSac
public TauP_SetSac(java.lang.String modelName) throws TauModelException
- Throws:
TauModelException
-
-
Method Detail
-
getEvdpkm
public boolean getEvdpkm()
-
setEvdpkm
public void setEvdpkm(boolean evdpkm)
-
setSacFileNames
public void setSacFileNames(java.lang.String[] sacFileNames)
-
setSacVarNums
protected void setSacVarNums()
-
init
public void init() throws TauPException
Description copied from class:TauP_Time
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_Time
- Throws:
TauPException
-
start
public void start() throws java.io.IOException, TauPException
- Overrides:
start
in classTauP_Time
- Throws:
java.io.IOException
TauPException
-
processSacFile
public void processSacFile(java.io.File f) throws java.io.IOException, TauPException
- Throws:
java.io.IOException
TauPException
-
setSacTHeader
public static void setSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival)
-
getStdUsage
public java.lang.String getStdUsage()
Description copied from class:TauP_Time
Prints the command line arguments common to all TauP tools.- Overrides:
getStdUsage
in classTauP_Time
-
getUsageTail
public java.lang.String getUsageTail()
-
main
public static void main(java.lang.String[] args) throws java.io.IOException
Allows TauP_SetSac to run as an application. Creates an instance of TauP_SetSac. ToolRun.main should be used instead.- Throws:
java.io.IOException
-
-