mirror of
https://github.com/gonum/gonum.git
synced 2025-09-27 03:26:04 +08:00

Changes made in dsp/fourier/internal/fftpack break the formatting used there, so these are reverted. There will be complaints in CI. [git-generate] gofmt -w . go generate gonum.org/v1/gonum/blas go generate gonum.org/v1/gonum/blas/gonum go generate gonum.org/v1/gonum/unit go generate gonum.org/v1/gonum/unit/constant go generate gonum.org/v1/gonum/graph/formats/dot go generate gonum.org/v1/gonum/graph/formats/rdf go generate gonum.org/v1/gonum/stat/card git checkout -- dsp/fourier/internal/fftpack
51 lines
2.1 KiB
Go
51 lines
2.1 KiB
Go
// Copyright ©2020 The Gonum Authors. All rights reserved.
|
||
// Use of this source code is governed by a BSD-style
|
||
// license that can be found in the LICENSE file.
|
||
|
||
// Package window provides a set of functions to perform the transformation
|
||
// of sequence by different window functions.
|
||
//
|
||
// Window functions can be used to control spectral leakage parameters
|
||
// when performing a Fourier transform on a signal of limited length.
|
||
// See https://en.wikipedia.org/wiki/Window_function for more details.
|
||
//
|
||
// # Spectral leakage parameters
|
||
//
|
||
// Application of window functions to an input will result in changes
|
||
// to the frequency content of the signal in an effect called spectral
|
||
// leakage. See https://en.wikipedia.org/wiki/Spectral_leakage.
|
||
//
|
||
// The characteristic changes associated with each window function may
|
||
// be described using a set of spectral leakage parameters; β, ΔF_0, ΔF_0.5,
|
||
// K and ɣ_max.
|
||
//
|
||
// The β, attenuation, coefficient of a window is the ratio of the
|
||
// constant component of the spectrum resulting from use of the window
|
||
// compared to that produced using the rectangular window, expressed in
|
||
// a logarithmic scale.
|
||
//
|
||
// β_w = 20 log10(A_w / A_rect) dB
|
||
//
|
||
// The ΔF_0 parameter describes the normalized width of the main lobe of
|
||
// the frequency spectrum at zero amplitude.
|
||
//
|
||
// The ΔF_0.5 parameter describes the normalized width of the main lobe of
|
||
// the frequency spectrum at -3 dB (half maximum amplitude).
|
||
//
|
||
// The K parameter describes the relative width of the main lobe of the
|
||
// frequency spectrum produced by the window compared with the rectangular
|
||
// window. The rectangular window has the lowest ΔF_0 at a value of 2.
|
||
//
|
||
// K_w = ΔF_0_w/ΔF_0_rect.
|
||
//
|
||
// The value of K divides windows into high resolution windows (K≤3) and
|
||
// low resolution windows (K>3).
|
||
//
|
||
// The ɣ_max parameter is the maximum level of the side lobes of the
|
||
// normalized spectrum, in decibels.
|
||
package window // import "gonum.org/v1/gonum/dsp/window"
|
||
|
||
// The article at http://www.dsplib.ru/content/win/win.html is the origin
|
||
// of much of the information used in this package. It is in Russian, but
|
||
// Google translate does a pretty good job with it.
|