c14-7 (779582), страница 3
Текст из файла (страница 3)
Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).In §13.5 we learned something about the construction and application of digital filters,but little guidance was given on which particular filter to use. That, of course, dependson what you want to accomplish by filtering.
One obvious use for low-pass filters is tosmooth noisy data.The premise of data smoothing is that one is measuring a variable that is both slowlyvarying and also corrupted by random noise. Then it can sometimes be useful to replaceeach data point by some kind of local average of surrounding data points.
Since nearbypoints measure very nearly the same underlying value, averaging can reduce the level of noisewithout (much) biasing the value obtained.We must comment editorially that the smoothing of data lies in a murky area, beyondthe fringe of some better posed, and therefore more highly recommended, techniques thatare discussed elsewhere in this book.
If you are fitting data to a parametric model, forexample (see Chapter 15), it is almost always better to use raw data than to use data thathas been pre-processed by a smoothing procedure. Another alternative to blind smoothing isso-called “optimal” or Wiener filtering, as discussed in §13.3 and more generally in §13.6.Data smoothing is probably most justified when it is used simply as a graphical technique, toguide the eye through a forest of data points all with large error bars; or as a means of makinginitial rough estimates of simple parameters from a graph.In this section we discuss a particular type of low-pass filter, well-adapted for datasmoothing, and termed variously Savitzky-Golay [1], least-squares [2], or DISPO (DigitalSmoothing Polynomial) [3] filters. Rather than having their properties defined in the Fourierdomain, and then translated to the time domain, Savitzky-Golay filters derive directly froma particular formulation of the data smoothing problem in the time domain, as we will nowsee.
Savitzky-Golay filters were initially (and are still often) used to render visible the relativewidths and heights of spectral lines in noisy spectrometric data.Recall that a digital filter is applied to a series of equally spaced data values fi ≡ f (ti),where ti ≡ t0 + i∆ for some constant sample spacing ∆ and i = . . . − 2, −1, 0, 1, 2, . . . .We have seen (§13.5) that the simplest type of digital filter (the nonrecursive or finite impulseresponse filter) replaces each data value fi by a linear combination gi of itself and somenumber of nearby neighbors,.















