FFTW#
- class caput.algorithms.fft.fftw.FFTW(shape, dtype, axes=None, forward=True, backward=True)[source]#
Create FFTW objects for repeat use.
This implementation is most efficient when used to repeatedly apply FFTs to arrays with the same shape and dtype, because a single, highly optimised pathway can be used with a single initialisation.
Even for a single use, this will typically be faster than the
scipy.fft()ornumpy.fft()implementations, especially when multiple cores are available.- Parameters:
- shape
tuple[int, …] The shape of the arrays to initialise.
- dtype
dtype Datatype to create a pathway for. At the moment, only
complex -> complexorreal -> realare supported. Thepyfftwimplementation of thereal -> realbackward transform will destroy the input array.- axes
int| iterable[int], optional Axes over which to apply the FFT. Default is all axes.
- forwardbool, optional
If true, initialise the forward FFT. Default is True.
- backwardbool, optional
If true, initialise the backward FFT. Default is True.
- shape
Methods#
|
Perform a forward FFT. |
|
Convolve two arrays by multiplying in the Fourier domain. |
|
Apply a window function in Fourier space. |
|
Perform a backward FFT. |