casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
casa::FFT2D Class Reference

#include <FFT2D.h>

Public Member Functions

 FFT2D (casacore::Bool useFFTW=true)
 
 ~FFT2D ()
 
FFT2Doperator= (const FFT2D &other)
 
void r2cFFT (casacore::Complex *&out, casacore::Float *&in, casacore::Long x, casacore::Long y)
 out has to be a pointer to an array [(x/2+1), y] shape More...
 
void r2cFFT (casacore::Lattice< casacore::Complex > &out, casacore::Lattice< casacore::Float > &in)
 Real to complex FFT2D ..each plane of out will contain FFT in X/2+1, Y... More...
 
void c2cFFT (casacore::Complex *&out, casacore::Long x, casacore::Long y, casacore::Bool toFreq=true)
 In place 2D FFT; out has to be of shape x,y More...
 
void c2cFFT (casacore::DComplex *&out, casacore::Long x, casacore::Long y, casacore::Bool toFreq=true)
 
void c2cFFT (casacore::Lattice< casacore::Complex > &inout, casacore::Bool toFreq=true)
 This will return the 2D FFT of each x-y planes back into the lattice. More...
 
void c2cFFT (casacore::Lattice< casacore::DComplex > &inout, casacore::Bool toFreq=true)
 
void c2cFFTInDouble (casacore::Lattice< casacore::Complex > &inout, casacore::Bool toFreq=true)
 Same as above EXCEPT will do the FFT in DComplex but input and output are Complex. More...
 
void fftShift (casacore::Complex *&scr, casacore::Long x, casacore::Long y, casacore::Bool toFreq=false)
 The toFreq=false in FFTShift does the normalization of 1/N_sample expected of ifft. More...
 
void fftShift (casacore::DComplex *&scr, casacore::Long x, casacore::Long y, casacore::Bool toFreq=false)
 
void fftShift (casacore::Float *&scr, casacore::Long x, casacore::Long y)
 
void doFFT (casacore::Complex *&out, casacore::Long x, casacore::Long y, casacore::Bool toFreq)
 
void doFFT (casacore::DComplex *&out, casacore::Long x, casacore::Long y, casacore::Bool toFreq)
 
void doFFT (casacore::Complex *&out, casacore::Float *&in, casacore::Long x, casacore::Long y)
 

Static Public Member Functions

static void complexConvert (casacore::DComplex *&srcD, casacore::Complex *&scr, const ooLong len, const casacore::Bool down=false)
 C style element conversion avoiding overhead of iterators etc... More...
 

Private Types

typedef unsigned long long ooLong
 This is a not a full generic fft class...use casacore::FFTServer or casacore::LatticeFFT for that. More...
 

Private Attributes

fftwf_plan planC2C_forw_p
 casacore::FFTW stuff More...
 
fftwf_plan planC2C_back_p
 
fftwf_plan planR2C_p
 
fftw_plan planC2CD_forw_p
 
fftw_plan planC2CD_back_p
 
casacore::Bool useFFTW_p
 
std::vector< casacore::Floatwsave_p
 casacore::FFTPack stuff More...
 
casacore::Int lsav_p
 
casacore::Long nx_p
 casacore::FFTW fft1_p; More...
 
casacore::Long ny_p
 

Detailed Description

Definition at line 34 of file FFT2D.h.

Member Typedef Documentation

typedef unsigned long long casa::FFT2D::ooLong
private

This is a not a full generic fft class...use casacore::FFTServer or casacore::LatticeFFT for that.

This is optimized with minimal memcopies for 2D FFTs Assumes 2D x, y array to be even numbers (e.g (100, 200)...will not work for (101, 200)) IMPORTANT: do not use the same FFT2D object for different sizes of x,y. Create another one if necessary as the plan or butterfly in fftpack, for x,y shape is kept and reused so may give wrong result if the FFT2D is used for x',y' shape !!

Definition at line 43 of file FFT2D.h.

Constructor & Destructor Documentation

