use Mbusneic ; ($obj,$hashref) = new($class,"db" => $dbref, "dbm" => $dbmref[,$name1,$val1[,...]]) ; display($obj[,@keys]) ; put($obj,$name1,$val1[,...]) ; @vals = get($obj,@keys) ; $hashref = getwftimes($obj) ; $hashref = process_channel($obj,$trref,$flush) ; $hashref = process_station($obj,$sta,$flush) ; $hashref = process_network($obj,$flush) ;
new is the constructor method and does the basic setup of the internal perl structures for magnitude processing. The Mbusneic::new method is completely inherited unmodified from the Magnitude::new method (see Magnitude(3p)).
display, put and get are also inherited unmodified from the Magnitude super class.
getwftimes is called by orb/dbevproc immediately after an object is created and this method must setup the waveform processing for the particular event. Setting up the waveform processing consists of 1) parsing the input parameters from those passed in by orb/dbevproc from the orbevproc.pf and dbevproc.pf parameter files when the processing object was created, using evproc::setup_processes (see evproc(3p)), 2) skipping origins with the wrong author codes, 3) going through the assoc table to find the stations that are associated with the event and their corresponding distances to the event, 4) computing noise and signal time windows based upon predicted P arrival times and user input parameters and 4) creating and filling in a perl hash with all of the results. The disposition and output perl hash are returned to orb/dbevproc using the evproc::makereturn function.
Mbusneic::process_channel first calls Magnitude::process_channel to get the waveform statistics. The internally cached statistic values are then used as input for computing the particular station-channel body wave magnitude which is also cached for subsequent processing.
Mbusneic::process_station is completely inherited unmodified from Magnitude::process_station.
Mbusneic::process_network first calls Magnitude::process_network to compute and output the network magnitude and magnitude processing results. It then deposits the body wave magnitude into its appropriate field in the output origin table row.
# This is a parameter template for Mbusneic mbusneic_params &Arr{ channels &Tbl{ # snet_expr chan_expr noise_twin signal_twin snr_thresh clip_upper # sta_expr filter noise_toffset signal_toffset clip_lower .* .* SHZ auto 30.0 10.0 20.0 10.0 3.0 -65000.0 +65000.0 .* .* BHZ_00 auto 30.0 10.0 20.0 10.0 3.0 } reject &Tbl{ # snet_expr sta_expr IU RAR } update_time 10.0 maximum_wait_time 300.0 maximum_bad_fraction 0.2 auth_accept oa_.|oa_. dbg output_magtype mb output_auth orbevproc output_stamag yes }
The recipe of stations and channels to be used to compute body wave magnitude are given in the channels table. Each entry in the table must consist of at least 9 white space separated fields:
- snet_expr
This is a regular expression that is matched against the station SEED net code, as obtained from the temporaray database snetsta table. If it matches, then the corresponding station is used. This provides a convenient way to sift out stations for processing by network.- sta_expr
This is a regular expression that is matched against the CSS station code, as obtained from the temporaray database assoc table. If it matches, then the station is used.- chan_expr
This is a regular expression that is matched against the CSS channel codes for a particular station, as obtained from the metadatabase sitechan table. All channels that match are used in the magnitude computation. Traditionally, for body wave magnitude, only the vertical channel should be used and, if more than one channel matches for a particular station, the one that produces the highest magnitude is used as the station magnitude.- filter
This should be either "auto", or "autosp", or a legitimate filter string as defined by the various dynamic filter libraries that are in use (see wffil(3)). Because filter strings can have embedded white spaces and the parsing done by evproc::setup_processes is primitive, normally embedded white spaces in the filter string should be replaced with the _ (underscore) character which are replaced with white spaces again automatically before being used. The "auto" key word means that the filter should be determined automatically based upon the segtype field in the metadatabase calibration table and assuming the sensor is broadband. Note that the input measurement used in this computational module should be in micrometers/sec of ground velocity. The autofilter for a broadband velocity sensor would be "BW 0.5 5 5.0 5;G 0.001" (A Butterworth bandpass from 0.5 to 5.0 hz followed by a gain of 0.001 to produce ground velocity in micrometers/sec). The "autosp" key word means the same as the "auto" key word except that it is assumed the sensor is a short period narrowband sensor. In this case only integrations are performed, once again according to the metadatabase calibration.segtype value, and a gain is applied to convert to micrometer/second of ground velocity. Note that the filter must produce equivalent micrometer/second of ground velocity as output, so it is the duty of the user to see that this happens if not using the auto key words. The calib value is always used from the trace table input to Mbusneic::process_channel as a means to convert the counts to physical ground units before applying the filter.- noise_twin
This should be either "tproc", or a noise time window value in seconds for computing the filtered noise value. A noise value is computed from the filtered trace data as 1.414 times the standard deviation within the noise time window. The noise time window is noise_twin seconds long or equal to the signal processing time winodw if the "tproc" key word is used.- noise_toffset
This is the number of seconds before the predicted first P arrival that will anchor the end of the noise time window.- signal_twin
This is the time duration in seconds for searching for the body wave magnitude signal.- signal_toffset
This is the number of seconds before the predicted first P arrival that will anchor the beginning of the signal search time window.- snr_thresh
This is a signal to noise ratio minimum threshold for excluding magnitude values for signals that are close to the noise level. If the filtered maximum body wave signal value divided by the noise value is less than this threshold, then the magnitude value for this channel is not used.- clip_lower
This is a lower clip limit in raw counts. If any data points in the signal or noise windows range below this value, then the data is clipped and the station will not be used for computing magnitude. If no clip checking is required, then this value, along with clip_upper, can be omitted.- clip_upper
This is a upper clip limit in raw counts. If any data points in the signal or noise windows range above this value, then the data is clipped and the station will not be used for computing magnitude. If no clip checking is required, then this value, along with clip_lower, can be omitted.
When determining which channels to process, each line in the channels table is compared against the SEED net code and the CSS sta and chan codes. The first line that matches defines the parameters for that channel. Stations that match in the channels table can be rejected if they match against any of the lines in the reject table. The other parameters are as follows:
orbevproc(1), evproc(3p), Magnitude(3p)