dbbuild - build the station related tables for a css3.0 database
dbbuild [-v] [-p pf] db [template|input-file]
dbbuild [-v] [-p pf] -b db input-file ...
dbbuild assists in creating or adding to
the CSS 3.0 tables which describe
the stations and instruments:
site, sitechan, sensor, instrument, calibration, stage, snetsta and
schanloc.
It uses a database of parameter files for dataloggers and sensors.
These parameter files specify nominal
responses and other characteristics of the instruments. The user
must select the instruments used, specify the station name,
location and orientation, and specify the configured sample rates.
Then dbbuild constructs the relevant records in the various tables
to correspond with these specs.
There are two modes, interactive and batch. The interactive mode
presents a GUI where the user specifies the necessary input information.
In batch mode, the user supplies the same information using a simple
command language, defined in dbbuild_batch(5).
After successfully adding new records to a database, dbbuild creates or
appends to a configuration file associated with the database,
and named after it: db-dbbuild. This configuration file can be a record of the
database creation, and can be run as a dbbuild batch
file to recreate the core tables.
Start dbbuild, providing the name of the database to which you
wish to add new stations or new configurations. There are three
panels: Station, Sensor and Data Logger.
-
First fill in the Station panel completely, unless the station
already exists in the database site table.
In this case, select the station from the option menu, and
dbbuild fills
in the remainder of the fields from the database.
-
Select the data logger
using the option menu in the Datalogger panel.
This fills in the data logger description.
You must fill in the data logger serial number, and (if different)
the id found in the data stream from this data logger. For
temporary experiments, the actual station name is filled in
later downstream, substituting for this id.
-
In the Sensor panel, select the sensor(s) connected to the
data logger, using the radio buttons on the far left to select
different sensors, and the option menu to select a particular
sensor type for each.
This fills in an instrument name, a band and an rsptype,
and a set of channel orientations for the sensor, with
corresponding Label (part of channel of name), and hang and
vang. If the instrument is not North-South aligned, you
may need to edit these parameters.
You fill in the emplacement depth, a loc code if necessary,
and the sensor serial number.
-
For each sensor, you must select the sample rates for which
data is collected. The parameter files for the data logger
attempt to restrict the selectable rates to the ones which may
actually be realized, but you should verify that the
selections are correct.
-
Press the Add button. This operation may take
several seconds, depending on the complexity of the configuration.
When it's complete, you may want to inspect your new database with
dbe(1).
-
To add additional stations, change the displayed configuration
as necessary, and use the Add button again.
-
-b
Run in batch mode, and don't bring up the gui.
-
-v
More verbose output; this is primarily useful in batch mode.
See dbbuild_batch(5).
-
-p pf
Specify an alternate parameter file; the dbbuild parameter file
configures a few default settings for dbbuild. Most users will
never use this option.
Certain characteristics of data loggers and sensors are
provided to dbbuild in a parameter file format, one file
per sensor or data logger variety.
(If an instrument is an integrated sensor and data logger, like
a Kinemetrics K2, then both a sensor parameter file and a
data logger parameter file are required).
dbbuild(5) contains the detailed description of the contents of
these files, which are primarily response information, but also
other configuration information.
The instrument parameter files (for sensors and data loggers)
are described in dbbuild(5).
However, dbbuild itself has a simple parameter file containing
the following parameters:
-
default_network
The user must specify a network for each station; this is
a convenient method for specifying a default value.
-
default_data_logger_sn
Put a default value here to avoid entering data logger serial numbers
-
default_sensor_sn
Put a default value here to avoid entering sensor serial numbers
-
response_dir
default directory in which to store instrument responses; the
default is "response"
-
stage_dir
default directory in which to store instrument stage responses
the default is "response/stage"
-
SensorDir
directory where parameter files describing sensors are found;
if this is not an absolute path, it is taken to be relative to
$ANTELOPE/data.
-
DataloggerDir
directory where parameter files describing data loggers are found;
if this is not an absolute path, it is taken to be relative to
$ANTELOPE/data.
-
TemplateDir
directory containing example templates. These can be used to mostly
set up a station, leaving out some of the variable information like
station name and location and serial numbers.
-
alternate_Name
-
alternate_loc
dbbuild makes a selection of the first two characters of the channel
name based on the sample rate and the parameters
short_period_sensor and sensor_type_code
from the sensor parameter file.
When this selection results in a naming conflict, alternate_Name and
alternate_loc propose alternate names to resolve the conflict.
Both are lists of key-value pairs. If the channel name matches a
key in the alternate_Name array, the corresponding value is used
to replace it. Similarly, if a loc code matches a value in the
alternate_loc array, the corresponding value is used to replace the
original.
dbbuild(5)
dbbuild_batch(5)
dbbuild_examples(5)
The dbbuild software facilitates construction of
the station side of the database. We have made an effort to
verify the datalogger and sensor parameters which together with the
user specs are the raw materials used to construct the database.
However, the user must themselves verify that the provided parameters
are correct and adequate for their instruments. If you believe a parameter
is wrong, please notify support@brtt.com. However, many dataloggers and
sensors come in a variety of configurations, and responses and sensitivities
may have changed. You must check the calibration and response from the database
against your instruments.
-
dbbuild makes only rudimentary attempts to ensure that the database
represents a configuration which can actually be realized. The responsibility
for that lies with the operator. For instance, dbbuild will happily
create a database which has 4 3-component instruments attached to a
data logger with only three analog inputs.
-
dbbuild doesn't attempt to deal with having multiple sensors/data loggers
on a single day. The CSS database has the weakness that site and
sitechan use onday and offday instead of time and endtime. While there's
a contrived method of using sensor and chanid to somewhat alleviate this
problem, dbbuild just ignores it.
-
There's no obvious place in the standard CSS 3.0 schema to specify the data logger,
though dbbuild constructs the insname field in instrument from a
combination of the sensor and data logger description fields. The datalogger
choice is kept in the new calibration table, however.
-
Multiple manufacturers use the same fir filters;
this means that the dfile field in the stage table
will sometimes seem deceptive. This is because dbbuild avoids putting
duplicate files into the stage directory; if a filter is the
same as an existing file, the existing filename is used.
Daniel Quinlan
Table of Contents
Antelope Release 4.8 Darwin 8.7.0 2006-09-26
Boulder Real Time Technologies, Inc
For more information, contact support@brtt.com