gonum.org/v1/gonum@v0.14.0/dsp/window/doc.go (about) 1 // Copyright ©2020 The Gonum Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // Package window provides a set of functions to perform the transformation 6 // of sequence by different window functions. 7 // 8 // Window functions can be used to control spectral leakage parameters 9 // when performing a Fourier transform on a signal of limited length. 10 // See https://en.wikipedia.org/wiki/Window_function for more details. 11 // 12 // # Spectral leakage parameters 13 // 14 // Application of window functions to an input will result in changes 15 // to the frequency content of the signal in an effect called spectral 16 // leakage. See https://en.wikipedia.org/wiki/Spectral_leakage. 17 // 18 // The characteristic changes associated with each window function may 19 // be described using a set of spectral leakage parameters; β, ΔF_0, ΔF_0.5, 20 // K and ɣ_max. 21 // 22 // The β, attenuation, coefficient of a window is the ratio of the 23 // constant component of the spectrum resulting from use of the window 24 // compared to that produced using the rectangular window, expressed in 25 // a logarithmic scale. 26 // 27 // β_w = 20 log10(A_w / A_rect) dB 28 // 29 // The ΔF_0 parameter describes the normalized width of the main lobe of 30 // the frequency spectrum at zero amplitude. 31 // 32 // The ΔF_0.5 parameter describes the normalized width of the main lobe of 33 // the frequency spectrum at -3 dB (half maximum amplitude). 34 // 35 // The K parameter describes the relative width of the main lobe of the 36 // frequency spectrum produced by the window compared with the rectangular 37 // window. The rectangular window has the lowest ΔF_0 at a value of 2. 38 // 39 // K_w = ΔF_0_w/ΔF_0_rect. 40 // 41 // The value of K divides windows into high resolution windows (K≤3) and 42 // low resolution windows (K>3). 43 // 44 // The ɣ_max parameter is the maximum level of the side lobes of the 45 // normalized spectrum, in decibels. 46 package window // import "gonum.org/v1/gonum/dsp/window" 47 48 // The article at http://www.dsplib.ru/content/win/win.html is the origin 49 // of much of the information used in this package. It is in Russian, but 50 // Google translate does a pretty good job with it.