Fourier and Spectral Applications
Fourier and Spectral Applications
Fourier and Spectral Applications
University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America).
13.0 Introduction
Fourier methods have revolutionized elds of science and engineering, from radio astronomy to medical imaging, from seismology to spectroscopy. In this chapter, we present some of the basic applications of Fourier and spectral methods that have made these revolutions possible. Say the word Fourier to a numericist, and the response, as if by Pavlovian conditioning, will likely be FFT. Indeed, the wide application of Fourier methods must be credited principally to the existence of the fast Fourier transform. Better mousetraps stand aside: If you speed up any nontrivial algorithm by a factor of a million or so, the world will beat a path towards nding useful applications for it. The most direct applications of the FFT are to the convolution or deconvolution of data (13.1), correlation and autocorrelation (13.2), optimal ltering (13.3), power spectrum estimation (13.4), and the computation of Fourier integrals (13.9). As important as they are, however, FFT methods are not the be-all and end-all of spectral analysis. Section 13.5 is a brief introduction to the eld of time-domain digital lters. In the spectral domain, one limitation of the FFT is that it always represents a functions Fourier transform as a polynomial in z = exp(2if ) (cf. equation 12.1.7). Sometimes, processes have spectra whose shapes are not well represented by this form. An alternative form, which allows the spectrum to have poles in z , is used in the techniques of linear prediction (13.6) and maximum entropy spectral estimation (13.7). Another signicant limitation of all FFT methods is that they require the input data to be sampled at evenly spaced intervals. For irregularly or incompletely sampled data, other (albeit slower) methods are available, as discussed in 13.8. So-called wavelet methods inhabit a representation of function space that is neither in the temporal, nor in the spectral, domain, but rather something in-between. Section 13.10 is an introduction to this subject. Finally 13.11 is an excursion into numerical use of the Fourier sampling theorem.
537
538
Chapter 13.
Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any server computer, is strictly prohibited. To order Numerical Recipes books or CDROMs, visit website http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America).
(r s)j
k=M/2+1
sj k rk
(13.1.1)
If a discrete response function is nonzero only in some range M/2 < k M/2, where M is a sufciently large even integer, then the response function is called a nite impulse response (FIR), and its duration is M . (Notice that we are dening M as the number of nonzero values of r k ; these values span a time interval of M 1 sampling times.) In most practical circumstances the case of nite M is the case of interest, either because the response really has a nite duration, or because we choose to truncate it at some point and approximate it by a nite-duration response function. The discrete convolution theorem is this: If a signal s j is periodic with period N , so that it is completely determined by the N values s 0 , . . . , sN 1 , then its