TukeyWindow

TukeyWindow[x]

represents a Tukey window function of x.

TukeyWindow[x,α]

uses the parameter α.

Details

  • TukeyWindow, also known as the cosine-tapered window, is a window function typically used in signal processing applications where data needs to be processed in short segments.
  • Window functions have a smoothing effect by gradually tapering data values to zero at the ends of each segment.
  • TukeyWindow[x,α] is equal to  1 (0<a<1∧a-2 x-1<=0∧a+2 x-1<=0)∨(a=1∧x=0)∨(a<=0∧-1/2<=x<=1/2); 1/2 (cos(2 pi x)+1) a>1∧-1/2<=x<=1/2; 1/2 (cos((2 pi (-a/2+x+1/2))/a)+1) 0<a<=1∧x>=-1/2∧a-2 x-1>0; 1/2 (cos((2 pi (a/2+x-1/2))/a)+1) 0<a<=1∧a+2 x-1>0∧x<=1/2; 0 TemplateBox[{x}, Abs]>1/2; .
  • TukeyWindow[x] is equivalent to TukeyWindow[x,2/3].
  • TukeyWindow automatically threads over lists.

Examples

open allclose all

Basic Examples  (3)

Shape of a 1D Tukey window:

Shape of a 2D Tukey window:

Extract the continuous function representing the Tukey window:

Parameterized Tukey window:

Scope  (6)

Evaluate numerically:

Shape of a 1D Tukey window using a specified parameter:

Variation of the shape as a function of the parameter α:

Translated and dilated Tukey window:

2D Tukey window with a circular support:

Discrete Tukey window of length 15:

Discrete 15×10 2D Tukey window:

Applications  (3)

Use the Tukey window to diminish the effect of signal partitioning when computing the spectrogram:

Use a window specification to calculate sample PowerSpectralDensity:

Calculate the spectrum:

Compare to spectral density calculated without a windowing function:

The plot shows that the window smooths the spectral density:

Compare to the theoretical spectral density of the process:

Use a window specification for time series estimation:

Specify window for spectral estimator:

Properties & Relations  (10)

TukeyWindow[x,1] is equivalent to a Hann window:

TukeyWindow[x,0] is equivalent to a box window:

TukeyWindow[x,1] is equivalent to a Hann window:

Tukey window is a convolution of a unit pulse with a raised cosine:

The area under the Tukey window:

Normalize to create a window with unit area:

Fourier transform of the Tukey window:

Power spectrum of the Tukey window:

Fourier transform of the parametrized Tukey window:

Variation of the magnitude spectrum of the Tukey window as a function of the parameter :

Discrete-time Fourier transform of the discrete Tukey window of length 11:

Magnitude at ω=0:

Magnitude spectrum:

Power spectra for three different window lengths:

Power spectra for three different values of the shape parameter :

Possible Issues  (1)

2D sampling of Tukey window will use a different parameter for each row of samples when passed as a symbol to Array:

Use a pure function instead:

Wolfram Research (2012), TukeyWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/TukeyWindow.html (updated 2016).

Text

Wolfram Research (2012), TukeyWindow, Wolfram Language function, https://reference.wolfram.com/language/ref/TukeyWindow.html (updated 2016).

CMS

Wolfram Language. 2012. "TukeyWindow." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/TukeyWindow.html.

APA

Wolfram Language. (2012). TukeyWindow. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TukeyWindow.html

BibTeX

@misc{reference.wolfram_2024_tukeywindow, author="Wolfram Research", title="{TukeyWindow}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/TukeyWindow.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_tukeywindow, organization={Wolfram Research}, title={TukeyWindow}, year={2016}, url={https://reference.wolfram.com/language/ref/TukeyWindow.html}, note=[Accessed: 22-November-2024 ]}