• Antelope Release 5.5 Linux 2.6.32-220.el6.x86_64 2015-04-21

 

NAME

orbmonrtd_pf_generator - create parameter files for orbmonrtd from a dbmaster database

SYNOPSIS

orbmonrtd_pf_generator [-v] [-d pfdirectory]
                       [-t table_name]
                       [-p pffile] dbmaster

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

The Perl script orbmonrtd_pf_generator creates parameter files for orbmonrtd(1). This is useful for networks that have dynamic deployments, such as the USArray experiment. To monitor temporarily deployed stations requires orbmonrtd parameter files to be frequently updated as the dbmaster sitehan offdate or deployment endtime table fields are updated. Executing this script outputs only those stations you expect to be returning data (i.e. 'online') to the orbmonrtd parameter file structure, and therfore be displayed in orbmonrtd. This helps in accurate determination of the state of health of a complete dynamic network. The parameter file for orbmonrtd_pf_generator defines a series of variables commonly found in orbmonrtd parameter files, such as the dump command (if needed) and the detections and arrivals definitions. See orbmonrtd(1) for more information. These have a direct one-to-one mapping from the orbmonrtd_pf_generator.pf to the orbmonrtd.pf. Variables that are defined only in the orbmonrtd_pf_generator parameter file are the Orb to be monitored, the sources array that lists the parameter files to be created, and an exceptions array. The sources array lists the name of the parameter file to be created, the time window (tw, in seconds), the amplitude min and max (amin and amax respectively), the width and height (in pixels), and a filter (if needed) for each individual trace from the Orb. An optional modulus operator can be defined if, for example, the user wishes to only see every n'th channel trace from the Orb to be monitored. An optional subset table can be defined as a series of Datascope database operations to the default sitechan and snetsta tables (or a deployment table if the -t argument is defined as deployment) if the user wishes to subset or re-order the traces in orbmonrtd in a certain way, such as by latitude (requires joining with the site table) ondate, network code, channel code, or deployment start time. The exceptions array allows certain stations to over-ride the definitions applied to the Orb trace by the sources array. The key for this array is the station network, station code, and (if present) location code concatenated (ie. snet_sta_loc). The key-value pairs are amin, amax, width, height and filter. These over-rides are important for stations that have certain characteristics that make them unique in comparison to the rest of the deployed network. For example, the station might be deployed next to a busy highway, or in a windy coastal position, so it is useful to increase the amplitude of the trace to filter out background noise.

OPTIONS

PARAMETER FILE

#
# Define a local dump command
#
dump_cmd    getgif \$window \$period \$name

#
# The Orb of interest
#
orb         :usarray

#
# The parameter files to be created
#
sources &Arr{
    anf1hrBHZ &Arr{
        tw      3600
        amin 	-2500.000
        amax 	2500.000
        width
        height
        filter
        modulus
        subset  &Tbl{
            dbsubset snet =~ /TA/
            dbsubset chan =~ /BHZ.*/
            dbjoin site
            dbsort -r lat
        }
    }
    anf2hrBHZ &Arr{
        tw      7200
        amin    -2500.000
        amax    2500.000
        width
        height
        filter
        modulus  8
        subset  &Tbl{
            dbsubset snet =~ /TA/
            dbsubset chan =~ /BHZ.*/
            dbjoin site
            dbsort -r lat
        }
    }
    TA2hrBHZ_AG &Arr{
        tw      7200
        amin    -2500.000
        amax    2500.000
        width
        height
        filter
        modulus
        subset  &Tbl{
            dbsubset snet =~ /TA/
            dbsubset chan =~ /BHZ.*/
            dbsubset sta =~ /[A-G].*/
            dbsort sta
        }
    }
    REG2hrBHZ &Arr{
        tw      7200
        amin    -2500.000
        amax    2500.000
        width
        height
        filter
        modulus
        subset  &Tbl{
            dbsubset snet !~ /TA/
            dbsubset chan =~ /BHZ.*/
            dbsubset offdate > now() || offdate == NULL
            dbsort snet sta
        }
    }
    TA24hrBHZ_X9 &Arr{
        tw      86400
        amin    -2500.000
        amax    2500.000
        width
        height
        filter
        modulus
        subset  &Tbl{
            dbsubset snet =~ /TA/
            dbsubset chan =~ /BHZ.*/
            dbsubset sta =~ /[X-Z0-9].*/
            dbsubset offdate > now() || offdate == NULL
            dbjoin site
            dbsort -r lat
        }
    }
}

#
# Define any snet_sta exceptions that need
# special treatment to the Orb trace
#
exceptions &Arr{
    AZ_MONP2 &Arr{
        amin    -5000.000
        amax    5000.000
        width
        height
        filter
    }
}

#
# Detections array - 1 to 1 mapping to orbmonrtd
#
detections &Arr{
    BW_0.8_4_3.0_4    00ff00    0.05
    BW_0.5_4_1.2_4    ffa0a0    0.1
    BW_3.0_4_0_0      a0a0ff    0.0
}

#
# Arrivals array - 1 to 1 mapping to orbmonrtd
#
arrivals &Arr{
    S1    ff0000
    P    ff0000
    S2    00a000
    P1    ff0000
    D1    ffa0a0
    S3    0000ff
    P2    00a000
    D2    00a000
    S    ff0000
    P3    0000ff
    D3    8080ff
}

#
# Filter setting - 1 to 1 mapping to orbmonrtd
#
filter

pf_revision_time 1238630400

EXAMPLE

orbmonrtd_pf_generator -v -d pftmp -t deployment -p pf/orbmonrtd_pf_generator /path/to/usarray/dbmaster/usarray

RETURN VALUES

An example orbmonrtd parameter file created by this script follows:

hostname{rt}54% cat anf2hrBHZ.pf

arrivals        &Arr{
    D1  ffa0a0
    D2  00a000
    D3  8080ff
    P   ff0000
    P1  ff0000
    P2  00a000
    P3  0000ff
    S   ff0000
    S1  ff0000
    S2  00a000
    S3  0000ff
}
detections      &Arr{
    BW_0.5_4_1.2_4      ffa0a0    0.1
    BW_0.8_4_3.0_4      00ff00    0.05
    BW_3.0_4_0_0        a0a0ff    0.0
}
dump    "/path/to/rtsystems/vncweb/bin/getgif $window $period $name"
filter
pf_revision_time        1208991095
sources &Tbl{
    TA_A06A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_A08A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_B07A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_B15A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_C08A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_D07A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_D10A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_E06A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_E14A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_F07A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_F09A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_G14A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_H16A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_H12A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_I17A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_J15A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_J18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_K20A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_L17A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_L21A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_M15A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_N17A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_N11A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_O18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_P18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_P12A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_Q13A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_R18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_R22A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_S18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_T18A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_T12A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_U13A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_V20A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_W15A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_W22A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_X19A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_Y20A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_Z21A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_113A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_126A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_222A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_218A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_327A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
    TA_527A_BHZ anfexport-mgmt:usarrayTA 7200 -2500.000 2500.000
}

SEE ALSO

orbmonrtd(1)

BUGS AND CAVEATS

Valid CSS3.0 schema sitechan and snetsta tables are required for the dbmaster database. The script will die without these present. If the site or deployment table is to be used, a valid CSS3.0 extension deployment table must exist.

AUTHOR

Rob Newman
University of California, San Diego
<rlnewman@ucsd.edu>
# This is just an id line from rcs.
Antelope User Group Contributed Software
Printer icon