Overview: Transforms

This section introduces some of the mathematical concepts used with IDL Advanced Math and Stats.

Fast Fourier Transforms

A fast Fourier transform (FFT) is a discrete Fourier transform that is computed efficiently. The straightforward method for computing the Fourier transform takes approximately n2 operations, where n is the number of points in the transform, while the FFT (which computes the same values) takes approximately nlogn operations. The algorithms in this chapter are modeled after the Cooley-Tukey (1965) algorithm. These functions are most efficient for integers that are highly composite, that is, integers that are a product of the small primes 2, 3, and 5.

For the IMSL_FFTCOMP function, there is a corresponding initialization function (IMSL_FFTINIT). Use IMSL_FFTINIT only when repeatedly transforming one-dimensional sequences of the same data type and length. In this situation, the initialization function computes the initial setup once; subsequently, the user calls the main function with the appropriate keyword. This may result in substantial computational savings. In addition to the one-dimensional transformation described above, the IMSL_FFTCOMP function also can be used to compute a complex two-dimensional FFT and its inverse.

Continuous Versus Discrete Fourier Transform

There is a close connection between the discrete Fourier transform and the continuous Fourier transform. The continuous Fourier transform is defined by Brigham (1974) as follows:

Overview_Transforms-03.jpg

Begin by making the following approximation:

Overview_Transforms-04.jpg

If the last integral approximated using the rectangle rule with spacing h = T/n, the result is given below:

Overview_Transforms-05.jpg

Finally, setting ω = j / T for j = 0, ..., n – 1 yields:

Overview_Transforms-06.jpg

where the vector f  h = (f (–T / 2), ..., f ((n – 1) h T / 2)). Thus, after scaling the components by (–1) jh, the discrete Fourier transform as computed in IMSL_FFTCOMP (with input f  h) is related to an approximation of the continuous Fourier transform by the above formula.

If the function f is expressed as a function, then the continuous Fourier transform:

Overview_Transforms-07.jpg

can be approximated using the IDL Advanced Math and Stats IMSL_INTFCN function to compute a Fourier transform as described in IMSL_INTFCN.