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
numpy
orscipy.signal.windows
modules.list, array_like: transformed to an array and interpolated onto
size
points.
kwargs – Argument passed to the low level window function at calling time.
- Returns:
callable – A function that only a
size
argument
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();