xoa.filter.get_window_func#
- xoa.filter.get_window_func(window, **kwargs)[source]#
Get a window function from its name
- Parameters:
window (str, callable, list, array_like) –
Specification to get the window function:
callable: used as is.
str: supposed to be function name of the
numpyorscipy.signal.windowsmodules.list, array_like: transformed to an array and interpolated onto
sizepoints.
kwargs – Argument passed to the low level window function at calling time.
- Returns:
callable – A function that takes only a
sizeargument
Example
In [1]: func0 = get_window_func("gaussian", std=22, sym=True) In [2]: func1 = get_window_func([1, 2, 5, 2, 1]) In [3]: plt.plot(func0(100), label='Gaussian'); In [4]: plt.plot(func1(100), label='List/array'); In [5]: plt.legend();