Package edu.sc.seis.TauP.cmdline
Class TauP_SetSac
java.lang.Object
edu.sc.seis.TauP.cmdline.TauP_Tool
edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
edu.sc.seis.TauP.cmdline.TauP_SetSac
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
FieldsModifier and TypeFieldDescriptionstatic final intprotected booleanstatic final intFields 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 TypeMethodDescriptionvoiddestroy()booleanvoidinit()voidvoidprocessSacTimeSeries(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, String filenameForError) voidsetEvdpkm(boolean evdpkm) voidsetSacFileNames(String[] sacFileNames) static voidsetSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival) protected voidvoidstart()voidMethods inherited from class edu.sc.seis.TauP.cmdline.TauP_AbstractPhaseTool
appendPhaseName, appendPhaseName, calcSeismicPhases, calcSeismicPhases, clearPhaseNames, clearPhases, createTimeResult, getNumPhases, getPhaseArgs, getRadiusOfEarth, getReceiverDepths, getScatterer, getScattererDepth, getSeismicPhases, getSourceDepths, getTauModelDepthCorrected, getTauModelName, parsePhaseNameList, setModelName, setPhaseNameList, setPhaseNames, setScatterer, setSingleReceiverDepth, setSingleSourceDepth, setTauModelMethods inherited from class edu.sc.seis.TauP.cmdline.TauP_Tool
call, configDefaults, getCmdLineArgs, getOutFileExtension, isDEBUG, isVerbose, setDEBUG, setOutFileBase, setOutFileExtension, setOutputFormat, setToolPropsFilename, setVerbose, toolNameFromClass
-
Field Details
-
sacFileNames
-
evdpkm
protected boolean evdpkm -
A_HEADER
public static final int A_HEADER- See Also:
-
SKIP_HEADER
public static final int SKIP_HEADER- See Also:
-
-
Constructor Details
-
TauP_SetSac
protected TauP_SetSac()
-
-
Method Details
-
getEvdpkm
public boolean getEvdpkm() -
setEvdpkm
public void setEvdpkm(boolean evdpkm) -
setSacFileNames
-
setSacVarNums
- Throws:
PhaseParseExceptionIOException
-
getOutputFormat
- Specified by:
getOutputFormatin classTauP_Tool
-
init
- Overrides:
initin classTauP_AbstractPhaseTool- Throws:
TauPException
-
start
- Specified by:
startin classTauP_Tool- Throws:
IOExceptionTauPException
-
destroy
- Specified by:
destroyin classTauP_Tool- Throws:
TauPException
-
validateArguments
- Specified by:
validateArgumentsin classTauP_Tool- Throws:
TauPException
-
processSacFile
- Throws:
IOExceptionTauPException
-
processSacTimeSeries
public void processSacTimeSeries(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, String filenameForError) throws TauPException - Throws:
TauPException
-
setSacTHeader
public static void setSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival)
-