get_window#
- gwpy.signal.window.get_window(window: WindowLike, Nx: int, *args, **kwargs) NDArray[source]#
Return a window of a given length and type.
This is a thin wrapper around
scipy.signal.get_windowthat handles pre-computed window arrays.- Parameters:
- window
str,float,tuple,numpy.ndarray The specification for the window. Anything accepted by
scipy.signal.get_windowor an array-like object that is already a window (for convenience).- Nx
int The size of the window. If
windowis an array, this size will be checked against the size of the array.- args, kwargs
All other arguments are passed to
scipy.signal.get_window.
- window
- Returns:
- window
numpy.ndarray A 1-d window array with size
Nx.
- window
- Raises:
ValueErrorIf an
windowis given an array that doesn’t have shape matching(Nx,).
See also
scipy.signal.get_windowFor details of available window types and valid arguments.