use Msusneic ; ($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 Msusneic::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 the predicted P arrival time and user input group velocity 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.
Msusneic::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 surface wave magnitude which is also cached for subsequent processing.
Msusneic::process_station is completely inherited unmodified from Magnitude::process_station.
Msusneic::process_network first calls Magnitude::process_network to compute and output the network magnitude and magnitude processing results. It then deposits the surface wave magnitude into its appropriate field in the output origin table row.
# This is a parameter template for Msusneic msusneic_params &Arr{ channels &Tbl{ # snet_expr chan_expr noise_twin mingvel snr_thresh # sta_expr filter noise_toffset maxgvel .* .* LHZ.* auto 200.0 10.0 2.0 5.0 3.0 } reject &Tbl{ # snet_expr sta_expr IM .* } minimum_period 15.0 maximum_period 25.0 minimum_distance 20.0 maximum_distance 160.0 maximum_depth 50.0 update_time 30.0 maximum_wait_time 1800.0 maximum_bad_fraction 0.2 auth_accept ot|ot dbg station_number_minimum 5 station_percentage_minimum 90.0 uncertainty_maximum 0.5 output_magtype ms output_auth orbevproc output_stamag yes output_wfmeas yes }
The recipe of stations and channels to be used to compute surface 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 temporary 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. The US NEIC uses only the vertical channel for surface wave magnitude. However, you can use multiple channels and if more than one channel matches for a particular station, the one that produces the highest magnitude is used as the station magnitude. Since ms measurements take place over long time windows, it is recommended that long-period or L channels be used to minimize computational delays and reduce the required internal buffer sizes.- filter
This should be either "auto", 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 for ms that is used in this computational module should be in micrometers/second of ground velocity. The autofilter for a broadband velocity sensor would be "BWZ 0.01 5 0.1 5;G 0.001" (A Butterworth zero-phase bandpass from 0.01 to 0.1 hz followed by a gain of 0.001 to produce ground velocity in micrometers/second). Note that the filter must produce equivalent micrometers/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 word. The calib value is always used from the trace table input to Msusneic::process_channel as a means to convert the counts to physical ground units before applying the filter.- noise_twin
This should be 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.- noise_toffset
This is the number of seconds before the predicted first P arrival that will anchor the end of the noise time window.- mingvel maxgvel
These are the minimum and maximum group velocities in km/sec for computing a time window to be used to search for the peak ms amplitude.- 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 surface 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)