|
BALL
1.4.1
|
#include <BALL/MATHS/FFT1D.h>
Public Types | |
| typedef std::complex< typename ComplexTraits::ComplexPrecision > | Complex |
| typedef TRegularData1D < std::complex< typename ComplexTraits::ComplexPrecision > > | ComplexVector |
Public Member Functions | |
| void | doFFT () |
| void | doiFFT () |
| bool | translate (double trans_origin) |
| bool | setPhysStepWidth (double new_width) |
| double | getPhysStepWidth () const |
| double | getFourierStepWidth () const |
| double | getPhysSpaceMin () const |
| double | getPhysSpaceMax () const |
| double | getFourierSpaceMin () const |
| double | getFourierSpaceMax () const |
| Size | getMaxIndex () const |
| Size | getNumberOfInverseTransforms () const |
| double | getGridCoordinates (Position position) const |
| Complex | getData (const double pos) const |
| Complex | getInterpolatedValue (const double pos) const |
| void | setData (double pos, Complex val) |
| Complex & | operator[] (const double pos) |
| const Complex & | operator[] (const double pos) const |
| Complex & | operator[] (const Position &pos) |
| const Complex & | operator[] (const Position &pos) const |
| void | setNumberOfFFTTransforms (Size num) |
| void | setNumberOfiFFTTransforms (Size num) |
| bool | isInFourierSpace () const |
| Complex | phase (const double pos) const |
Constructors and Destructors | |
| TFFT1D () | |
| Default constructor. | |
| TFFT1D (const TFFT1D &data) | |
| Copy constructor. | |
| TFFT1D (Size ldn, double stepPhys=1., double origin=0., bool inFourierSpace=false) | |
| virtual | ~TFFT1D () |
| Destructor. | |
Assignment | |
| const TFFT1D & | operator= (const TFFT1D &fft1d) |
| Assignment operator. | |
| virtual void | clear () |
| virtual void | destroy () |
Predicates | |
| bool | operator== (const TFFT1D &fft1d) const |
Protected Attributes | |
| Size | length_ |
| bool | inFourierSpace_ |
| Size | numPhysToFourier_ |
| Size | numFourierToPhys_ |
| double | origin_ |
| The origin of the data set. | |
| double | stepPhys_ |
| double | stepFourier_ |
| double | minPhys_ |
| double | maxPhys_ |
| double | minFourier_ |
| double | maxFourier_ |
| ComplexTraits::FftwPlan | planForward_ |
| ComplexTraits::FftwPlan | planBackward_ |
| Complex * | dataAdress_ |
| bool | planCalculated_ |
A class to perform Fast Fourier Transforms and inverse Fast Fourier Transforms on regularly spaced one dimensional data.
| typedef std::complex<typename ComplexTraits::ComplexPrecision> BALL::TFFT1D< ComplexTraits >::Complex |
| typedef TRegularData1D<std::complex<typename ComplexTraits::ComplexPrecision> > BALL::TFFT1D< ComplexTraits >::ComplexVector |
| BALL::TFFT1D< ComplexTraits >::TFFT1D | ( | ) |
Default constructor.
Global assignment operator from FFT2D to TRegularData2D<Complex> Global assignment operator from FFT3D to TRegularData3D<float>. This operator assigns the real part of the complex FFT2D-data to the TRegularData2D<float> to.
| BALL::TFFT1D< ComplexTraits >::TFFT1D | ( | const TFFT1D< ComplexTraits > & | data | ) |
Copy constructor.
| BALL::TFFT1D< ComplexTraits >::TFFT1D | ( | Size | ldn, |
| double | stepPhys = 1., |
||
| double | origin = 0., |
||
| bool | inFourierSpace = false |
||
| ) |
Detailed constructor.
| ldn | The binary logarithm of the number of grid points (we use the logarithm to ensure that the number of points is a power of two, which is important for the FFT) |
| stepPhys | The step width in physical space |
| origin | The origin of the coordinate system |
| inFourierSpace | Flag to decide whether the data is assumed to be in physical or fourier space |
| virtual BALL::TFFT1D< ComplexTraits >::~TFFT1D | ( | ) | [virtual] |
Destructor.
| virtual void BALL::TFFT1D< ComplexTraits >::clear | ( | ) | [virtual] |
Clear the contents.
Reimplemented from BALL::TRegularData1D< std::complex< ComplexTraits::ComplexPrecision > >.
| virtual void BALL::TFFT1D< ComplexTraits >::destroy | ( | ) | [virtual] |
Clear the contents and reset all attributes.
| void BALL::TFFT1D< ComplexTraits >::doFFT | ( | ) |
Perform a single fast fourier transform on the data.
| void BALL::TFFT1D< ComplexTraits >::doiFFT | ( | ) |
Perform a single inverse fourier transform on the data.
| TFFT1D< ComplexTraits >::Complex BALL::TFFT1D< ComplexTraits >::getData | ( | const double | pos | ) | const |
Returns the data at the grid position closest to pos , and automatically includes the correct phase factor and normalization.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
| double BALL::TFFT1D< ComplexTraits >::getFourierSpaceMax | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getFourierSpaceMin | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getFourierStepWidth | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getGridCoordinates | ( | Position | position | ) | const |
| TFFT1D< ComplexTraits >::Complex BALL::TFFT1D< ComplexTraits >::getInterpolatedValue | ( | const double | pos | ) | const |
Returns the data at point pos. If pos is not a point on the grid, the data is linearly interpolated. This method automatically includes the correct phase factor and normalization.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
| Size BALL::TFFT1D< ComplexTraits >::getMaxIndex | ( | ) | const |
| Size BALL::TFFT1D< ComplexTraits >::getNumberOfInverseTransforms | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getPhysSpaceMax | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getPhysSpaceMin | ( | ) | const |
| double BALL::TFFT1D< ComplexTraits >::getPhysStepWidth | ( | ) | const |
| bool BALL::TFFT1D< ComplexTraits >::isInFourierSpace | ( | ) | const |
| const TFFT1D& BALL::TFFT1D< ComplexTraits >::operator= | ( | const TFFT1D< ComplexTraits > & | fft1d | ) |
Assignment operator.
| bool BALL::TFFT1D< ComplexTraits >::operator== | ( | const TFFT1D< ComplexTraits > & | fft1d | ) | const |
| TFFT1D< ComplexTraits >::Complex & BALL::TFFT1D< ComplexTraits >::operator[] | ( | const double | pos | ) |
Access the data at the grid position closest to pos . This function returns the "raw" data at that position.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
| const TFFT1D< ComplexTraits >::Complex & BALL::TFFT1D< ComplexTraits >::operator[] | ( | const double | pos | ) | const |
Access the data at the grid position closest to pos . This function returns the "raw" data at that position.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
| Complex& BALL::TFFT1D< ComplexTraits >::operator[] | ( | const Position & | pos | ) | [inline] |
Access the (raw) data at Position pos
| Exception::OutOfGrid | if pos is outside the grid boundaries |
Reimplemented from BALL::TRegularData1D< std::complex< ComplexTraits::ComplexPrecision > >.
| const Complex& BALL::TFFT1D< ComplexTraits >::operator[] | ( | const Position & | pos | ) | const [inline] |
Access the (raw) data at Position pos. Const method.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
Reimplemented from BALL::TRegularData1D< std::complex< ComplexTraits::ComplexPrecision > >.
| TFFT1D< ComplexTraits >::Complex BALL::TFFT1D< ComplexTraits >::phase | ( | const double | pos | ) | const |
| void BALL::TFFT1D< ComplexTraits >::setData | ( | double | pos, |
| Complex | val | ||
| ) |
Sets the data point at the grid position closest to pos to the value val , and -- if called in fourier space -- automatically includes the correct phase factor and normalization.
| Exception::OutOfGrid | if pos is outside the grid boundaries |
| void BALL::TFFT1D< ComplexTraits >::setNumberOfFFTTransforms | ( | Size | num | ) | [inline] |
| void BALL::TFFT1D< ComplexTraits >::setNumberOfiFFTTransforms | ( | Size | num | ) | [inline] |
| bool BALL::TFFT1D< ComplexTraits >::setPhysStepWidth | ( | double | new_width | ) |
| bool BALL::TFFT1D< ComplexTraits >::translate | ( | double | trans_origin | ) |
Complex* BALL::TFFT1D< ComplexTraits >::dataAdress_ [protected] |
bool BALL::TFFT1D< ComplexTraits >::inFourierSpace_ [protected] |
Size BALL::TFFT1D< ComplexTraits >::length_ [protected] |
double BALL::TFFT1D< ComplexTraits >::maxFourier_ [protected] |
double BALL::TFFT1D< ComplexTraits >::maxPhys_ [protected] |
double BALL::TFFT1D< ComplexTraits >::minFourier_ [protected] |
double BALL::TFFT1D< ComplexTraits >::minPhys_ [protected] |
Size BALL::TFFT1D< ComplexTraits >::numFourierToPhys_ [protected] |
Size BALL::TFFT1D< ComplexTraits >::numPhysToFourier_ [protected] |
double BALL::TFFT1D< ComplexTraits >::origin_ [protected] |
The origin of the data set.
Reimplemented from BALL::TRegularData1D< std::complex< ComplexTraits::ComplexPrecision > >.
ComplexTraits::FftwPlan BALL::TFFT1D< ComplexTraits >::planBackward_ [protected] |
bool BALL::TFFT1D< ComplexTraits >::planCalculated_ [protected] |
ComplexTraits::FftwPlan BALL::TFFT1D< ComplexTraits >::planForward_ [protected] |
double BALL::TFFT1D< ComplexTraits >::stepFourier_ [protected] |
double BALL::TFFT1D< ComplexTraits >::stepPhys_ [protected] |
1.7.6.1