This section describes radix-2 FFT algorithms for real data. They use the Cooley-Tukey algorithm to compute in-place FFTs for lengths which are a power of 2.
The radix-2 FFT functions for real data are declared in the header files `gsl_fft_real.h'
This function computes an in-place radix-2 FFT of length n and stride stride on the real array data. The output is a half-complex sequence, which is stored in-place. The arrangement of the half-complex terms uses the following scheme: for @math{k < N/2} the real part of the @math{k}-th term is stored in location @math{k}, and the corresponding imaginary part is stored in location @math{N-k}. Terms with @math{k > N/2} can be reconstructed using the symmetry @math{z_k = z^*_{N-k}}. The terms for @math{k=0} and @math{k=N/2} are both purely real, and count as a special case. Their real parts are stored in locations @math{0} and @math{N/2} respectively, while their imaginary parts which are zero are not stored.
The following table shows the correspondence between the output data and the equivalent results obtained by considering the input data as a complex sequence with zero imaginary part,
complex[0].real = data[0] complex[0].imag = 0 complex[1].real = data[1] complex[1].imag = data[N-1] ............... ................ complex[k].real = data[k] complex[k].imag = data[N-k] ............... ................ complex[N/2].real = data[N/2] complex[N/2].real = 0 ............... ................ complex[k'].real = data[k] k' = N - k complex[k'].imag = -data[N-k] ............... ................ complex[N-1].real = data[1] complex[N-1].imag = -data[N-1]
The radix-2 FFT functions for halfcomplex data are declared in the header file `gsl_fft_halfcomplex.h'.
These functions compute the inverse or backwards in-place radix-2 FFT of
length n and stride stride on the half-complex sequence
data stored according the output scheme used by
gsl_fft_real_radix2
. The result is a real array stored in natural
order.