next up previous contents
Next: Example: seismicF program Up: GRASP Routines: Reading/using FRAME Previous: Example: transferF program   Contents

Example: diagF program

0 This program is a frequency-domain ``novelty detector" and provides a simple example of a time-frequency diagnostic method. The actual code is not printed here, but may be found in the GRASP directory
[4]src/examples/examples_frame in the file diagF.c. To run the program type:
setenv GRASP_FRAMEPATH /usr/local/GRASP/18nov94.1frame
diagF &
which will start the diagF program in the background.

The method used by diagF is as follows:

  1. A buffer is loaded with a short stretch of data samples (2048 in this example, about 1/5 of a second).
  2. A (Welch-windowed) power spectrum is calculated from the data in the buffer. In each frequency bin, this provides a value $S(f)$.
  3. Using the same auto-regressive averaging technique described in avg_spec() the mean value of $S(f)$ is maintained in a time-averaged spectrum $\langle S(f) \rangle$. The exponential-decay time constant for this average is AVG_TIME (10 seconds, in this example).
  4. The absolute difference between the current spectrum and the average $\Delta S(f) \equiv \vert S(f) - \langle S(f) \rangle \vert$ is determined. Note that the absolute value used here provides a more robust first-order statistic than would be provided by a standard variance $(\Delta
S(f))^2$.
  5. Using the same auto-regressive averaging technique described in avg_spec() the value of $\Delta S(f)$ is maintained in a time-averaged absolute difference $\langle \Delta S(f) \rangle$. The exponential-decay time constant for this average is also set by AVG_TIME.
  6. In each frequency bin, $\Delta S(f)$ is compared to $\langle \Delta S(f) \rangle$. If $\Delta S(f) > {\tt THRESHOLD} \times \langle \Delta
S(f) \rangle$ then a point is plotted for that frequency bin; otherwise no point is plotted for that frequency bin. In this example, THRESHOLD is set to 6.
  7. In each frequency bin, $\Delta S(f)$ is compared to $\langle \Delta S(f) \rangle$. If $\Delta S(f) < {\tt INCLUDE} \times \langle \Delta
S(f) \rangle$ then the values of $S(f)$ and $\Delta S(f)$ are used to ``refine" or ``revise" the auto-regressive means described previously. In this example, INCLUDE is set to 10.
  8. Another set of points (1024 in this example) is loaded into the end of the buffer, pushing out the oldest 1024 points from the start of the buffer, and the whole loop is restarted at step 2 above.
The diagF program can be used to analyze any of the different channels of fast-sampled data, by setting CHANNEL appropriately. It creates one output file for each locked segment of data. For example if CHANNEL is set to 0 (the IFO channel) and there are four locked sections of data, one obtains a set of files:
ch0diag.000, ch0diag.001, ch0diag.002, and ch0diag.003.
In similar fashion, if CHANNEL is set to 1 (the magnetometer) one obtains files:
ch1diag.000, ch1diag.001, ch1diag.002, and ch1diag.003.
These files may be used as input to the xmgr graphing program, by typing:
xmgr ch0diag.000 ch1diag.000
(one may specify as many channels as desired on the input line). A typical pair of outputs is shown in Figures [*] and [*]. By specifying several different channels on the command line for starting xmgr, you can overlay the different channels output with one another. This provides a visual tool for identifying correlations between the channels (the graphs shown below may be overlaid in different colors).
Author: Bruce Allen, ballen@dirac.phys.uwm.edu
Comments: This type of time-frequency event detector appears quite useful as a diagnostic tool. It might be possible to improve its high-frequency time resolution by being clever about using intermediate information during the recursive calculation of the FFT. One should probably also experiment with using other statistical measures to assess the behavior of the different frequency bins. It would be nice to modify this program to also examine the slow sampled channels (see comment for get_data()).

Figure: A time-frequency diagnostic graph produced by diag. The vertical line pointed to by the arrow is a non-stationary noise event in the IFO output, 325 seconds into the locked section. It sounds like a ``drip" and might be due to off-axis modes in the interferometer optical cavities.

Figure: A time-frequency diagnostic graph produced by diag. This shows the identical period as the previous graph, but for the magnetometer output. Notice that the spurious event was not caused by magnetic field fluctuations.


next up previous contents
Next: Example: seismicF program Up: GRASP Routines: Reading/using FRAME Previous: Example: transferF program   Contents
Bruce Allen 2000-11-19