NAME
trrotd - rotates, detrends, and decimates a 3-component record set
SYNOPSIS
trrotd db dbout {orid | arid:azim} sta [pf-file-prefix]
SUPPORT
Contributed code: NO BRTT support.
THIS PIECE OF SOFTWARE WAS CONTRIBUTED BY THE ANTELOPE USER COMMUNITY. BRTT DISCLAIMS ALL OWNERSHIP, LIABILITY, AND SUPPORT FOR THIS PIECE OF SOFTWARE.
FOR HELP WITH THIS PIECE OF SOFTWARE, PLEASE CONTACT THE CONTRIBUTING AUTHOR.
DESCRIPTION
Takes a 3-component set of traces from a css3.0 database and preprocesses
them, making a new database that has the components rotated, windowed about
a P arrival, detrended, and optionally decimated. This is useful preparation
for a number of other procedures or handy in itself.
Rotation
is specified for a single station and either by EVENT (
orid) or by
a combination of Arrival pick and azimuth (
arid:azim). Additional
parameters are specified in an Antelope-style parameter file (ending in .pf),
including the time window about P, a decimation interval, and a flag that
chooses whether to plot or not.
Decimation is specified by the "decimate" parameter, as an integer fraction
of the current sample rate. Decimation is done by fourier-series truncation
with a 6-pole two-way (zero phase) Butterworth filter applied at the
new Nyquist frequency.
Sign conventions for rotated components are same as for "ahrot".
COMMAND LINE ARGUMENTS
-
db
Input database. Must include wfdisc, and EITHER arrival OR origin+site tables.
-
dbout
Output database. A wfdisc table is created/added to. Data go into a relative
directory wf/rfcns/yyyy/ddd.
-
orid
Index pointing to description of event in the db.origin table. If this option
is selected, the azimuth and distance to sta is calculated and a window
about the predicted P arrival is output.
-
arid:azim
Another way of selecting the window/rotation parameters: uses the arrival
time arid instead of the predicted P time. Also uses the specified azimuth
azim instead of a calculated one for rotation.
-
sta
The station to be processed.
ENVIRONMENT
TAUP_PATH is used to specify travel-time calculation for P.
PARAMETER FILE
-
pf-file-prefix
The name of a parameter file (ending in .pf) that contains other parameters.
A default file is hardwired, in the src directory. Defaults exist for any missing
parameters []. Parameters include:
-
tstart
Start time of output window desired, relative to arid or predicted P. [-10.]
-
tend
End time of output window desired, relative to arid or predicted P. [50.]
-
decimate
Decimation interval: an integer fraction of the current sample rate to use
as the new sample rate. A value of 0 or 1 results in no decimation. [0]
-
graphics
A flag; 1 for graphical output and interactive questionning, 0 otherwise. [1]
EXAMPLE
trrotd geytel tempdb 62 ORGH trrotd
The parameter file
trrotd.pf is used, and looks like:
cat trrotd.pf
tstart -10.
tend 50.
decimate 4
graphics 0
This one decimates by factor of 4, and shows no graphics.
LIBRARY
-ltr -lgpl2 -lol -lxcom -lgrx -ldb -lcoords -ltttaup -lresponse -lstock /okmok/home/lib/fftlib.a -lX11 -lF77 -lM77 -lsunmath -lm
SEE ALSO
pf
BUGS AND CAVEATS
Results are uncertain if "decimate" is not a power of 2.
Currently assumes channel name ending in Z is vertical,
and N,E are some sort of horizontal (see rot.c).
Uses hang to get horizontal rotations and vang for polarity, or assumes ZNE
if these don't exist. Could be more general. All rec'ds multiplied by calib
if it exists.
Results are uncertain if some number of channels other than 3 passes the
station/orid or station/arid subsetting criteria.
Uses the fill option of trsplice, to add samples where small gaps exist (usually 1 sample).
The samples are assumed to have the same value as the last good datum. This may introduce small
artifacts, but it seems better than alternatives.
Output will fail if a record already exists with the same sta-chan-time
in dbout. As well, problems occur if the directory wf/rfcns already
has files for the sta-chan-time combination being attempted, even if
the db pointing to those files may be different.
Currently only windows about predicted P time. Uses whatever default TT
tables currently set (see $TAUP_PATH).
AUTHOR
Geoff Abers, Boston University
Antelope User Group Contributed Software