Package edu.sc.seis.TauP
Class TauP_SetSac
java.lang.Object
edu.sc.seis.TauP.TauP_Tool
edu.sc.seis.TauP.TauP_Time
edu.sc.seis.TauP.TauP_SetSac
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 intA_HEADERprotected booleanevdpkmprotected java.util.List<java.lang.String>sacFileNamesFields inherited from class edu.sc.seis.TauP.TauP_Time
arrivals, azimuth, backAzimuth, degrees, depth, distKilometers, eventLat, eventLon, GUI, modelName, onlyPrintRayP, onlyPrintTime, phaseNames, receiverDepth, relativeArrival, relativePhaseName, stationLat, stationLon, takeoffAngle, tMod, tModDepth -
Constructor Summary
Constructors Modifier Constructor Description protectedTauP_SetSac()TauP_SetSac(TauModel tMod)TauP_SetSac(java.lang.String modelName) -
Method Summary
Modifier and Type Method Description voidcalculate(double degrees)booleangetEvdpkm()voidinit()preforms intialization of the tool.static voidmain(java.lang.String[] args)Allows TauP_SetSac to run as an application.java.lang.String[]parseCmdLineArgs(java.lang.String[] args)voidprintStdUsage()Prints the command line arguments common to all TauP tools.voidprintUsage()voidprintUsageTail()voidprocessSacFile(java.io.File f)voidsetEvdpkm(boolean evdpkm)voidsetSacFileNames(java.lang.String[] sacFileNames)static voidsetSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival)protected voidsetSacVarNums()voidstart()Methods inherited from class edu.sc.seis.TauP.TauP_Time
appendPhaseName, appendPhaseName, calcTakeoff, calcTime, clearArrivals, clearPhaseNames, clearPhases, depthCorrect, depthCorrect, destroy, getArrival, getArrivals, getDisconDepths, getNumArrivals, getNumPhases, getPhaseNames, getPhaseNames, getPhaseNameString, getReceiverDepth, getSeismicPhases, getSourceDepth, getTauModel, getTauModelDepthCorrected, getTauModelName, linearInterp, loadTauModel, parseDegreeList, parsePhaseList, printHelp, printResult, printResultJSON, printResultText, printStdUsageHead, readPhaseFile, readTauModel, recalcPhases, setPhaseNames, setPhaseNames, setReceiverDepth, setSourceDepth, setTauModel, sortArrivalsMethods inherited from class edu.sc.seis.TauP.TauP_Tool
dashEquals, endGmtAndCleanUp, getOutFile, getOutFileBase, getOutFileExtension, getOutputFormat, getWriter, parseCommonCmdLineArgs, printNoComprendoArgs, printScriptBeginning, printStdUsageHead, printStdUsageTail, setOutFileBase, setOutFileExtension, setOutputFormat, setWriter, toolNameFromClassMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
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
-
-
Constructor Details
-
TauP_SetSac
protected TauP_SetSac() -
TauP_SetSac
- Throws:
TauModelException
-
TauP_SetSac
- Throws:
TauModelException
-
-
Method Details
-
getEvdpkm
public boolean getEvdpkm() -
setEvdpkm
public void setEvdpkm(boolean evdpkm) -
setSacFileNames
public void setSacFileNames(java.lang.String[] sacFileNames) -
setSacVarNums
protected void setSacVarNums() -
calculate
- Overrides:
calculatein classTauP_Time- Throws:
TauModelException
-
init
Description copied from class:TauP_Timepreforms intialization of the tool. Properties are queried for the the default model to load, source depth to use, phases to use, etc. Note that because of the IO inherent in these operations, this method is not appropriate for Applets. Applets should load TauModels themselves and use the setTauModel(TauModel) method.- Overrides:
initin classTauP_Time- Throws:
TauPException
-
start
- Overrides:
startin classTauP_Time- Throws:
java.io.IOExceptionTauModelException
-
processSacFile
public void processSacFile(java.io.File f) throws java.io.FileNotFoundException, java.io.IOException, TauModelException- Throws:
java.io.FileNotFoundExceptionjava.io.IOExceptionTauModelException
-
setSacTHeader
public static void setSacTHeader(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile, int headerNum, Arrival arrival) -
printStdUsage
public void printStdUsage()Description copied from class:TauP_TimePrints the command line arguments common to all TauP tools.- Overrides:
printStdUsagein classTauP_Time
-
printUsageTail
public void printUsageTail() -
printUsage
public void printUsage()- Overrides:
printUsagein classTauP_Time
-
parseCmdLineArgs
public java.lang.String[] parseCmdLineArgs(java.lang.String[] args) throws java.io.IOException- Overrides:
parseCmdLineArgsin classTauP_Time- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOExceptionAllows TauP_SetSac to run as an application. Creates an instance of TauP_SetSac. ToolRun.main should be used instead.- Throws:
java.io.IOException
-