previous next Up Title Contents

AnFourierT Module


The FFT_FourierT(...) Routine

Syntax

void FFT_FourierT(double *data, unsigned long nn, int isign);


Description
This routine performs a fast fourier transform (FFT) algorithm, returning the result to the same data[0 - nn-1] array. It expects the real and imaginary values to be interleaved in the array.

If isign = 1 then a forward FFT is performed, while a value of -1 performs a reverse FFT. It uses the Danielson-Lanczos Lemma, and is based upon (but not copied from) the Numerical Recipes algorithm, i.e. it uses pointers.



Returns
none.


Example(s)
RealFT_FourierT(...) routine.

The FFT_FourierT_Complex(...) Routine

Syntax

void FFT_FourierT_Complex(Complex data[], unsigned long nn, int isign);


Description
This routine performs a fast fourier transform (FFT) algorithm, returning the result to the same data[0 - nn-1] array of complex data structures.

If isign = 1 then a forward FFT is performed, while a value of -1 performs a reverse FFT. It uses the Danielson-Lanczos Lemma, and is based upon (but not copied from) the Numerical Recipes algorithm, i.e. it uses data structures.



Returns
none.


Example(s)

The RealFT_FourierT(...) Routine??

Syntax
BOOLN RealFT_FourierT(SignalDataPtr signal, int direction);


Description
This function calculates the normalised real Fourier transformation of the signal SignalData structure, returning the result to the same signal.

If direction = 1 then a forward FFT is performed, while a value of -1 performs a reverse FFT.



Returns
TRUE if this function succeeeds, otherwise it returns FALSE.


See Also
Modulus_FourierT(...) routine.

Example: Tests/Analysis/RealFT.c

Parameter file: RealFT.par:
#
# Main Parameter file
#
output1.dat		Name of first output file.
output2.dat		Name of first output file.
#
# Module specifications.
#
#Par. file		Name			Description
#---------		-----			-------------
PTone4.par		PureTone		Stimulus generation paradigm.
#
# Miscellaneous parameters
#
2.5e-3		Ramp up rise time for signal (s).
Output

??

Figure [49] Real Fourier Transform of a pure tone signal.

??

Figure [50] Reverse Fourier Transform, returning the original signal.

Comments:

The standard test for a Fourier transform algorithm is if it can transform a signal forwards and backwards, returning the signal to its original state.

Figure Error! Reference source not found. shows the raw Fourier transform of a pure tone stimulus. Figure Error! Reference source not found. is the result of the reverse Fourier transform algorithm acting upon the previous signal. The original signal was a ramped pure tone.


previous next Up Title Contents