Skip to main content

Module windows

Module windows 

Source
Expand description

This module implements various window functions commonly used in signal processing applications. Window functions are used to mitigate spectral leakage when performing Fourier analysis on finite-length signals, by tapering the edges of the signal to reduce discontinuities. The module includes implementations of standard window functions such as Hanning, Hamming, Blackman, and Kaiser windows, as well as more general functions that allow for custom parameters and shapes.

See the book entry Window functions.

Re-exports§

pub use boxcar::boxcar;
pub use triang::triang;
pub use parzen::parzen;
pub use bohman::bohman;
pub use general_cosine::general_cosine;
pub use blackman::blackman;
pub use nuttall::nuttall;
pub use blackmanharris::blackmanharris;
pub use flattop::flattop;
pub use bartlett::bartlett;
pub use barthann::barthann;
pub use hamming::general_hamming;
pub use hamming::hamming;
pub use hann::hann;
pub use kaiser::kaiser;
pub use kaiser::kaiser_beta;
pub use kaiser::kaiser_atten;
pub use kaiser::kaiser_estimate_numtaps;
pub use kaiser_bessel_derived::kaiser_bessel_derived;
pub use gaussian::gaussian;
pub use general_gaussian::general_gaussian;
pub use chebwin::chebwin;
pub use cosine::cosine;
pub use exponential::exponential;
pub use tukey::tukey;
pub use taylor::taylor;
pub use dpss::dpss;
pub use lanczos::lanczos;

Modules§

barthann
bartlett
blackman
blackmanharris
bohman
boxcar
chebwin
The Dolph-Chebyshev window.
cosine
dpss
The discrete prolate spheroidal sequence (Slepian) window.
exponential
flattop
gaussian
general_cosine
The general cosine-sum window.
general_gaussian
hamming
hann
kaiser
kaiser_bessel_derived
lanczos
nuttall
parzen
taylor
triang
tukey

Enums§

WindowType
The WindowType enum defines the various types of window functions that can be generated. Each variant corresponds to a specific window function, and some variants include parameters that control the shape and spectral properties of the window. This enum is used as an input to the generate_window function to specify which type of window to create based on the desired application and characteristics.

Functions§

generate_window
The following functions implement specific window types by calling the general cosine function with appropriate coefficients, or by directly computing the window coefficients based on their mathematical definitions. Each function takes the desired window length m and a boolean sym indicating whether the window should be symmetric or periodic, and returns a vector of window coefficients that can be applied to a signal for spectral analysis or other processing tasks.