github.com/gopherd/gonum@v0.0.4/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  //  β_w = 20 log10(A_w / A_rect) dB
    27  //
    28  // The ΔF_0 parameter describes the normalized width of the main lobe of
    29  // the frequency spectrum at zero amplitude.
    30  //
    31  // The ΔF_0.5 parameter describes the normalized width of the main lobe of
    32  // the frequency spectrum at -3 dB (half maximum amplitude).
    33  //
    34  // The K parameter describes the relative width of the main lobe of the
    35  // frequency spectrum produced by the window compared with the rectangular
    36  // window. The rectangular window has the lowest ΔF_0 at a value of 2.
    37  //  K_w = ΔF_0_w/ΔF_0_rect.
    38  // The value of K divides windows into high resolution windows (K≤3) and
    39  // low resolution windows (K>3).
    40  //
    41  // The ɣ_max parameter is the maximum level of the side lobes of the
    42  // normalized spectrum, in decibels.
    43  package window // import "github.com/gopherd/gonum/dsp/window"
    44  
    45  // The article at http://www.dsplib.ru/content/win/win.html is the origin
    46  // of much of the information used in this package. It is in Russian, but
    47  // Google translate does a pretty good job with it.