![]() |
Diana Software
|
Wrapper for a specific QRealComplexFFT algorithm class. More...
Public Member Functions | |
| QRealComplexFFT () | |
| QRealComplexFFT (const size_t Size) | |
| virtual | ~QRealComplexFFT () |
| virtual int | TransformToFreq (const QVector &data, QVectorC &FFT, bool compress=false) |
| transform from the times to the frequencies More... | |
| virtual int | TransformFromFreq (const QVectorC &FT, QVector &spectrum, bool compress=false) |
| transform from the frequencies to the times More... | |
| virtual void | SetWindowType (WindowType wt, int coherent=0) |
| resize working table and space More... | |
Public Member Functions inherited from QFFT | |
| QFFT (const size_t size) | |
| constructor with its size More... | |
| QFFT () | |
| empty constructor with its size More... | |
| virtual | ~QFFT () |
| destructor More... | |
| int | GetWindowType () const |
| Return the window type. More... | |
| void | SetForward (bool isForward) |
| virtual method. Must be implemented by daughter classes set the direction of the transform. More... | |
| void | SetNormalized (bool isNormalized) |
| virtual method. Must be implemented by daughter classes set the normalization of the transform. More... | |
Static Public Member Functions | |
| static const char * | GetFFTLibrary () |
Static Public Member Functions inherited from QFFT | |
| static QVector | FFTAntiSym (const QVector &input) |
| antisimmetrize time domain vector More... | |
| static QVector | FFTSym (const QVector &input) |
| simmetrize time domain vector More... | |
| static QVector | ZeroPad (const QVector &input, size_t n_zeros, int Side=kMiddle, double zeroVal=0.) |
| Add zeros to the input. More... | |
| static QVectorC | ZeroPad (const QVectorC &input, size_t n_zeros, int Side=kMiddle, Diana::QComplex zeroVal=Diana::QComplex(0, 0)) |
| Add zeros to the input. More... | |
| static WindowType | StrToWindowType (const std::string &winName) |
| Convert string to window type. More... | |
| static QVector | GetWindow (WindowType wt, size_t size, size_t zeros=0, int coherent=0, int param=0) |
| create window and add zeros/2 to the left and zeros/2 to the right More... | |
| static QVector | CutSides (const QVector &input, size_t ncut, bool isSym) |
| cut left and right sides by ncut/2 More... | |
| static bool | IsPowerOf2 (UInt_t Value) |
| Is the input a power of 2. More... | |
| static bool | IsPowerOf2 (UInt_t Value, UInt_t &Power, UInt_t &Remainder) |
| Is the input a power of 2? More... | |
Static Public Attributes | |
| static double | fTimer |
| The total amount of time performing FFTs by the program. More... | |
| static size_t | fNCalls |
Private Member Functions | |
| bool | Resize (size_t s) |
| Not implemented. More... | |
| int | Transform (const QVector &, QVector &) |
| Not implemented in this class. Only called classes. More... | |
Private Attributes | |
| QRealComplexFFTW3 * | fFFTW |
| QRealComplexFFTGSL * | fGSL |
Additional Inherited Members | |
Public Types inherited from QFFT | |
| enum | WindowType { WT_None = 0 , WT_Welch = 1 , WT_Rect = 2 , WT_Hann = 3 , WT_Hamming = 4 , WT_Cosinus = 5 , WT_BlackmanHarris = 6 , WT_Kaiser3 = 7 } |
| window type More... | |
| enum | ZeroPadSide { kMiddle = 0 , kSymmetric = 1 , kLeft = 2 , kRight = 3 } |
| enum | FFTDirection { kForward = 1 , kBackward = 0 } |
Protected Member Functions inherited from QFFT | |
| void | IsPowerOf2 () |
| ClassDef (QFFT, 0) | |
Protected Attributes inherited from QFFT | |
| size_t | fSize |
| FFTDirection | fDirection |
| bool | fNormalized |
| bool | fIsPowerOf2 |
| double * | fData |
| double * | fWindow |
| size_t | fWindowSize |
| WindowType | fWindowType |
Wrapper for a specific QRealComplexFFT algorithm class.
This class is just an alias for either QRealComplexFFTW3 or QRealComplexFFTGSL, depending on the presence of the FFTW3 headers. FFTW3 always takes precedence. It is kept just for backwards compatibility.
This is really an ugly implementation for what should be a typedef. Unfortunately, there are issues to work around. Rootcint needs to generate a dictionary for this class, so we can not accomplish everything just with preprocessor macros. Second, the header file cannot use HAVE_FFTW3 flag because this may not be defined in all packages, (it may not get added to the CXXFlAGS), so the header file cannot reference this macro. Finally, it cannot just be a typedef because other header files forward declare it as a class. This creates problems. So this is an ugly workaround.
For backward compatibility.
Definition at line 32 of file QRealComplexFFT.hh.
| QRealComplexFFT::QRealComplexFFT | ( | ) |
Definition at line 10 of file QRealComplexFFT.cc.
| QRealComplexFFT::QRealComplexFFT | ( | const size_t | Size | ) |
Definition at line 20 of file QRealComplexFFT.cc.
|
virtual |
Definition at line 30 of file QRealComplexFFT.cc.
|
static |
Definition at line 73 of file QRealComplexFFT.cc.
Referenced by QOptions::QOptions().
|
inlineprivatevirtual |
|
virtual |
resize working table and space
| s | is the size of the real array to be transformed |
Implements QFFT.
Definition at line 66 of file QRealComplexFFT.cc.
References fFFTW, fGSL, QRealComplexFFTGSL::SetWindowType(), and QRealComplexFFTW3::SetWindowType().
Referenced by MNoiseAvgPowerSpectrum::Do().
Not implemented in this class. Only called classes.
Implements QFFT.
Definition at line 85 of file QRealComplexFFT.hh.
|
virtual |
transform from the frequencies to the times
| result | stores the spectra size of the FFT is size of @FFF |
Definition at line 52 of file QRealComplexFFT.cc.
References fFFTW, fGSL, fNCalls, fTimer, t0, QRealComplexFFTGSL::TransformFromFreq(), and QRealComplexFFTW3::TransformFromFreq().
Referenced by BesselTransformer::BesselTransformer(), BesselTransformer::ConvolveFD(), and MLockinDenoising::Do().
|
virtual |
transform from the times to the frequencies
| result | stores the fft size of the FFT is size of @data |
Definition at line 38 of file QRealComplexFFT.cc.
References fFFTW, fGSL, fNCalls, fTimer, t0, QRealComplexFFTGSL::TransformToFreq(), and QRealComplexFFTW3::TransformToFreq().
Referenced by BesselTransformer::BesselTransformer(), BesselTransformer::ConvolveFD(), MNoiseAvgPowerSpectrum::Do(), and MLockinDenoising::Do().
|
private |
Definition at line 87 of file QRealComplexFFT.hh.
Referenced by QRealComplexFFT(), SetWindowType(), TransformFromFreq(), TransformToFreq(), and ~QRealComplexFFT().
|
private |
Definition at line 88 of file QRealComplexFFT.hh.
Referenced by QRealComplexFFT(), SetWindowType(), TransformFromFreq(), TransformToFreq(), and ~QRealComplexFFT().
|
static |
Definition at line 73 of file QRealComplexFFT.hh.
Referenced by TransformFromFreq(), and TransformToFreq().
|
static |
The total amount of time performing FFTs by the program.
For debugging purposes. Stored in us;
Definition at line 71 of file QRealComplexFFT.hh.
Referenced by TransformFromFreq(), and TransformToFreq().