Class TauP_SetSac

  • All Implemented Interfaces:
    java.util.concurrent.Callable<java.lang.Integer>

    public class TauP_SetSac
    extends TauP_AbstractPhaseTool
    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 Detail

      • sacFileNames

        protected java.util.List<java.lang.String> sacFileNames
      • evdpkm

        protected boolean evdpkm
    • Constructor Detail

      • TauP_SetSac

        protected TauP_SetSac()
    • Method Detail

      • getEvdpkm

        public boolean getEvdpkm()
      • setEvdpkm

        public void setEvdpkm​(boolean evdpkm)
      • setSacFileNames

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

        public void processSacFile​(java.io.File f)
                            throws java.io.IOException,
                                   TauPException
        Throws:
        java.io.IOException
        TauPException
      • processSacTimeSeries

        public void processSacTimeSeries​(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile,
                                         java.lang.String filenameForError)
                                  throws TauPException
        Throws:
        TauPException
      • setSacTHeader

        public static void setSacTHeader​(edu.sc.seis.seisFile.sac.SacTimeSeries sacFile,
                                         int headerNum,
                                         Arrival arrival)
      • 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