#include <FFT2D.h>
Public Member Functions | |
FFT2D (Bool useFFTW=True) | |
This is a not a full generic fft class...use FFTServer or LatticeFFT for that. | |
~FFT2D () | |
FFT2D & | operator= (const FFT2D &other) |
void | r2cFFT (Complex *&out, Float *&in, Long x, Long y) |
out has to be a pointer to an array [(x/2+1), y] shape | |
void | r2cFFT (Lattice< Complex > &out, Lattice< Float > &in) |
Real to complex FFT2D ..each plane of out will contain FFT in X/2+1, Y... | |
void | c2cFFT (Complex *&out, Long x, Long y, Bool toFreq=True) |
In place 2D FFT; out has to be of shape [x,y] (origin is at the x/2,y/2). | |
void | c2cFFT (DComplex *&out, Long x, Long y, Bool toFreq=True) |
void | c2cFFT (Lattice< Complex > &inout, Bool toFreq=True) |
This will return the 2D FFT of each x-y planes back into the lattice. | |
void | c2cFFT (Lattice< DComplex > &inout, Bool toFreq=True) |
void | fftShift (Complex *&scr, Long x, Long y, Bool toFreq=False) |
The toFreq=False in FFTShift does the normalization of 1/N_sample expected of ifft. | |
void | fftShift (DComplex *&scr, Long x, Long y, Bool toFreq=False) |
void | fftShift (Float *&scr, Long x, Long y) |
void | doFFT (Complex *&out, Long x, Long y, Bool toFreq) |
void | doFFT (DComplex *&out, Long x, Long y, Bool toFreq) |
void | doFFT (Complex *&out, Float *&in, Long x, Long y) |
Private Attributes | |
fftwf_plan | planC2C_p |
FFTW stuff. | |
fftwf_plan | planR2C_p |
fftw_plan | planC2CD_p |
Bool | useFFTW_p |
std::vector< Float > | wsave_p |
FFTPack stuff. | |
Int | lsav_p |
Definition at line 34 of file FFT2D.h.
casa::FFT2D::FFT2D | ( | Bool | useFFTW = True |
) |
This is a not a full generic fft class...use FFTServer or 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))
casa::FFT2D::~FFT2D | ( | ) |
void casa::FFT2D::c2cFFT | ( | Lattice< DComplex > & | inout, | |
Bool | toFreq = True | |||
) |
void casa::FFT2D::c2cFFT | ( | Lattice< Complex > & | inout, | |
Bool | toFreq = True | |||
) |
This will return the 2D FFT of each x-y planes back into the lattice.
void casa::FFT2D::c2cFFT | ( | DComplex *& | out, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq = True | |||
) |
void casa::FFT2D::c2cFFT | ( | Complex *& | out, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq = True | |||
) |
In place 2D FFT; out has to be of shape [x,y] (origin is at the x/2,y/2).
void casa::FFT2D::doFFT | ( | Complex *& | out, | |
Float *& | in, | |||
Long | x, | |||
Long | y | |||
) |
void casa::FFT2D::doFFT | ( | DComplex *& | out, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq | |||
) |
void casa::FFT2D::doFFT | ( | Complex *& | out, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq | |||
) |
void casa::FFT2D::fftShift | ( | Float *& | scr, | |
Long | x, | |||
Long | y | |||
) |
void casa::FFT2D::fftShift | ( | DComplex *& | scr, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq = False | |||
) |
void casa::FFT2D::fftShift | ( | Complex *& | scr, | |
Long | x, | |||
Long | y, | |||
Bool | toFreq = False | |||
) |
The toFreq=False in FFTShift does the normalization of 1/N_sample expected of ifft.
void casa::FFT2D::r2cFFT | ( | Lattice< Complex > & | out, | |
Lattice< 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
void casa::FFT2D::r2cFFT | ( | Complex *& | out, | |
Float *& | in, | |||
Long | x, | |||
Long | y | |||
) |
out has to be a pointer to an array [(x/2+1), y] shape
Int casa::FFT2D::lsav_p [private] |
fftwf_plan casa::FFT2D::planC2C_p [private] |
fftw_plan casa::FFT2D::planC2CD_p [private] |
fftwf_plan casa::FFT2D::planR2C_p [private] |
Bool casa::FFT2D::useFFTW_p [private] |
std::vector<Float> casa::FFT2D::wsave_p [private] |