NAME
dlautomrc - issue mass recenter commands to remote dataloggers
SYNOPSIS
dlautomrc
[-a voltage_trigger | -D database]
[-d dltype]
[-f]
[-m "mail_list" ]
[-n]
[-N subset]
[-p pfname]
[-s "dl_sta1,dl_sta2,...."]
[-t max_retries]
[-v]
[-V]
[-x exclude]
cmd_orb status_orb [target]
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
dlautomrc issues mass recenter commands to remote dataloggers based on a
voltage trigger and can be controlled by the following options
OPTIONS
-
-m mail1,mail2,mail3,...
List of email addresses to receive success or failure status emails. The
email message reports the mass positions of the sensors both before and
after the mass recenters.
-
-n
Test mode. Only report what would be done. Do not issue any mass recentering commands.
This is highly recommended for testing prior to implementing daily runs of this
script.
-
-f
Force a mass recenter despite mass positions not out of range. This
only works with the -s option, not with -a. This is not recommended unless
one of the subsetting options is used.
-
-p pfname
Use the specified pfname instead of the default dlautomrc.pf.
-
-d dltype
Default datalogger type. Override value in pf file which currently defaults to q330.
Mixed datalogger networks are not currently supported. Separate instances of the script
for each datalogger type should be run.
-
-v
Be verbose and report some extra information.
-
-V
Be very verbose and report some extra information.
-
-a voltage_trigger
Value beyond which the mass position readings are considered out of range. Check
mass positions of all stations to see if they are beyond this value. This is
not the actual voltage value, but rather the value that is reported by the datalogger. For
instance, q3302orb reports values that are 10 * voltage. So a possible value to
use would be 50 rather than 5 - any sensor that is beyond +/- 5V would get a mass
recenter. Note that the value should be the positive out of range value. Cannot use this
option with -D.
-
-D database
Base the voltage triggers on the sensor value reported in the snname field in a database.
All snname values in the database must have corresponding values in the sensor_mv table in
the parameter file. If a sensor type is encountered in the database that is not in the
parameter file, the default out_of_range value from the parameter file is used.
Cannot use this option with -a.
-
-N subset
Subset expression that would be valid for the calibration table. The script is currently
hard-coded to subset for BHZ channels, currently operational stations, and stations which
do not have the dlsta set to NULL ("-").
-
-t max_retries
The maximum number of times to attempt a mass recenter. The default is 3.
-
-s dl_sta1,dl_sta2,...
Comma separated list of stations to check for needed mass recenters. With -f,
forces a mass recenter regardless of the actual mass position reading.
-
-x dl_sta1,dl_sta2,...
Comma separated list of stations to ignore when checking all stations for mass recenters.
-
cmd_orb
Orb where command orb packets (<targetname>/pf/dlcm) are collected. You must have
write permission for this orb. This is a mandatory argument.
-
status_orb
Orb where status orb packets (<targetname>/pf/st) are collected. You must have read
permission for this orb. This is a mandatory argument.
-
target
A targetname that identifies particular instances of q3302orb or rt2orb. This can be
wildcarded so that multiple targets can be reviewed for out of range mass positions. This is an
optional argument. The default targetname is all targetnames aka ".*".
PARAMETER FILE
The following is an example parameter file.
# pf file for dlautomrc
dltype q330 # default datalogger type
# for a mixed system run with
# either -s option,
# or -x exclude
out_of_range 50 # absolute value of out of
# range mass position voltage
# mass positions >= out_of_range
# will trigger a mass recenter
mrc_delay 30 # interval in seconds to wait
# between mass recenters if -a is used
# Setting this to "0" or a small
# value will speed up execution of
# mass recenters but may introduce
# a false event
delay_interval 300 # interval to wait after mass
# recenter before checking mass positions
sensor_mv &Arr{ # with -D, override default out_of_range
sts2 50 # value with sensor specific value
sts2_g1 50
sts2_g2 50
sts2_g3 50
cmg3t 25
trillium_240_1 20
trillium_240_2 20
}
chan BHZ # channel code for selecting sensors to check.
# Only one channel per station
sensor_lead &Arr{ # maps Sensor A/B to calibration.lead values
# Sensor calibration.lead
A 1
B 4
}
-
dltype
Default datalogger type. Currently, for mixed datalogger systems, multiple runs of the
program are needed. Can be overridden with the -d option. Default value: q330.
-
out_of_range
Absolute value of out of range mass position value. Can be overridden with the -a option.
Default value: 50. (A value of 50 translates to +/- 5V.)
-
mrc_delay
Interval in seconds to wait between issuing mass recenter commands. Issuing mass recenters
within a short time window can introduce false triggers.
Default value: 30.
-
delay_interval
Interval in seconds to wait after mass recenter before rechecking mass positions.
Default value: 300.
-
sensor_mv
Mapping of sensor type to out of range voltage values. Used when the -D option is
selected. Sensors that are found in the database but not in the sensor_mv will use
the out_of_range value from this parameter file. The sensor name is compared to the dfile
name in the stage table for a gtype==sensor. The dfile is the name of the sensor parameter
files used in dbbuild(1).
-
chan
Channel code used for determining sensor type. The calibration table is subset based on
channel and open records. It is assumed that there will be only one sensor type with this
channel code per station.
-
sensor_lead
Map the q330 Sensor A and Sensor B to the value of the lead from the calibration
table. The lead field is filled in during the dbbuild process. Typical values for
lead are 1-3 for Sensor A and 4-6 for Sensor B. The lead value in the
calibration table is reviewed for the channel selected via the chan parameter in the
dlautomrc.pf parameter file. Thus, in the default parameter file, the setup assumes the
BHZ channel is chosen for determining the sensor type, and that the calibration table will have
a lead value of either 1 or 4 (for the BHZ channel) for a Sensor A or Sensor B setup
respectively. If the calibration has no lead values filled in, dlautomrc will
review the mass position values for m0, m1, m2, m3, m4, m5, and m6.
EXAMPLE
-
Check all stations and only show me what ones would require mass
recenter commands using a voltage trigger level of 5.0V, but do not
actually execute those commands. Ignore station TA_G03A.
% dlautomrc -m "jeakins@ucsd.edu" -n -a 50 -x "TA_G03A"
:qcmd :usarray
-
Force a mass recenter command for TA_A04A, TA_G03A, and TA_U04C.
% dlautomrc -m "jeakins@ucsd.edu" -s "TA_A04A,TA_G03A,TA_U04C"
:qcmd :usarray
-
Issue mass recenter commands for any dataloggers that exceed the mv values. Base the mv value
on the sensor type found in a database. Only select dataloggers which have a dlsta matching TA_.*
% dlautomrc -m "jeakins@ucsd.edu" -D usarray -N
"dlsta=~/TA.*/" -v :qcmd :usarray
DIAGNOSTICS
In single station mode, if the masses are not out of range, no mass recenter
will be executed. Override this with the
-f flag if you want to recenter anyway.
You cannot force all stations to mass recenter (i.e. you must combine
-f and
-s flags).
SEE ALSO
q3302orb(1), rt2orb(1), dlcmd(1)
BUGS AND CAVEATS
You could be sending more mass recenters than your system needs. Make sure
you use the test mode with the
-n option until you are sure of what you are
doing.
This should work with both rt130 and q330 dataloggers. It has not been tested on rt130s.
The sensor_mv mappings are based on experiences with the USArray Transportable Array. They
may need to be adjusted for the needs of individual networks.
AUTHOR
Jennifer Eakins and Frank Vernon
IGPP-SIO-UCSD
Antelope User Group Contributed Software