- UniformGrid.fft(output_scalars_name=None, progress_bar=False)#
Apply a fast Fourier transform (FFT) to the active scalars.
The input can be real or complex data, but the output is always
numpy.complex128. The filter is fastest for images that have power of two sizes.
The filter uses a butterfly diagram for each prime factor of the dimension. This makes images with prime number dimensions (i.e. 17x17) much slower to compute. FFTs of multidimensional meshes (i.e volumes) are decomposed so that each axis executes serially.
The frequencies of the output assume standard order: along each axis first positive frequencies are assumed from 0 to the maximum, then negative frequencies are listed from the largest absolute value to smallest. This implies that the corners of the grid correspond to low frequencies, while the center of the grid corresponds to high frequencies.
Apply FFT to an example image.
>>> from pyvista import examples >>> image = examples.download_moonlanding_image() >>> fft_image = image.fft() >>> fft_image.point_data pyvista DataSetAttributes Association : POINT Active Scalars : PNGImage Active Vectors : None Active Texture : None Active Normals : None Contains arrays : PNGImage complex128 (298620,) SCALARS
See Fast Fourier Transform for a full example using this filter.