24#define fftw_real double
26#define c_re(c) ((c)[0])
27#define c_im(c) ((c)[1])
32#define PLANTYPE FFTW_ESTIMATE
40 fftw_complex *
in, *out;
69 fftw_plan fwdPlan, invPlan;
71 void createPlan(
void);
73 void destroyPlan(
void);
class complexFFTData controls and manipulates complex fft data
fftw_complex * in
the input and output arrays
~complexFFTData(void)
Deconstructor.
double totalPower
The total power (summed) of the power spectrum as used in the method compPowerSpec.
fftw_real * power_spectrum
the power_spectrum array
int compPowerSpec()
This function computes the power spectrum and returns the max bin.
int size
Specifies the size of the data array.
int getSize()
Returns the number of elements in the input and output arrays.
void switchData(complexFFTData *d)
Use this to change associated fft data (for fft'ing)
int limitHalfPowerSpec(double lim)
Limits the maximum to 'lim' and returns the last fft bin with max
complexFFTData(int sz)
Constructor with all memory to be allocated internally.
class complexFFT controls fftw plans and executes fwd/inv transforms
void fwdTransform()
Forward transform the data (in to out)
complexFFT(complexFFTData *d)
fft init ... data pointed to by 'd'
complexFFTData * data
The pointer to the relevant data.
void switchData(complexFFTData *d)
Use this to change associated fft data (for fft'ing)
void invTransform()
Inverse transform the data (out to in)
~complexFFT()
fft deconstructor