正在加载图片...
14.8 Savitzky-Golay Smoothing Filters 653 8 6 before 4 0 0 100 200 300 400 500 600 700 800 900 6 after square (16,16,0) 4 83g nted for 19881992 0 Ennhh1 1-.200 0 100 200 300400500 600700800 900 to any 0T11+ server 6 after S-G(16.16.4) (Nort America computer, University Press. THE ART 0 100 200300400500600700 800 900 9 Progra Figure 14.8.1.Top:Synthetic noisy data consisting of a sequence of progressively narrower bumps, and additive Gaussian white noise.Center:Result of smoothing the data by a simple moving window average.The window extends 16 points leftward and rightward,for a total of 33 points.Note that narrow features are broadened and suffer corresponding loss of amplitude.The dotted curve is the underlying function used to generate the synthetic data.Bottom:Result of smoothing the data by a Savitzky-Golay to dir smoothing filter (of degree 4)using the same 33 points.While there is less smoothing of the broadest feature,narrower features have their heights and widths preserved. OF SCIENTIFIC COMPUTING (ISBN nL=nR =16.The upper panel shows a test function,constructed to have six"bumps"of varying widths,all of height 8 units.To this function Gaussian white noise of unit variance has been added.(The test function without noise is shown as the dotted curves in the center 10621 and lower panels.)The widths of the bumps(full width at half of maximum,or FWHM)are Numerica 140.43.24.17.13.and 10.respectively. 43106 The middle panel of Figure 14.8.1 shows the result of smoothing by a moving window average.One sees that the window of width 33 does quite a nice job of smoothing the broadest Recipes bump,but that the narrower bumps suffer considerable loss of height and increase of width The underlying signal (dotted)is very badly represented. The lower panel shows the result of smoothing with a Savitzky-Golay filter of the North Software. identical width,and degree M=4.One sees that the heights and widths of the bumps are quite extraordinarily preserved.A trade-off is that the broadest bump is less smoothed.That is because the central positive lobe of the Savitzky-Golay filter coefficients fills only a fraction of the full 33 point width.As a rough guideline,best results are obtained when the full width of the degree 4 Savitzky-Golay filter is between 1 and 2 times the FWHM of desired features in the data.(References [3]and [4]give additional practical hints.) Figure 14.8.2 shows the result of smoothing the same noisy "data"with broader Savitzky-Golay filters of 3 different orders.Here we have nL=nR=32(65 point filter) and M =2,4,6.One sees that,when the bumps are too narrow with respect to the filter size,then even the Savitzky-Golay filter must at some point give out.The higher order filter manages to track narrower features,but at the cost of less smoothing on broad features To summarize:Within limits,Savitzky-Golay filtering does manage to provide smoothing14.8 Savitzky-Golay Smoothing Filters 653 Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copyin Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5) g of machine￾readable 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). 8 6 4 2 0 after square (16,16,0) 0 100 200 300 400 500 600 700 800 900 8 6 4 2 0 after S–G (16,16,4) 0 100 200 300 400 500 600 700 800 900 8 6 4 2 0 before 0 100 200 300 400 500 600 700 800 900 Figure 14.8.1. Top: Synthetic noisy data consisting of a sequence of progressively narrower bumps, and additive Gaussian white noise. Center: Result of smoothing the data by a simple moving window average. The window extends 16 points leftward and rightward, for a total of 33 points. Note that narrow features are broadened and suffer corresponding loss of amplitude. The dotted curve is the underlying function used to generate the synthetic data. Bottom: Result of smoothing the data by a Savitzky-Golay smoothing filter (of degree 4) using the same 33 points. While there is less smoothing of the broadest feature, narrower features have their heights and widths preserved. nL = nR = 16. The upper panel shows a test function, constructed to have six “bumps” of varying widths, all of height 8 units. To this function Gaussian white noise of unit variance has been added. (The test function without noise is shown as the dotted curves in the center and lower panels.) The widths of the bumps (full width at half of maximum, or FWHM) are 140, 43, 24, 17, 13, and 10, respectively. The middle panel of Figure 14.8.1 shows the result of smoothing by a moving window average. One sees that the window of width 33 does quite a nice job of smoothing the broadest bump, but that the narrower bumps suffer considerable loss of height and increase of width. The underlying signal (dotted) is very badly represented. The lower panel shows the result of smoothing with a Savitzky-Golay filter of the identical width, and degree M = 4. One sees that the heights and widths of the bumps are quite extraordinarily preserved. A trade-off is that the broadest bump is less smoothed. That is because the central positive lobe of the Savitzky-Golay filter coefficients fills only a fraction of the full 33 point width. As a rough guideline, best results are obtained when the full width of the degree 4 Savitzky-Golay filter is between 1 and 2 times the FWHM of desired features in the data. (References [3] and [4] give additional practical hints.) Figure 14.8.2 shows the result of smoothing the same noisy “data” with broader Savitzky-Golay filters of 3 different orders. Here we have nL = nR = 32 (65 point filter) and M = 2, 4, 6. One sees that, when the bumps are too narrow with respect to the filter size, then even the Savitzky-Golay filter must at some point give out. The higher order filter manages to track narrower features, but at the cost of less smoothing on broad features. To summarize: Within limits, Savitzky-Golay filtering does manage to provide smoothing
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有