dbbuild_batch - commands for running dbbuild non-interactively
dbbuild -b [-v] db input
The batch mode of dbbuild reads input from files and adds to the
database db accordingly.
Primarily, the input specifies settings for the various entries on
the interactive window. Then (as with the interactive gui) once the
parameters are set properly, the input command "add" generates
the appropriate rows in site, sitechan, sensor, instrument, stage,
calibration, snetsta and schanloc.
Generally speaking, the batch commands should appear in the same
order as the corresponding fields on the dbbuild user interface window:
time, net, sta, datalogger, sensor, axis, samplerate, channel.
However, the sensor, axis, samplerate and channel statements may
appear multiple times. When at least one sensor has been specified, there
is always a selected sensor, and a selected axis (component) of that sensor.
Following statements apply to the selected sensor and axis, until a new
sensor is selected. (The axis statement causes the next component of
the sensor to be selected on the completion).
Axis statements must proceed channel statements.
Similarly, when at least one samplerate has been specified, there is always
a selected samplerate. Channel statements apply to this selected samplerate.
For convenience in specifying networks with a standard instrument setup,
it is possible to specify the datalogger and sensor configuration first,
and then to have a series of statements which modify only certain variable
elements of the configuration: the start time, the station coordinates,
the serial numbers, and perhaps individual sensor component gains.
The commands have positional parameters; when you're modifying just one of
several positional parameters, you may use a dash "-" for other parameters,
to avoid repeating or changing the existing value for those other parameters.
-
show
show the current settings in a format suitable as batch input
-
dump
show the current settings in a more verbose format useful for debugging.
-
template name
read a template file
-
add
Add the current configuration to the database
-
raze
Completely remove the database tables created by dbbuild
and the related response files.
-
close sta time
Turn off the station with code sta as of the specified time.
-
verify
run dbverify on the database
-
time config start time
When creating a new station entry, this time is the start up time for
the station and all the channels. When changing the station configuration
but not its location, this time is the start time for the new channels
(and the end time for any channels of the same name previously configured).
-
net net netname
This is the FDSN network code for the network. It's important to get
an actual FDSN assigned code, to avoid later problems when sharing data.
-
sta code [lat lon elev staname]
Specify the short station code, the location of the station,
and the long descriptive name for the station.
Alternatively, if the latter parameters are omitted,
the station code is looked up in the output database.
-
datalogger code serialnumber [dlsta]
The datalogger code name must be chosen from the filenames of the
data logger parameter files in dbbuild's database.
The datalogger serial number should be found on the datalogger,
and the dlsta code corresponds to the value programmed into the datalogger
and found in the raw data from the datalogger, hopefully uniquely identifying
the data source.
-
code serialnumber [dlsta]
amend the serialnumber and/or dlsta for the datalogger code.
-
sensor code edepth serialnumber [loc]
The code must be chosen from the filenames of the sensor parameter files
in dbbuild's database. dbbuild uses the corresponding parameter file
to fill in other values and configure itself for the chosen sensor.
The emplacement depth and serial number are also specified on this line,
along with an optional location code.
This loc code is merged with the SEED code to create
the CSS 3.0 channel code. This is necessary in various situations,
as for example when there is a borehole instrument and a surface instrument.
-
code edepth serialnumber [loc]
amend the edepth, serialnumber, and/or loc code for the
sensor code. (Note that this syntax does not provide for modifying a
case where multiple sensors of the same name are connected to a datalogger.
-
axis label hang vang [gain [lead [preamp-gain [preamp-stage]]]]
Default axes are specified in the sensor parameter file. However, instruments
may be oriented differently in some circumstances, and it may be necessary
to change the label (usually "Z", "E" or "N") and the corresponding
orientation angles.
In these cases the label in this command takes a different form:
old->new
For example, "E->1" to change from the default label "E" to the special label "1".
Optionally, one may enter
-
a gain for this sensor axis
-
a lead code identifying which
datalogger lead this axis is connected to,
-
an optional pre-amp gain
-
an optional pre-amp stage (with corresponding response file)
Each axis statement specifies settings for the selected instrument and the
axis with the currently specified label.
-
samplerate code [loc]
The samplerate code is taken from the options in datalogger parameter file.
If the sample rate determines the loc code, then the loc code may be specified
on the line.
By default, specifying a sample rate generates a set of channels, one
for each axis, using some rules for choosing the channel name and loc code.
These choices may be overridden with the statement:
-
channel axis-label chan loc [dlchan]
-
channel axis-label off
-
axis-label is the label from the axis statement,
-
chan is the channel code
-
loc is the loc code
-
dlchan is the code the datalogger places in the raw data to indicate this
channel. This may or may not correspond to the ultimate SEED naming convention.
-
off indicates the channel is not generated.
By default, the dbbuild database is kept in $ANTELOPE/data/instruments;
however this may be changed in the dbbuild parameter file.
% cat input
time 1/01/1995 0:00:00.000
net XA Fake example of field miniseed volume
sta AAK 42.6333 74.4944 1.6800 Ala-Archa, Kyrgyzstan
datalogger rt130 aak-rt130-serial X1_101 # Reftek 130 Datalogger
sensor sts2 0.0 aak-sts2-serial # Streckeisen STS-2
samplerate 20sps
channel Z BHZ - 213_21
channel N BHN - 212_21
channel E BHE - 211_21
add
sta ADK 51.8837 -176.6844 0.1160 Adak, Aleutian Islands, Alaska
rt130 adk-rt130-serial X1_121
sts2 0.0 adk-sts2-serial
samplerate 20sps
channel Z BHZ - 213_21
channel N BHN - 212_21
channel E BHE - 211_21
add
% dbbuild -v -b db input
: loading input
->
-> time 1/01/1995 0:00:00.000
-> net XA Fake example of field miniseed volume
-> sta AAK 42.6333 74.4944 1.6800 Ala-Archa, Kyrgyzstan
->
-> datalogger rt130 aak-rt130-serial X1_101 # Reftek 130 Datalogger
->
-> sensor sts2 0.0 aak-sts2-serial # Streckeisen STS-2
-> samplerate 20sps
-> channel Z BHZ - 213_21
-> channel N BHN - 212_21
-> channel E BHE - 211_21
-> add
Added 3 records to calibration
Added 1 records to instrument
Added 1 records to network
Added 3 records to sensor
Added 1 records to site
Added 3 records to sitechan
Added 33 records to stage
->
-> sta ADK 51.8837 -176.6844 0.1160 Adak, Aleutian Islands, Alaska
-> rt130 adk-rt130-serial X1_121
->
-> sts2 0.0 adk-sts2-serial
-> samplerate 20sps
-> channel Z BHZ - 213_21
-> channel N BHN - 212_21
-> channel E BHE - 211_21
-> add
Added 3 records to calibration
Added 3 records to sensor
Added 1 records to site
Added 3 records to sitechan
Added 33 records to stage
dbbuild(1)
dbbuild(5)
It's not currently possible to turn off certain orientations of
a sensor, as can be done with the interactive mode.
Daniel Quinlan
Table of Contents
Antelope Release 4.6 Linux 2.4.19-4GB 2004-11-01
Boulder Real Time Technologies, Inc
For more information, contact support@brtt.com