components.fft.fft

pyctools.components.fft.fft.FFT

Compute Fourier transform.

pyctools.components.fft.fft.VisualiseFFT

Convert output of FFT to a viewable image.

class FFT(config={}, **kwds)[source]

Bases: Transformer

Compute Fourier transform.

The image can be divided into (non-overlapping) tiles of any size. It is padded out to an integer number of tiles in each direction. If you need overlapping tiles, preprocess your images with the Tile component. If you want to window the data before computing the FFT, use the Modulate component with a window function from window.

Inputs can be real or complex. The output type is set by the output config value.

The VisualiseFFT component can be used to convert the (complex) Fourier transform of a picture into a viewable image.

The submean option can be used to reduce the amplitude of the “zero frequency” output bin. This can reduce leakage that might mask nearby low amplitude frequencies.

Config

xtile

int

Horizontal tile size. If zero a single tile the width of the picture is used.

ytile

int

Vertical tile size. If zero a single tile the height of the picture is used.

inverse

bool

FFT or IFFT.

submean

bool

Subtract mean value of each tile before computing FFT.

output

str

Can be set to complex or real.

VisualiseFFT(config={})[source]

Convert output of FFT to a viewable image.

Computes the logarithmic magnitude of a complex FT and scales to 0..255 range.


Comments or questions? Please email jim@jim-easterbrook.me.uk.