edu.sc.seis.TauP
Class TauP_SetSac

java.lang.Object
  |
  +--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 < 1000. This can be safely ignored if the event really is less than 1000 meters deep.


Fields inherited from class edu.sc.seis.TauP.TauP_Time
DEBUG, verbose
 
Constructor Summary
TauP_SetSac(java.lang.String modelName)
           
TauP_SetSac(TauModel tMod)
           
 
Method Summary
 void calculate(double degrees)
           
 boolean getEvdpkm()
           
 void init()
          preforms intialization of the tool.
static void main(java.lang.String[] args)
          Allows TauP_SetSac to run as an application.
 java.lang.String[] parseCmdLineArgs(java.lang.String[] args)
           
 void printStdUsage()
          Prints the command line arguments common to all TauP tools.
 void printStdUsageTail()
           
 void printUsage()
           
 void setEvdpkm(boolean evdpkm)
           
 void setSacFileNames(java.lang.String[] sacFileNames)
           
 void start()
           
 
Methods inherited from class edu.sc.seis.TauP.TauP_Time
appendPhaseName, appendPhaseName, calcTime, clearArrivals, clearPhaseNames, depthCorrect, destroy, getArrival, getArrivals, getDisconDepths, getNumArrivals, getNumPhases, getPhaseNames, getPhaseNameString, getSourceDepth, getTauModel, getTauModelName, loadTauModel, parseDegreeList, parsePhaseList, printHelp, printResult, printResult, printStdUsageHead, recalcPhases, setPhaseNames, setPhaseNames, setSourceDepth, setTauModel, sortArrivals
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TauP_SetSac

public TauP_SetSac(TauModel tMod)
            throws TauModelException

TauP_SetSac

public TauP_SetSac(java.lang.String modelName)
            throws TauModelException
Method Detail

getEvdpkm

public boolean getEvdpkm()

setEvdpkm

public void setEvdpkm(boolean evdpkm)

setSacFileNames

public void setSacFileNames(java.lang.String[] sacFileNames)

calculate

public void calculate(double degrees)
Overrides:
calculate in class TauP_Time

init

public void init()
          throws java.io.IOException
Description copied from class: TauP_Time
preforms 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:
init in class TauP_Time

start

public void start()
           throws java.io.IOException,
                  TauModelException
Overrides:
start in class TauP_Time

printStdUsage

public void printStdUsage()
Description copied from class: TauP_Time
Prints the command line arguments common to all TauP tools.
Overrides:
printStdUsage in class TauP_Time

printStdUsageTail

public void printStdUsageTail()
Overrides:
printStdUsageTail in class TauP_Time

printUsage

public void printUsage()
Overrides:
printUsage in class TauP_Time

parseCmdLineArgs

public java.lang.String[] parseCmdLineArgs(java.lang.String[] args)
                                    throws java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException,
                        java.io.StreamCorruptedException,
                        java.lang.ClassNotFoundException,
                        java.io.OptionalDataException
Allows TauP_SetSac to run as an application. Creates an instance of TauP_SetSac. .