fftwindow#

caput.algorithms.fft.fftw.fftwindow(x, window, axes=None)[source]#

Apply a window function in Fourier space.

The only difference between this and fftconvolve() is that this assumes that window is already in the Fourier domain, and window can be real or complex when x is complex.

If the window is to be applied repeatedly to arrays with the same size and dtype, it is faster to use the FFTW class directly to avoid creating new :py:class`.FFTW` objects.

Parameters:
x(…, N, …) complex array_like

Input array

window(…, N, …) array_like

Window to be applied in the Fourier domain.

axesint | iterable[int], optional

Axes over which to apply the window. Default is all axes.

Returns:
out(…, N, …) complex ndarray

Input array x with window applied in the Fourier domain.