Main Page | Class List | Directories | File List | Class Members | File Members

ObitFFT.h File Reference

ObitFFT Fast Fourier Transform class definition. More...

#include "Obit.h"
#include "ObitThread.h"
#include "ObitFArray.h"
#include "ObitCArray.h"
#include "ObitDef.h"
#include "ObitClassDef.h"

Go to the source code of this file.

Classes

struct  ObitFFT
 ObitFFT Class structure. More...
struct  ObitFFTClassInfo
 ClassInfo Structure. More...

Defines

#define ObitFFTUnref(in)   ObitUnref (in)
 Macro to unreference (and possibly destroy) an ObitFFT returns a ObitFFT*.
#define ObitFFTRef(in)   ObitRef (in)
 Macro to reference (update reference count) an ObitFFT.
#define ObitFFTIsA(in)   ObitIsA (in, ObitFFTGetClass())
 Macro to determine if an object is the member of this or a derived class.

Typedefs

typedef ObitFFT *(* newObitFFTFP )(gchar *name, ObitFFTdir dir, ObitFFTtype type, gint rank, gint *dim)
 Typedef for definition of class pointer structure.
typedef void(* ObitFFTR2CFP )(ObitFFT *in, ObitFArray *inArray, ObitCArray *outArray)
typedef void(* ObitFFTC2RFP )(ObitFFT *in, ObitCArray *inArray, ObitFArray *outArray)
typedef void(* ObitFFTC2CFP )(ObitFFT *in, ObitCArray *inArray, ObitCArray *outArray)

Enumerations

enum  obitFFTdir { OBIT_FFT_Forward, OBIT_FFT_Reverse }
enum  obitFFTtype { OBIT_FFT_FullComplex, OBIT_FFT_HalfComplex }

Functions

void ObitFFTClassInit (void)
 Public: Class initializer.
ObitFFTnewObitFFT (gchar *name, ObitFFTdir dir, ObitFFTtype type, gint rank, gint *dim)
 Public: Constructor.
gconstpointer ObitFFTGetClass (void)
 Public: ClassInfo pointer.
gint ObitFFTSuggestSize (gint length)
 Public: Suggest efficient size for a transform.
void ObitFFTR2C (ObitFFT *in, ObitFArray *inArray, ObitCArray *outArray)
 Public: Real to half Complex.
void ObitFFTC2R (ObitFFT *in, ObitCArray *inArray, ObitFArray *outArray)
 Public: Half Complex to Real.
void ObitFFTC2C (ObitFFT *in, ObitCArray *inArray, ObitCArray *outArray)
 Public: Full Complex to Complex.


Detailed Description

ObitFFT Fast Fourier Transform class definition.

This class is derived from the Obit class.

This class is for performing FFT on memory resident data. This implementation uses the FFTW package if available, else gsl

Data order

Data passed to and from ObitFFT routines are as an ObitFArray or ObitCArray which are stored in column major (Fortran) order. Data are passed and returned in "center-at-the-edge" (i.e. unnatural) order and there is NO transpose of the array axes. In the half complex form, the first axis is nx/2+1 where nx is the number of real elements. Only even numbers of elements on each axis will work well.

Creators and Destructors

An ObitFFT can be created using newObitFFT which allows specifying a name for the object, and the type, size and direction of the transform.

A copy of a pointer to an ObitFFT should always be made using the ObitFFTRef function which updates the reference count in the object. Then whenever freeing an ObitFFT or changing a pointer, the function ObitFFTUnref will decrement the reference count and destroy the object when the reference count hits 0. There is no explicit destructor.


Define Documentation

#define ObitFFTIsA in   )     ObitIsA (in, ObitFFTGetClass())
 

Macro to determine if an object is the member of this or a derived class.

Returns TRUE if a member, else FALSE in = object to reference

#define ObitFFTRef in   )     ObitRef (in)
 

Macro to reference (update reference count) an ObitFFT.

returns a ObitFFT*. in = object to reference

#define ObitFFTUnref in   )     ObitUnref (in)
 

Macro to unreference (and possibly destroy) an ObitFFT returns a ObitFFT*.

in = object to unreference


Typedef Documentation

typedef ObitFFT*(* newObitFFTFP)(gchar *name, ObitFFTdir dir, ObitFFTtype type, gint rank, gint *dim)
 

Typedef for definition of class pointer structure.

typedef void(* ObitFFTC2CFP)(ObitFFT *in, ObitCArray *inArray, ObitCArray *outArray)
 

typedef void(* ObitFFTC2RFP)(ObitFFT *in, ObitCArray *inArray, ObitFArray *outArray)
 

typedef void(* ObitFFTR2CFP)(ObitFFT *in, ObitFArray *inArray, ObitCArray *outArray)
 


Enumeration Type Documentation

enum obitFFTdir
 

Enumeration values:
OBIT_FFT_Forward  Sign of exponent in transform = -1, real to complex.
OBIT_FFT_Reverse  Sign of exponent in transform = +1, complex to real.

enum obitFFTtype
 

Enumeration values:
OBIT_FFT_FullComplex  Full complex to complex transforms.
OBIT_FFT_HalfComplex  Real to half complex or reverse.


Function Documentation

ObitFFT* newObitFFT gchar *  name,
ObitFFTdir  dir,
ObitFFTtype  type,
gint  rank,
gint *  dim
 

Public: Constructor.

Initializes class if needed on first call.

Parameters:
name An optional name for the object.
dir The direction of the transform OBIT_FFT_Forward (R2C) or OBIT_FFT_Reverse (C2R).
type Whether OBIT_FFT_FullComplex (full C2C) or OBIT_FFT_HalfComplex (R2C or C2R).
rank of matrix range [1,7]
dim dimensionality of each axis in column major (Fortran) order. If real/half complex is being used, then dim[0] should be the number of reals.
Returns:
the new object.

void ObitFFTC2C ObitFFT in,
ObitCArray inArray,
ObitCArray outArray
 

Public: Full Complex to Complex.

Must have been created with dir = OBIT_FFT_Reverse have same geometry as constructor call. Transform is in the direction specified in constructor call.

Parameters:
in Object with FFT structures.
inArray Array to be transformed (disturbed on output).
outArray Output array

void ObitFFTC2R ObitFFT in,
ObitCArray inArray,
ObitFArray outArray
 

Public: Half Complex to Real.

Must have been created with dir = OBIT_FFT_Reverse and type = OBIT_FFT_HalfComplex and have same geometry as constructor call. Note: FFT returned is not normalized.

Parameters:
in Object with FFT structures.
inArray Array to be transformed (disturbed on output).
outArray Output array

void ObitFFTClassInit void   ) 
 

Public: Class initializer.

gconstpointer ObitFFTGetClass void   ) 
 

Public: ClassInfo pointer.

Returns:
pointer to the class structure.

void ObitFFTR2C ObitFFT in,
ObitFArray inArray,
ObitCArray outArray
 

Public: Real to half Complex.

Must have been created with dir = OBIT_FFT_Forward and type = OBIT_FFT_HalfComplex and have same geometry as constructor call.

Parameters:
in Object with FFT structures.
inArray Array to be transformed (undisturbed on output).
outArray Output array

gint ObitFFTSuggestSize gint  length  ) 
 

Public: Suggest efficient size for a transform.

Parameters:
length number of values to be transformed
Returns:
a number equal or larger than length that will have an efficient transform.


Generated on Fri Aug 31 22:13:05 2007 for Obit by  doxygen 1.3.9.1