fft#

kikuchipy.pattern.fft(pattern: ndarray, apodization_window: None | ndarray | Window = None, shift: bool = False, real_fft_only: bool = False, **kwargs) ndarray[source]#

Compute the discrete Fast Fourier Transform (FFT) of an EBSD pattern.

Very light wrapper around routines in scipy.fft. The routines are wrapped instead of used directly to accommodate easy setting of shift and real_fft_only.

Parameters:
pattern

EBSD pattern.

apodization_window

An apodization window to apply before the FFT in order to suppress streaks.

shift

Whether to shift the zero-frequency component to the centre of the spectrum (default is False).

real_fft_only

If True, the discrete FFT is computed for real input using scipy.fft.rfft2(). If False (default), it is computed using scipy.fft.fft2().

**kwargs

Keyword arguments pass to scipy.fft.fft2() or scipy.fft.rfft2().

Returns:
out

The result of the 2D FFT.