fftwindow#

caput.algorithms.fft.fftw.FFTW.fftwindow(x, window)[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.

Both the forward and backward FFTs must be initialised.

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

Input array

window(…, N, …) array_like

Window to be applied in the Fourier domain.

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

Input array x with window applied in the Fourier domain.

Raises:
AttributeError

If either the forward or the backward FFT is not initialized.