class eqMon : public DatEnv, TrigClient

An earthquake monitor.

Inheritance:


Public Methods

eqMon(int argc, const char *argv[])
Constructor.
~eqMon(void)
Destructor.
void ProcessData(void)
Processes one second of data.
void ReadConfig(void)
Reads and parses configuration file

Documentation

This monitor checks the seismometers and tiltmeters for unusually long periods of noisy data. These are considered "earthquakes", and interferometer data obtained during this time should not be used.
eqMon(int argc, const char *argv[])
Reads the configuration file, initializes variables and sets up the channels from Dacc.
Usage: eqMon [-conf <file>] [-verbose | -quiet] [-h | --help]

eqMon detects an earthquake roughly ~1min after it starts. Various output verbosities are available. Choose:
no options for updated mean, std dev for each channel (default)
-quiet for no data (still sends triggers to EPICS)
-verbose for monitor status
-debug [1] for preventing system calls and status to stdout
-verbose -debug [1] for all of the above output and basic channel stats
-debug {>1} for timing and memory status
-verbose -debug {>1} for all of the above output and full channel stats
Please note that event data is always generated.

Configuration File

Example configuration file:

Parameter EventPrefix ./data/test_event
Parameter DataPrefix ./data/test_data
Parameter MaxThresh 4.5
Parameter MinThresh 2.0
Parameter TriggerOn 1
Parameter ChanThresh 7
H0:PEM-EX_SEISX
H0:PEM-EX_SEISY
H0:PEM-EX_SEISZ
...

For an explanation of the Configuration file, please see the ReadConfig() command.

~eqMon(void)
Deletes the history, resets the EPICS earthquake alarm, and (optionally) prints out the final statistics.

void ProcessData(void)
eqMon first averages the data into 8Hz, then gathers 10 minutes of data before it is able to send triggers. Each minute later, eqMon checks each channel for noise (data has deviated from the mean by <threshold> * std dev within the last <wait_sec>). If a sufficient number of channels (>= <num_chans>) is noisy for a sufficient length of time (<wait_sec> + <hold_sec>), a trigger is sent (if <triggerOn> is true) -- an earthquake has started. Once there is no longer a sufficient number of noisy channels, the alarm is reset, and the earthquake has stopped. When there is not an earthquake, the mean and std dev for the past 10 min. are updated each minute.

void ReadConfig(void)
Reads and parses the configuration file. Lines in the file are separated into two categories-- Parameters and Channels.

Parameters-- Parameter lines take the form: Parameter <param> <value>, where param is one of the following:

  • DataPrefix - Data filename prefix (start date is appended)
  • EventPrefix - Event filename prefix (start date is appended)
  • MaxThresh - threshold to trigger (units of sigma)
  • MinThresh - threshold to release (units of sigma)
  • ChanThresh - minimum # of channels needed to trigger an event
  • TriggerOn - trigger option (boolean)
  • HoldTime - # of seconds to wait before reseting a channel's event flag
  • WaitTime - # of consecutive seconds before an event gets processed
  • SubSample - the speed (integer) at which to process avg and std dev of each channel (1=slowest,4=fastest)

Channels-- each desired channel should be entered on its own line.


This class has no child classes.
Author:
Masahiro Ito and Rauha Rahkola
Version:
1.2 (Last modified Sat Dec 8, 2001)

alphabetic index hierarchy of classes


generated by doc++