modified_hann#
- kikuchipy.filters.modified_hann(Nx: int) ndarray [source]#
Return a 1D modified Hann window with the maximum value normalized to 1.
Used in [Wilkinson et al., 2006].
- Parameters:
- Nx
Number of points in the window.
- Returns:
window
1D Hann window.
Notes
The modified Hann window is defined as
\[w(x) = \cos\left(\frac{\pi x}{N_x}\right),\]with \(x\) relative to the window centre.
Examples
>>> import numpy as np >>> import kikuchipy as kp >>> w1 = kp.filters.modified_hann(Nx=30) >>> w2 = kp.filters.Window("modified_hann", shape=(30,)) >>> np.allclose(w1, w2) True