fftshift_phase#

diffsims.utils.fourier_transform.fftshift_phase(x)[source]#

Fast implementation of fft_shift: fft(fftshift_phase(x)) = fft_shift(fft(x))

Note two things: - this is an in-place manipulation of the (3D) input array - the input array must have even side lengths. This is softly guaranteed by fast_fft_len but will raise error if not true.