FFTPACK
Fast Fourier Transform Package
FFTPACK is a FORTRAN90 library,
using single precision arithmetic,
which computes Fast Fourier Transforms.
Special features include:
-
real or complex data can be handled;
-
separate routines for forward analysis (data => Fourier coefficients)
and backward analysis (Fourier coefficients => data);
-
special "easy" routines;
-
sine and cosine transform routines;
-
quarter wave sine and cosine transform routines;
-
the amount of data is NOT required to be a power of 2.
In most cases, you will need to call several routines from FFTPACK in
order to get your results. In the simplest case, you will need to call
just two routines:
-
an initialization routine;
-
the corresponding forward or backward computational routine.
In more complicated situations, you might want to call three routines:
-
an initialization routine;
-
the corresponding forward or backward computational routine;
-
the corresponding backward or forward computational routine.
In a few cases, a single routine may be used for both the forward and
backward computation.
Sometimes, a routine has been so heavily optimized that it is
impossible to determine if it is really a correct implementation of
the relatively simple Fourier formulas. In some cases, a "slow"
version of a transform routine has been supplied, simply to provide
a simple check that the formulas are correct.
The following table shows how the routines are grouped:
Initialization | Forward | Backward | Purpose |
CFFTI | CFFTF | CFFTB | FFT for complex data |
COSQI | COSQF | COSQB | Quarter wave cosine FFT |
COSTI | COST | COST | Even function cosine FFT |
EZFFTI | EZFFTF | EZFFTB | Easy version of RFFT routines |
RFFTI | RFFTF | RFFTB | FFT for real data |
SINQI | SINQF | SINQB | Quarter wave sine FFT |
SINTI | SINT | SINT | Odd function sine FFT |
Related Data and Programs:
FFTPACK5
is a more recent version of FFTPACK.
FFTW3 is a C library which computes Fast Fourier Transforms. You
may refer to
C examples or
FORTRAN77 examples.
GSL
is the Gnu Scientific Library, which includes a number of FFT routines.
NMS
is a FORTRAN90 library which includes a number of FFT routines.
SLATEC
is a FORTRAN90 library which includes FFTPACK.
Reference:
-
William Briggs and Van Emden Henson,
The Discrete Fourier Transform,
SIAM,
QA403.5 B75
-
Bill Buzbee,
The SLATEC Common Math Library,
in Sources and Development of Mathematical Software,
edited by W. Cowell,
Prentice Hall, 1984, pages 302-318.
-
Chu and George,
Inside the FFT Black Box,
CRC Press,
QA403.5 C5
-
David Kahaner, Cleve Moler, Steven Nash,
Numerical Methods and Software,
Prentice Hall, 1988.
-
Paul Swarztrauber,
Vectorizing the FFT's,
in Parallel Computations,
edited by G. Rodrigue,
Academic Press, 1982, pages 51-83.
Source Code:
Examples and Tests:
List of Routines:
-
C4VEC_PRINT_SOME prints some of a C4VEC.
-
C4VEC_UNIFORM_01 returns a unit pseudorandom C4VEC.
-
CFFTB computes the backward complex discrete Fourier transform.
-
CFFTB1 is a lower-level routine used by CFFTB.
-
CFFTB_2D computes a backward two dimensional complex fast Fourier transform.
-
CFFTF computes the forward complex discrete Fourier transform.
-
CFFTF1 is a lower level routine used by CFFTF.
-
CFFTF_2D computes a two dimensional complex fast Fourier transform.
-
CFFTI initializes WSAVE, used in CFFTF and CFFTB.
-
CFFTI1 is a lower level routine used by CFFTI.
-
COSQB computes the fast cosine transform of quarter wave data.
-
COSQB1 is a lower level routine used by COSQB.
-
COSQF computes the fast cosine transform of quarter wave data.
-
COSQF1 is a lower level routine used by COSQF.
-
COSQI initializes WSAVE, used in COSQF and COSQB.
-
DADF2 is a lower level routine used by DFFTF1.
-
DADF3 is a lower level routine used by DFFTF1.
-
DADF4 is a lower level routine used by DFFTF1.
-
DADF5 is a lower level routine used by DFFTF1.
-
DADFG is a lower level routine used by DFFTF1.
-
DCOST computes the discrete Fourier cosine transform of an even sequence.
-
DCOSTI initializes WSAVE, used in DCOST.
-
DFFTF computes the Fourier coefficients of a real periodic sequence.
-
DFFTF1 is a lower level routine used by DFFTF and DSINT.
-
DFFTI initializes WSAVE, used in DFFTF and DFFTB.
-
DFFTI1 is a lower level routine used by DFFTI.
-
DSINT computes the discrete Fourier sine transform of an odd sequence.
-
DSINT1 is a lower level routine used by DSINT.
-
DSINTI initializes WSAVE, used in DSINT.
-
EZFFTB computes a real periodic sequence from its Fourier coefficients.
-
EZFFTF computes the Fourier coefficients of a real periodic sequence.
-
EZFFTI initializes WSAVE, used in EZFFTF and EZFFTB.
-
EZFFTI1 is a lower level routine used by EZFFTI.
-
I4_FACTOR factors an integer.
-
PASSB is a lower level routine used by CFFTB1.
-
PASSB2 is a lower level routine used by CFFTB1.
-
PASSB3 is a lower level routine used by CFFTB1.
-
PASSB4 is a lower level routine used by CFFTB1.
-
PASSB5 is a lower level routine used by CFFTB1.
-
PASSF is a lower level routine used by CFFTF1.
-
PASSF2 is a lower level routine used by CFFTF1.
-
PASSF3 is a lower level routine used by CFFTF1.
-
PASSF4 is a lower level routine used by CFFTF1.
-
PASSF5 is a lower level routine used by CFFTF1.
-
R4_CAS returns the "casine" of a number.
-
R4_SWAP swaps two R4's.
-
R4_UNIFORM returns a scaled pseudorandom R4.
-
R4_SCT computes a real "slow" cosine transform.
-
R4_SFTB computes a "slow" backward Fourier transform of real data.
-
R4_SFTF computes a "slow" forward Fourier transform of real data.
-
R4_SHT computes a "slow" Hartley transform of real data.
-
R4_SST computes a real "slow" sine transform.
-
R4_SQCTB computes a real "slow" quarter cosine transform backward.
-
R4_SQCTF computes a real "slow" quarter cosine transform forward.
-
R4_SQSTB computes a real "slow" quarter sine transform backward.
-
R4_SQSTF computes a real "slow" quarter sine transform forward.
-
R4VEC_INDICATOR sets a real vector to the indicator vector.
-
R4VEC_PRINT_SOME prints "some" of a real vector.
-
R4VEC_REVERSE reverses the elements of a real vector.
-
R4VEC_UNIFORM returns a scaled pseudorandom R4VEC.
-
R8_SCT computes a double precision "slow" cosine transform.
-
R8_SCT computes a double precision "slow" cosine transform.
-
R8_SST computes a double precision "slow" sine transform.
-
R8_UNIFORM returns a scaled pseudorandom R8.
-
R8VEC_INDICATOR sets an R8VEC to the indicator vector.
-
R8VEC_PRINT_SOME prints "some" of an R8VEC.
-
R8VEC_UNIFORM returns a scaled pseudorandom R8VEC.
-
RADB2 is a lower level routine used by RFFTB1.
-
RADB3 is a lower level routine used by RFFTB1.
-
RADB4 is a lower level routine used by RFFTB1.
-
RADB5 is a lower level routine used by RFFTB1.
-
RADBG is a lower level routine used by RFFTB1.
-
RADF2 is a lower level routine used by RFFTF1.
-
RADF3 is a lower level routine used by RFFTF1.
-
RADF4 is a lower level routine used by RFFTF1.
-
RADF5 is a lower level routine used by RFFTF1.
-
RADFG is a lower level routine used by RFFTF1.
-
RANDOM_INITIALIZE initializes the FORTRAN 90 random number seed.
-
RCOST computes the discrete Fourier cosine transform of an even sequence.
-
RCOSTI initializes WSAVE, used in RCOST.
-
RFFTB computes a real periodic sequence from its Fourier coefficients.
-
RFFTB1 is a lower level routine used by RFFTB.
-
RFFTF computes the Fourier coefficients of a real periodic sequence.
-
RFFTF1 is a lower level routine used by RFFTF and RSINT.
-
RFFTI initializes WSAVE, used in RFFTF and RFFTB.
-
RFFTI1 is a lower level routine used by RFFTI.
-
SINQB computes the fast sine transform of quarter wave data.
-
SINQF computes the fast sine transform of quarter wave data.
-
SINQI initializes WSAVE, used in SINQF and SINQB.
-
RSINT computes the discrete Fourier sine transform of an odd sequence.
-
RSINT1 is a lower level routine used by RSINT.
-
RSINTI initializes WSAVE, used in RSINT.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 12 November 2006.