next up previous contents
Next: Example: ifo_clean Up: GRASP Routines: General purpose Previous: Function: remove_spectral_lines()   Contents

Example: river

0 This is an example program which uses the function remove_spectral_lines() to repeat the analysis of data from the Willamette River given by Percival and Walden in section 10.13 of their textbook.

It displays graphs of the river flow data (which is distributed with GRASP) and spectrum before and after automatic removal of the two significant spectral lines (whose frequencies are 1/year and 2/year). These graphs are also shown here. Before running this program, be sure to set the envionment variable giving the path to the river data, for example:
setenv GRASP_PARAMETERS /usr/local/GRASP/parameters
The text output of the program is as follows:

Total number of lines removed: 2
Removed line of amplitude -0.291175 + i 0.312209 at freq 1.005848 cycles/year
(F-test value 48.455242)
Removed line of amplitude 0.023220 + i 0.098357 at freq 2.000000 cycles/year
(F-test value 15.224311)

Figure: Output of the example program river, making use of remove_spectral_lines() to automatically find and remove two ``spectral line" features from a data set. This is the same example treated by Percival and Walden in Section 10.13 of their textbook.


Bruce Allen 2000-11-19