casa::FFT2D::FFT2D ( casacore::Bool  useFFTW = true)
casa::FFT2D::~FFT2D ( )

Member Function Documentation

void casa::FFT2D::c2cFFT ( casacore::Complex *&  out,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq = true 
)

In place 2D FFT; out has to be of shape x,y

void casa::FFT2D::c2cFFT ( casacore::DComplex *&  out,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq = true 
)
void casa::FFT2D::c2cFFT ( casacore::Lattice< casacore::Complex > &  inout,
casacore::Bool  toFreq = true 
)

This will return the 2D FFT of each x-y planes back into the lattice.

void casa::FFT2D::c2cFFT ( casacore::Lattice< casacore::DComplex > &  inout,
casacore::Bool  toFreq = true 
)
void casa::FFT2D::c2cFFTInDouble ( casacore::Lattice< casacore::Complex > &  inout,
casacore::Bool  toFreq = true 
)

Same as above EXCEPT will do the FFT in DComplex but input and output are Complex.

static void casa::FFT2D::complexConvert ( casacore::DComplex *&  srcD,
casacore::Complex *&  scr,
const ooLong  len,
const casacore::Bool  down = false 
)
static

C style element conversion avoiding overhead of iterators etc...

void casa::FFT2D::doFFT ( casacore::Complex *&  out,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq 
)
void casa::FFT2D::doFFT ( casacore::DComplex *&  out,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq 
)
void casa::FFT2D::doFFT ( casacore::Complex *&  out,
casacore::Float *&  in,
casacore::Long  x,
casacore::Long  y 
)
void casa::FFT2D::fftShift ( casacore::Complex *&  scr,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq = false 
)

The toFreq=false in FFTShift does the normalization of 1/N_sample expected of ifft.

void casa::FFT2D::fftShift ( casacore::DComplex *&  scr,
casacore::Long  x,
casacore::Long  y,
casacore::Bool  toFreq = false 
)
void casa::FFT2D::fftShift ( casacore::Float *&  scr,
casacore::Long  x,
casacore::Long  y 
)
FFT2D& casa::FFT2D::operator= ( const FFT2D other)
void casa::FFT2D::r2cFFT ( casacore::Complex *&  out,
casacore::Float *&  in,
casacore::Long  x,
casacore::Long  y 
)

out has to be a pointer to an array [(x/2+1), y] shape

void casa::FFT2D::r2cFFT ( casacore::Lattice< casacore::Complex > &  out,
casacore::Lattice< casacore::Float > &  in 
)

Real to complex FFT2D ..each plane of out will contain FFT in X/2+1, Y...

the remainder of of the X part is untouched of out lattice is larger than X/2+1 on the x-axis

Member Data Documentation

casacore::Int casa::FFT2D::lsav_p
private

Definition at line 82 of file FFT2D.h.

casacore::Long casa::FFT2D::nx_p
private

casacore::FFTW fft1_p;

Definition at line 84 of file FFT2D.h.

casacore::Long casa::FFT2D::ny_p
private

Definition at line 84 of file FFT2D.h.

fftwf_plan casa::FFT2D::planC2C_back_p
private

Definition at line 75 of file FFT2D.h.

fftwf_plan casa::FFT2D::planC2C_forw_p
private

casacore::FFTW stuff

Definition at line 74 of file FFT2D.h.

fftw_plan casa::FFT2D::planC2CD_back_p
private

Definition at line 78 of file FFT2D.h.

fftw_plan casa::FFT2D::planC2CD_forw_p
private

Definition at line 77 of file FFT2D.h.

fftwf_plan casa::FFT2D::planR2C_p
private

Definition at line 76 of file FFT2D.h.

casacore::Bool casa::FFT2D::useFFTW_p
private

Definition at line 79 of file FFT2D.h.

std::vector<casacore::Float> casa::FFT2D::wsave_p
private

casacore::FFTPack stuff

Definition at line 81 of file FFT2D.h.


The documentation for this class was generated from the following file: