.. highlight:: rst .. _scenvelope: ########## scenvelope ########## **Computes continuous envelope values used by scvsmag.** Description =========== Part of the :ref:`VS` package. scenvelope is part of a new SeisComp3 implementation of the `Virtual Seismologist`_ (VS) Earthquake Early Warning algorithm (Cua, 2005; Cua and Heaton, 2007) released under the `SED Public License for SeisComP Contributions`_. It generates real-time envelope values for horizontal and vertical acceleration, velocity and displacement from raw acceleration and velocity waveforms. It was implemented to handle the waveform pre-processing necessary for the :ref:`scvsmag` module. It provides in effect continuous real-time streams of PGA, PGV and PGD values which could also be used independently of :ref:`scvsmag`. The processing procedure is as follows: #. gain correction #. baseline correction #. high-pass filter with a corner frequency of 3 s period #. integration or differentiation to velocity, acceleration and displacement #. computation of the absolute value within 1 s intervals The resulting envelope values are sent as messages to the messaging system via the "VS" message group. Depending on the number of streams that are processed this can result in a significant number of messages (#streams/s). In order to save the messages in the database and to provide them to other modules, the messaging system must to be able to handle these messages. Therefore, the plugins *dmvs* and *dmsm* must be available to :ref:`scmaster` and the "VS" group must be added. The plugins can be most easily **added** through the configuration parameters in :file:`global.cfg`: .. code-block:: sh plugins = dmvs, dmsm **Add** the "VS" group the the other message groups defined by :ref:`scmaster` in :file:`scmaster.cfg`: .. code-block:: sh msgGroups = VS, ... and let scenvelope send the messages to the "VS" group instead of "AMPLITUDE". Adjust :file:`scenvelope.cfg`: .. code-block:: sh connection.primaryGroup = VS .. note:: When changing :confval:`connection.primaryGroup`, the "VS" group must also be added to the subscriptions in :ref:`scvsmag`. References ========== .. target-notes:: .. _`Virtual Seismologist` : http://www.seismo.ethz.ch/en/research-and-teaching/products-software/EEW/Virtual-Seismologist/ .. _`SED Public License for SeisComP Contributions` : http://www.seismo.ethz.ch/static/seiscomp_contrib/license.txt .. _scenvelope_configuration: Configuration ============= | :file:`etc/defaults/global.cfg` | :file:`etc/defaults/scenvelope.cfg` | :file:`etc/global.cfg` | :file:`etc/scenvelope.cfg` | :file:`~/.seiscomp3/global.cfg` | :file:`~/.seiscomp3/scenvelope.cfg` scenvelope inherits :ref:`global options`. .. confval:: envelope.saturationThreshold Type: *double* Unit: *percent* This parameter defines the relative saturation threshold in percent. If the absolute raw amplitude exceeds X% of 2\^23 counts, the station will be flagged as clipped. This assumes a 24\-bit datalogger. Default is ``80``. .. confval:: envelope.baselineCorrectionBuffer Type: *int* Unit: *s* This parameter defines the length of the buffer \(in seconds\) that is used to compute a real\-time average for baseline correction. Default is ``60``. .. confval:: envelope.useSC3Filter Type: *boolean* This is for internal testing purposes only. true will cause the SeisComp3 filter routines to be used. If false the filter routines from the Earthworm based CISN\/ETH implementation of VS will be employed. Default is ``false``. .. note:: **envelope.streams.\*** *Defines the white- and blacklist of data streams to be used. The* *rules to decide if a stream is used or not are the following:* ** *1. if whitelist is not empty and the stream is not on the whitelist,* *don't use it, ok otherwise* ** *2. if blacklist is not empty and the stream is on the blacklist,* *don't use it, ok otherwise* ** *Both checks are made and combined with AND. Either whitelist or* *blacklist contains a list of patterns (wildcard allowed as * and ?),* *eg GE.*.*.*, *, GE.MORC.*.BH? Each stream id (NET.STA.LOC.CHA) will* *be checked against the defined patterns.* .. confval:: envelope.streams.whitelist Type: *list:string* The stream whitelist .. confval:: envelope.streams.blacklist Type: *list:string* The stream blacklist Command-line ============ .. program:: scenvelope Generic ------- .. option:: -h, --help show help message. .. option:: -V, --version show version information .. option:: --config-file arg Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it, eg scautopick \-> scautopick2. .. option:: --plugins arg Load given plugins. .. option:: -D, --daemon Run as daemon. This means the application will fork itself and doesn't need to be started with \&. .. option:: --auto-shutdown arg Enable\/disable self\-shutdown because a master module shutdown. This only works when messaging is enabled and the master module sends a shutdown message \(enabled with \-\-start\-stop\-msg for the master module\). .. option:: --shutdown-master-module arg Sets the name of the master\-module used for auto\-shutdown. This is the application name of the module actually started. If symlinks are used then it is the name of the symlinked application. .. option:: --shutdown-master-username arg Sets the name of the master\-username of the messaging used for auto\-shutdown. If \"shutdown\-master\-module\" is given as well this parameter is ignored. Verbosity --------- .. option:: --verbosity arg Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug .. option:: -v, --v Increase verbosity level \(may be repeated, eg. \-vv\) .. option:: -q, --quiet Quiet mode: no logging output .. option:: --component arg Limits the logging to a certain component. This option can be given more than once. .. option:: -s, --syslog Use syslog logging back end. The output usually goes to \/var\/lib\/messages. .. option:: -l, --lockfile arg Path to lock file. .. option:: --console arg Send log output to stdout. .. option:: --debug Debug mode: \-\-verbosity\=4 \-\-console\=1 .. option:: --log-file arg Use alternative log file. Messaging --------- .. option:: -u, --user arg Overrides configuration parameter :confval:`connection.username`. .. option:: -H, --host arg Overrides configuration parameter :confval:`connection.server`. .. option:: -t, --timeout arg Overrides configuration parameter :confval:`connection.timeout`. .. option:: -g, --primary-group arg Overrides configuration parameter :confval:`connection.primaryGroup`. .. option:: -S, --subscribe-group arg A group to subscribe to. This option can be given more than once. .. option:: --encoding arg Overrides configuration parameter :confval:`connection.encoding`. .. option:: --start-stop-msg arg Sets sending of a start\- and a stop message. .. option:: --test Test mode, no messages are sent Database -------- .. option:: --db-driver-list List all supported database drivers. .. option:: -d, --database arg The database connection string, format: service:\/\/user:pwd\@host\/database. \"service\" is the name of the database driver which can be queried with \"\-\-db\-driver\-list\". .. option:: --config-module arg The configmodule to use. .. option:: --inventory-db arg Load the inventory from the given database or file, format: [service:\/\/]location .. option:: --db-disable Do not use the database at all Offline ------- .. option:: --ts arg Start time of data acquisition time window, requires also \-\-te. .. option:: --te arg End time of data acquisition time window, requires also \-\-ts.