25#define fftw_real double
27#define c_re(c) ((c)[0])
28#define c_im(c) ((c)[1])
33#define PLANTYPE FFTW_ESTIMATE
45 fftw_real *
in, *power;
58 double xSumMin, xSumMax, ySumMin, ySumMax;
96 void clearInput(
void){memset(
in, 0, x*2*(y/2+1)*
sizeof(fftw_real));}
104 fftw_plan fwdPlan, invPlan;
class real2DFFTData controls and manipulates real 2D fft data
int getXSize()
The row count.
fftw_real * xSum
Arrays which sum across rows (x) and columns (y)
double totalPower
The total power in the power spectrum, the maximum and minimum powers too.
fftw_real * realXSum
Power spectral sums across rows (x) and columns (y)
int getYSize()
The column count.
void reScale(void)
Scales the output down by the number of elements.
void clearOutput(void)
Zeros the out awway.
void compPowerSpec()
This function computes the power spectrum and updates the totalPower, maxPower and minPower.
void findYSum(int start, int stop)
Finds the y-sum between columns start and stop.
void timeSpecAverage()
Updates timeXSum.
~real2DFFTData()
Deconstructor.
double xSumMin
The minimum/maximum row (x) and column (y) sums.
int maxXSumIndex
Row (x) and Column (y) max sum indexes.
void clearInput(void)
Zeros the in array.
int getYHalfSize()
The half column count.
int getXHalfSize()
The half row count.
void compLogPowerSpec()
Finds 10*log10(power spectrum) and updates the totalPower, maxPower and minPower.
real2DFFTData(int r, int c)
Constructor with all memory to be allocated internally.
fftw_complex * out
The output data.
void findYMax(void)
Finds the y-max for the ySum array, updates ySumMin, ySumMax, maxYSumIndex.
fftw_real * in
The input data and power spectrum.
void complexSpecAverage()
Updates realXSum and imagXSum.
fftw_real * timeXSum
A sum across the input time signal.
class real2DFFT controls fftw plans and executes fwd/inv transforms
void fwdTransform()
Forward transform the data (in to out)
real2DFFT(real2DFFTData *d)
fft init ... data pointed to by 'd'
void invTransform()
Inverse transform the data (out to in)
real2DFFTData * data
The pointer to the relevant data.
~real2DFFT()
fft deconstructor