PV-WAVE Extreme Advantage > Image Processing Toolkit User Guide > Reference A–I > IPWIN Function (PV-WAVE Extreme Advantage)
IPWIN Function (PV-WAVE Extreme Advantage)
Computes one of several different data windows: Blackman, Chebyshev, Hamming, Hanning, Kaiser, rectangular, or triangular.
Usage
result = IPWIN(n[, m] [, a])
Input Parameters
n—The first dimension of the window sequence.
m—(optional) The second dimension of the window sequence. If m is not given, a one-dimensional window of length n is returned.
a—(optional) A scalar float parameter used only when computing either the Kaiser or Chebyshev windows.
Returned Value
result—A 1D or 2D array containing the requested window.
Keywords
Blackman—If set, a Blackman window is returned.
Center—If set, the window is shifted such that its center is at the center of the result array.
Chebyshev—If set, a Chebyshev window is returned. If Chebyshev is set, input parameter a (a is θ0 in the Chebyshev window equation) is also required.
Hamming—If set, a Hamming window is returned.
Hanning—If set, a Hanning window is returned.
Kaiser—If set, a Kaiser window is returned. If Kaiser is set, input parameter a (a is α in the Kaiser window equation) is also required.
Rectangular—If set, a rectangular window is returned. This is also known as a boxcar window.
Triangular—If set, a triangular window is returned.
Window_Type—A scalar value (see the following table) used to specify a window type. This keyword may be used in place of the particular window keywords.
*1—Rectangular
*2—Triangular
*3—Hanning
*4—Hamming
*5—Kaiser
*6—Blackman
*7—Chebyshev
Discussion
A listing of the applicable time domain equations is given below, where (w(n), 0 < n < N – 1) for each of the windows.
Blackman window:
Chebyshev window:
for N = 0:
for N = 1:
for N > 1:
where:
and θ0 is the IPWIN input parameter a.
Hamming window:
Hanning window:
Kaiser window:
where I0(x) is the zeroth order Bessel function of the first kind, and α is the IPWIN input parameter a.
Rectangular (or boxcar) window:
w(n) = 1, for all n.
Triangular window:
for all n.
Example
This example illustrates how to generate each of the different window types for a 128-by-128 window.
n = 128
m = 128
; Generate and view a rectangular window.
rect = IPWIN(n, m, /Rectangular, /Center)
TVSCL, rect
; Generate and view a triangular window.
tri = IPWIN(n, m, /Triangular, /Center)
TVSCL, tri
; Generate and view a Hanning window.
hann = IPWIN(n, m, /Hanning, /Center)
TVSCL, hann
; Generate and view a Hamming window.
hamm = IPWIN(n, m, /Hamming, /Center)
TVSCL, hamm
; Generate and view a Kaiser window.
kaiser = IPWIN(n, m, 0.5, /Kaiser, /Center)
TVSCL, kaiser
; Generate and view a Blackman window.
black = IPWIN(n, m, /Blackman, /Center)
TVSCL, black
; Generate and view a Chebyshev window.
cheby = IPWIN(n + 1, m + 1, 0.15, /Chebyshev, $
/Center)
TVSCL, cheby
See Also
In the PV‑WAVE Reference:  HANNING