TauP SetSac¶
TauP SetSac uses the depth and distance information in
SAC Tull [Tul89]
file headers to
put theoretical arrival times into the t0
–t9
header variables. The header variable for a phase can be specified with by
a dash followed by a number, for instance S-9
puts the S arrival time
in t9
. If no header is specified then the time will be inserted in the
first header variable not allocated to another phase, starting with 0.
If there are no header variables not already allocated to a phase, then the
additional phases will not be added to the header. Note that this does not
refer to times that are already in the SAC file before TauP SetSac is run.
They will be overwritten. The ray parameter, in seconds per radian, is also
inserted into the corresponding user0
-user9
header.
Note that triplicated phases are a problem as there is only one
spot to put a time. For example, in iasp91 S has three arrivals at 20~degrees but only
one can be put into the choosen header. TauP SetSac assumes that the first arrival
is the most important, and uses it. Additional header variables may be appended for
the times of the multiples. For example, S-458 would put the first S arrival into
header t4
and the second into t5
and the third into t8
.
If there are more arrivals than headers, the later arrivals are not added. If there are
more headers than arrivals, then the header is not set.
Warning: TauP SetSac assumes the evdp
header has depth in meters unless
the --evdpkm
flag is used, in which case kilometers are assumed. 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, a warning message is
printed if the depth
appears to be in kilometers, i.e. it is < 1000, and --evdpkm
is not used.
This can be safely ignored
if the event really is less than 1000 meters deep. See the SAC
manual Tull [Tul89] for confirmation.
The SAC files must have evdp
and the o
marker set.
Also, if gcarc
or dist
is not
set then TauP SetSac can calculate a distance only if
stla
, stlo
, evla
and evlo
are set.
The user should be very careful about previously set header variables.
TauP SetSac will
overwrite any previously set t
or user
headers.
A future feature may do
more careful checking, but the current version makes no effort to verify that
the header is undefined before writing.
If the given filename is a directory, TauP SetSac will recursively look for files within that directory to process. Thus, a large directory structure of Sac files can be processed easily.
For example, if the event and station headers are set in my_earthquake.sac, then this will set travel times for P and S into the T0 and T1 headers:
taup setsac -p P,S my_earthquake.sac
The usage is:
Usage: taup setsac [--debug] [--evdpkm] [--geodetic] [--help] [--verbose]
[--geodeticflattening=f] [--prop=<toolPropsFilename>]
[[--mod=<modelName>] [-h=depth[,depth...]]...
[--stadepth=depth[,depth...]]... [--scat=s s]...] [[-p=phase
[,phase...]]... [--phasefile=<phaseFiles>]...] [sacfile...]
Set headers to travel times of phases using depth and distance from SAC files.
[sacfile...] SAC files to process
Options:
--debug enable debugging output
--evdpkm sac depth header is in km, default is meters
--geodetic use geodetic latitude for distance calculations, which
implies an ellipticity. Default is spherical. Note this
only affects calculation of distance from lat/lon pairs,
all travel time calculations are done in a purely
spherical model.
--geodeticflattening=f
Inverse Elliptical flattening for distance calculations
when --geodetic, defaults to WGS84 ~ 298.257. The
distance calculation uses 1/x.
--help display this help message
--prop=<toolPropsFilename>
load defaults from properties file
--verbose enable verbose output
Model Args
-h, --evdepth, --sourcedepth=depth[,depth...]
source depth in km
--mod, --model=<modelName>
use velocity model "modelName" for calculations.
Default is iasp91. Other builtin models include prem,
ak135, ak135fcont, and ak135favg.
--scat, --scatter=s s
scattering depth and distance in degrees, which may be
negative. Only effects phases with 'o' or 'O' in the
phase name.
--stadepth, --receiverdepth=depth[,depth...]
the receiver depth in km for stations not at the surface
Phase Names
-p, --ph, --phase=phase[,phase...]
seismic phase names
--phasefile=<phaseFiles>
read list of phase names from file