Diana Software
QRealComplexFFTGSL.hh
Go to the documentation of this file.
1 
11 #ifndef __QREALCOMPLFFTGSL_
12 #define __QREALCOMPLFFTGSL_
13 
14 #include "QFFT.hh"
15 #include <gsl/gsl_fft_real.h>
16 #include <gsl/gsl_fft_halfcomplex.h>
17 
19 
20 class QVectorC;
21 
22 class QRealComplexFFTGSL: public QFFT {
23 
24 public:
29  QRealComplexFFTGSL(const int size);
37  virtual ~QRealComplexFFTGSL();
48  virtual int TransformToFreq(const QVector& data, QVectorC& FFT,
49  bool compress=false);
60  virtual int TransformFromFreq(const QVectorC& FT, QVector& spectrum,
61  bool compress=false);
62 
63 
68  virtual void SetWindowType(WindowType wt, int coherent = 0);
69 
70 protected:
71 
72  virtual int Transform(const QVector& data, QVector& result);
73 
74 private:
75  // RF should not be called from outside, but done
76  // automatically at Transform time
77  virtual bool Resize(size_t s);
78 
87  gsl_fft_real_wavetable* fWaveTable;
88  gsl_fft_halfcomplex_wavetable* fHCWaveTable;
89  gsl_fft_real_workspace* fWork;
90 
92 
93 
94 };
95 
97 
98 #endif
#define Q_END_NAMESPACE
Definition: QDiana.hh:22
#define Q_BEGIN_NAMESPACE
Definition: QDiana.hh:20
Interface for ffts in Diana analysis.
Definition: QFFT.hh:26
WindowType
window type
Definition: QFFT.hh:30
perform FFT of real vectors using GSL FFT
QRealComplexFFTGSL()
empty constructor
virtual int TransformFromFreq(const QVectorC &FT, QVector &spectrum, bool compress=false)
transform from the frequencies to the times
gsl_fft_halfcomplex_wavetable * fHCWaveTable
virtual int TransformToFreq(const QVector &data, QVectorC &FFT, bool compress=false)
transform from the times to the frequencies
virtual int Transform(const QVector &data, QVector &result)
virtual method. Must be implemented by daughter classes.
virtual ~QRealComplexFFTGSL()
destructor
virtual void SetWindowType(WindowType wt, int coherent=0)
resize working table and space
virtual bool Resize(size_t s)
virtual method. Must be implemented by daughter classes
gsl_fft_real_workspace * fWork
ClassDef(QRealComplexFFTGSL, 0)
gsl_fft_real_wavetable * fWaveTable
set the window type.
Interface for complex vectors in Diana analysis.
Definition: QVectorC.hh:25
Interface for vectors in Diana analysis.
Definition: QVector.hh:30