next up previous
Next: Using FFTEASY in Your Up: Using FFTEASY Previous: Using FFTEASY

Overview of the Functions and Their Arguments

Here then are the four functions included in FFTEASY. I describe below what all the arguments are.

  1. fftc1(float $f[\;]$, int $N$, int $skip$, int $forward$). FFT of a one-dimensional set of complex data.
  2. fftcn(float $f[\;]$, int $ndims$, int $size[\;]$, int $forward$). FFT of an ndims dimensional set of complex data.
  3. fftr1(float $f[\;]$, int $N$, int $forward$). FFT of a one-dimensional set of real data.
  4. fftrn(float $f[\;]$, float $fnyquist[\;]$, int $ndims$, int $size[\;]$, int $forward$). FFT of an ndims dimensional set of real data.

All of these functions take an array $f[\;]$ of the data to be transformed and an integer $forward$ specifying whether to take a forward transform ($forward=1$) or an inverse transform ($forward=-1$). The one-dimensional routines take an integer $N$ giving the number of data points in the array. For fftr1 $N$ is the number of real data points while for fftc1 $N$ is the number of complex data points, meaning that for fftc1 $f$ should be an array of floats of size $f[2N]$. The n dimensional routines take an integer $ndims$ giving the number of dimensions and an array of integers $size$ giving the number of data points (real or complex) in each dimension. For the complex routines the data should alternate between real and imaginary parts, i.e. $f=\{Re(n1), Im(n1), Re(n2), Im(n2),
...\}$. Note that the last dimension of the array $f$ should always be twice as large as the actual number of data points to account for the fact that it takes two floats to represent a complex number. (See the examples in section 4). Finally the function fftrn takes an additional array $fnyquist$ for holding the Nyquist frequency components of the transform. I explain this below when I describe the storage scheme for the results of transforms of real data.

Note that even fftcn and fftrn take as input one dimensional arrays. Actually the functions assume that the data are arranged as in an n-dimensional array, so all you have to do is take your multidimensional array and cast it as a (float *) when you pass it to FFTEASY.


next up previous
Next: Using FFTEASY in Your Up: Using FFTEASY Previous: Using FFTEASY

Go to The FFTEASY Home Page
Go to Gary Felder's Home Page
Send email to Gary at gfelder@email.smith.edu

This documentation was generated on 2003-09-30