BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Fourier transform of vectors (in 1D or 2D) using Fast Fourier Transform (fftw package). More...
Public Types | |
typedef std::vector< double > | double1d_t |
definition of 1D vector of double | |
typedef std::vector< double1d_t > | double2d_t |
definition of 2D vector of double | |
Public Member Functions | |
void | fft (const double1d_t &source, double1d_t &result) |
FT in 1D. | |
void | fftshift (double1d_t &result) |
Shift low frequency to the center of 1D FT array. | |
void | fft (const double2d_t &source, double2d_t &result) |
FT in 2D. | |
void | fftshift (double2d_t &result) |
Shift low frequency to the center of 2D FT array. | |
void | init (int h_src, int w_src) |
prepare arrays for 2D Fourier Transformation (FT) of the given vector | |
Fourier transform of vectors (in 1D or 2D) using Fast Fourier Transform (fftw package).
Usage: std::vector<double> signal, result; FourierTransform ft; ft.fft(signal, result)
Given code rely on code from Jeremy Fix page, http://jeremy.fix.free.fr/spip.php?article15, see also "Efficient convolution using the Fast Fourier Transform, Application in C++" by Jeremy Fix, May 30, 2011
Definition at line 34 of file FourierTransform.h.