NAME
dbdetect - multi-frequency STA/LTA detector
SYNOPSIS
dbdetect [-v] [-arrivals] [-noaddchk]
[-tstart start_time] [-twin minutes]
[-onlypicks] [-pf pfname] dbin dbout
DESCRIPTION
dbdetect will read waveform data from an input Datascope database, run STA/LTA detectors
on one or more channels of the waveform data
and write the detection states as
detection and optionally
arrival rows into an output Datascope database.
For each channel of data,
dbdetect will prefilter
the data into a specified frequency pass band.
dbdetect can run
multiple detections on the same channel of data with different frequency
pass bands. This program is similar to
orbdetect(1) except that
it takes its input and puts its output into Datascope databases instead
of ORBs.
OPTIONS
-
-v
verbose output flag.
-
-arrivals
Arrivals output flag. If this is specified, then both
detection and arrival table rows will be output.
Otherwise, only detection table rows will be output.
-
-noaddchk
Normally dbdetect will add new detection or arrival rows
using the standard Datascope add function. Normally, whenever a new row
is added to a database table, the Datascope RDBMS will automatically
check to see if the primary keys for the new row match the keys for
an existing row. If a match occurs, then it is assumed that the new row
is redundant and it is not added. This can happen, for example, when a
user reruns dbdetect through the same waveform data without cleaning
the arrival and detection tables between runs. When the database tables
get very large, the primary key checking can start taking a lot of computer
resources. If the -noaddchk flag is specified, then the normal
add checking is disabled and new rows are appended to the ends of the
database tables without checking the primary keys. Specification of this
flag will speed up the program at the expense of not making the normal
database integrity checks as new rows are added.
-
-tstart start_time
A start time for reading the waveform data. This argument is
optional. If not specified, then data will start at the earliest
record from the input database.
-
-twin minutes
A time window for reading waveform data in minutes. This argument is
optional. If not specified, then all data will be processed. Use a value
of 1440 if you want to detect a 24 hours of data.
-
-onlypicks
If this flag is specified, then the only the detection "pick" rows (i.e.
those with state not set to on, or ON, or off, or OFF) are output to the detection table.
-
-pf pfname
Name of program parameter file.
The actual parameter file name is pfname.pf.
If this is not specified, then the default pfname is "dbdetect".
-
dbin
The name of the input Datascope database containing the waveform data.
This argument is required.
-
dbout
The name of the output Datascope database that will be used for
writing the detection information.
This argument is required. Note that the output database must use
the css3.0 schema (or contain the detection table as defined
in the css3.0 schema) and the output database can be the same as the
input database.
PROGRAM PARAMETER FILE
Following is an example dbdetect parameter file.
# Parameter file for dbdetect
# Following are required and are used as overall defaults
ave_type rms # Method for averaging (rms or filter)
sta_twin 1.0 # short term average time window
sta_tmin 1.0 # short term average minimum time for average
sta_maxtgap 0.5 # short term average maximum time gap
lta_twin 10.0 # long term average time window
lta_tmin 5.0 # long term average minimum time for average
lta_maxtgap 4.0 # long term average maximum time gap
nodet_twin 2.0 # no detection if on time is less than this
pamp 500.0 # plot amplitude
thresh 5.0 # detection SNR threshold
threshoff 2.5 # detection-off SNR threshold
det_tmin 20.0 # detection minimum on time
det_tmax 600.0 # detection maximum on time
h 0 # plot channel height in pixels
filter none # default filter
iphase D # default iphase for detections
otime_noise_tfac 1.0 # ratio of noise tapering time constant to
# signal tapering time constant for onset
# time estimation
process_twin 60.0 # data is processed in hunks of this duration
onset_search_offset -1.0 # time offset in front of detection to look for onset
# At least one default band must be set set up in the bands table
# parameter values override default values above for each band
bands &Tbl{
&Arr{
sta_twin 5.0
sta_tmin 5.0
sta_maxtgap 0.5
lta_twin 50.0
lta_tmin 25.0
lta_maxtgap 4.0
pamp 200.0
filter BW 0.5 4 1.2 4
}
&Arr{
sta_twin 2.0
sta_tmin 2.0
sta_maxtgap 0.5
lta_twin 20.0
lta_tmin 10.0
lta_maxtgap 4.0
pamp 500.0
filter BW 0.8 4 3.0 4
}
&Arr{
sta_twin 1.0
sta_tmin 1.0
sta_maxtgap 0.5
lta_twin 10.0
lta_tmin 5.0
lta_maxtgap 4.0
pamp 500.0
filter BW 3.0 4 0 0
}
}
# At least one data channel must be specified in the stachans table
stachans &Tbl{
# sta chan
.* [SB]HZ|BHZ_..
}
# station/channels to reject in the processing
reject &Tbl{
# sta chan
# ABC BHZ
}
# Individual netstachan parameters may be overriden below - following
# entries are optional
PFO/BHZ &Arr{
bands &Tbl{
&Arr{
sta_twin 5.0
sta_tmin 5.0
sta_maxtgap 0.5
lta_twin 50.0
lta_tmin 25.0
lta_maxtgap 4.0
pamp 200.0
filter BW 0.5 4 1.2 4
}
&Arr{
sta_twin 2.0
sta_tmin 2.0
sta_maxtgap 0.5
lta_twin 20.0
lta_tmin 10.0
lta_maxtgap 4.0
pamp 500.0
filter BW 0.8 4 3.0 4
}
&Arr{
sta_twin 1.0
sta_tmin 1.0
sta_maxtgap 0.5
lta_twin 10.0
lta_tmin 5.0
lta_maxtgap 4.0
pamp 500.0
filter BW 3.0 4 0 0
}
}
h 50
}
The parameter file consists of three sections followed by optional
override sections. In the first section all of the default parameters
must be specified. These default parameters are as follows:
-
ave_type
This is a character specification of the averaging method which must
be either "rms" for a straightforward root mean square average, or "filter"
for the square root of a simple first order low pass filter of the square of the prefiltered
data.
-
sta_twin
The short term average time window in seconds.
-
sta_tmin
If there are gaps in the data, then this is the minimum
amount of non-gap time window for computing a short term
average.
-
sta_maxtgap
If there are gaps in the data, then this is the maximum
amount of gap time window allowed within a short term average
time window.
-
lta_twin
The long term average time window in seconds.
-
lta_tmin
If there are gaps in the data, then this is the minimum
amount of non-gap time window for computing a long term
average.
-
lta_maxtgap
If there are gaps in the data, then this is the maximum
amount of gap time window allowed within a long term average
time window.
-
nodet_twin
If the detection state on time (the time between detection on and detection
off states) is less than this number, then the detection is not
declared. If nodet_twin is set to zero, then this test is disabled.
The main purpose here is to reject detections associated with short
time duration glitches in the data.
-
thresh
The detection on threshold expressed as a signal to noise ratio.
-
threshoff
The detection off threshold expressed as a signal to noise ratio.
-
det_tmin
The minimum amount of time in seconds for a detection to remain
on.
-
det_tmax
The maximum amount of time in seconds for a detection to remain
on.
-
h pamp
These are used for debugging and should be set to 0 and 500.0.
-
filter
Default pre-filter. See wffil(3), wffilbrtt(3),
and wffilave(3) for examples of filter specifications.
Multiple filters can be specified if separated by a " ; ".
-
otime_noise_tfac
This specifies a ratio of the noise tapering time constant to
the signal tapering time constant used to estimate the phase
onset (pick) time. Normally this should be >= 1.0. A value
of 1.0 indicates that the noise taper has the same time constant
as the signal taper. A value greater than 1.0 indicates that
the noise taper time constant is greater than the signal taper
time constant.
-
process_twin
A processing window in seconds. Waveform data is broken into
hunks of this duration for processing.
-
onset_search_offset
This specifies how far in front of the detection time to start looking
for the onset time. If this is < 0, then the offset is computed
automatically as half of the LTA window.
The second section specifies the default frequency bands that
will be used for each channel. This section must contain a table
named "bands". Within this table is one or more arrays that
contain overridden parameter values for each of the frequency
bands to be used. The parameter definitions are the same as for
those of the default parameters section (the first section).
Each frequency band has its own set of parameters that are
initialized from the default parameters. The specifications in
the "bands" table overrides the default parameter values.
The third section contains the list of CSS3.0 station channel
codes, in a table named "stachans", that define the data channels
to be processed. You can use regular expressions in this table which
will be compared against incoming CSS3.0 station and channel codes to
determine whether or not to process the channel. The station and
channel codes (or regular expressions) must be separated by white
space. In addition to the "stachans" table, an optional "reject"
table may also be specified. This is in the same form as the
"stachans" table and specifies channels the will not be processed.
One or more optional arrays can be specified that further override
detection parameters for particular CSS3.0 sta/chan codes. The
names of each array should be the sta/chan code and the values
can be anything in the first two sections that specify the default
and band parameters.
SEE ALSO
orbdetect(1)
AUTHOR
Danny Harvey
Boulder Real Time Technologies, Inc.