FFT Module Documentation

(typeset 22 October 1996)

Copyright (C) 1996 David Ascher, Jim Hugunin, etc.

All Rights Reserved

The functions in this module are Pythonic (1) wrappers around the low-level routines offered by the FFTPACK routines. Those are themselves based either on the fft library installed in your system or on fftpack_lite if those routines are not present.

1-dimensional FFT

The function fft(a, n=len(a), axis=-1) takes an array and returns the n point discrete Fourier transform of that array. By default, n is equal to the length of a. This is a one-dimensional FFT, which is performed along the axis specified by the last argument. That axis defaults to the last axis (-1). This is an example of a computational operation on an array. The default is different for such operations than for structural arrays because XXXX.

1-dimensional Inverse FFT

The function inverse_fft(a, n=len(a), axis=-1) takes an array and returns the n point inverse discrete Fourier transform of that array. By default, n is equal to the length of a. This is a one-dimensional FFT, which is performed along the axis specified by the last argument. That axis defaults to the last axis (-1).

2-dimensional FFT

The function fft2d(a, n=len(a), axes=(-2,-1)) takes an array and returns the n point discrete Fourier transform of that array. By default, n is equal to the length of a. This is a two-dimensional FFT, which is performed along the axes specified by the last argument. Those axes are by default the last two axes, in that order.

1-dimensional FFT of real array

The function real_fft(a, n=len(a), axis=-1) takes a real-valued array and returns the n point inverse discrete Fourier transform of that array. By default, n is equal to the length of a. This is a one-dimensional FFT, which is performed along the axis specified by the last argument. That axis defaults to the last axis (-1). The returned array will be one half of the symmetric complex transform of the real array.

2-dimensional FFT of real array

The function real_fft2d(a, n=len(a), axes=(-2,-1)) takes a real-valued array and returns the n point discrete Fourier transform of that array. By default, n is equal to the length of a. This is a two-dimensional FFT, which is performed along the axes specified by the last argument. Those axes are by default the last two axes, in that order.