17 #ifndef REALFFTDATA_H_ 18 #define REALFFTDATA_H_ 50 int getHalfSize(
void){
if (!(size%2))
return size/2;
else return size/2+1;}
89 #endif // REALFFTDATA_H_ void findMaxMinPowerBins(void)
Fills the max and min power spectrum bins.
RealFFTData(int sz)
All memory to be allocated internally.
void powerInDB()
This is the power spectrum in dB.
int getSize(void)
Returns the number of elements in the input and output arrays.
int deleteInOutMemory
Var used to specify if the memory was allocated by the RealFFTData class.
void zeroFFTData(void)
This function zeros the output data array (out)
void load(const unsigned int i, const fftw_real val)
int size
Specifies the size of the data array.
int minPowerBin
Specifies the minimum and maximum power bins as used in the methods findMaxMinPowerBins and compPower...
double totalPower
The total power (summed) of the power spectrum as used in the method compPowerSpec.
~RealFFTData(void)
Deconstructor.
int getHalfSize(void)
Returns the number of elements in the power spectrum array.
int compPowerSpec()
This function computes the power spectrum and returns the max bin.
fftw_real unload(const unsigned int i)
class RealFFTData controls and manipulates fft data
int sqrtPowerSpec()
This function computes the square root of the power spectrum and returns the max bin.
fftw_real * power_spectrum
fftw_real unloadPS(const unsigned int i)
fftw_real * in
the input, output and power_spectrum arrays
int limitHalfPowerSpec(double lim)
Limits the maximum to 'lim' and returns the last fft bin with max.
void dumpIn()
For debugging purposes, dump the in array to stdout.
#define fftw_real
use double by default
fftw_real findMaxIn(void)
Returns the maximum input variable.
void dumpOut()
For debugging purposes, dump the out array to stdout.