My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
gcp::util::Dft Class Reference

Public Types

enum  Apodization {
  APOD_RECTANGLE = 0, APOD_TRIANGLE = 1, APOD_HAMMING = 2, APOD_HANN = 3,
  APOD_COS = 4, APOD_SINC = 5
}
 

Public Member Functions

 Dft (int n, bool optimize=true, Apodization apod=APOD_RECTANGLE)
 
 Dft (const Dft &objToBeCopied)
 
 Dft (Dft &objToBeCopied)
 
void operator= (const Dft &objToBeAssigned)
 
void operator= (Dft &objToBeAssigned)
 
virtual ~Dft ()
 
void resize (unsigned int)
 
void setTimeRes (TimeVal tVal)
 
void setAverage (bool doAv)
 
void setVectorAverage (bool vecAv)
 
void setApodizationType (Apodization apod)
 
unsigned inputSize ()
 
unsigned transformSize ()
 
Frequency getFrequencyResolution ()
 
std::vector< double > powerSpectrum (double *data)
 
std::vector< double > abs ()
 
void abs (float *outputArray, bool &first, double &min, double &max, bool doLog=false)
 
void updateMinMax (unsigned i, double &val, bool doLog, bool &first, double &min, double &max)
 
void fillInputArray (double *data)
 
void computeTransform ()
 
double * getInputData ()
 
fftw_complex * getTransform ()
 
void pushSample (double sample)
 
bool transformIsReady ()
 

Static Public Member Functions

static unsigned transformSize (unsigned n)
 
static Frequency getFrequencyResolution (unsigned npt, TimeVal timeRes)
 
static APOD_FN (apodRectangle)
 
static APOD_FN (apodTriangle)
 
static APOD_FN (apodHamming)
 
static APOD_FN (apodHann)
 
static APOD_FN (apodCos)
 
static APOD_FN (apodSinc)
 

Friends

std::ostream & operator<< (std::ostream &os, Dft &obj)
 

Constructor & Destructor Documentation

Dft::Dft ( int  n,
bool  optimize = true,
Apodization  apod = APOD_RECTANGLE 
)

Constructor for a real transform n points long

....................................................................... Constructor.

Dft::Dft ( const Dft objToBeCopied)

Copy Constructor.

....................................................................... Const Copy Constructor.

Dft::Dft ( Dft objToBeCopied)

Copy Constructor.

....................................................................... Copy Constructor.

Dft::~Dft ( )
virtual

Destructor.

....................................................................... Destructor.

Member Function Documentation

std::vector< double > Dft::abs ( )

Return the absolute value of the output array

....................................................................... Return the absolute value of the output array

void Dft::abs ( float *  outputPtr,
bool &  first,
double &  min,
double &  max,
bool  doLog = false 
)

Return the absolute value of the power spectrum, filling an external array

....................................................................... Return the absolute value of the output array

void Dft::computeTransform ( )

Compute the transform

....................................................................... Compute the transform

void Dft::fillInputArray ( double *  data)

Fill the input data array

....................................................................... Fill the input data array

Frequency Dft::getFrequencyResolution ( )

Get the frequency resolution of the transform

....................................................................... Get the frequency resolution of the transform

Frequency Dft::getFrequencyResolution ( unsigned  n,
TimeVal  timeResolution 
)
static

....................................................................... Get the frequency resolution of the transform

double * Dft::getInputData ( )

Return a pointer to the input data

....................................................................... Return a pointer to the input array

fftw_complex * Dft::getTransform ( )

Return a pointer to the transformed data

....................................................................... Return a pointer to the transformed data

unsigned Dft::inputSize ( )

Return the size of the input array

....................................................................... Return the size of the transformed array

void Dft::operator= ( const Dft objToBeAssigned)

Const Assignment Operator.

....................................................................... Const Assignment Operator.

void Dft::operator= ( Dft objToBeAssigned)

Assignment Operator.

....................................................................... Assignment Operator.

std::vector< double > Dft::powerSpectrum ( double *  data)

Return the power spectrum

....................................................................... Return the power spectrum of the input array

void Dft::pushSample ( double  sample)

Push a sample onto the input array. If this push fills the input buffer, the transform of the input buffer will be computed.

....................................................................... Push a sample onto the input array

void Dft::resize ( unsigned  n)

Resize this object to accomodate transforms of length n. If the pushSample() method is called on this object, it will automatically transform the data when n samples have been pushed into the buffer.

....................................................................... Resize for FFTs of a different length

void Dft::setApodizationType ( Apodization  type)

Set the apodization type (stages the change until the start of the next transform)

....................................................................... User-level method to request an apodization type. This will be asserted at the start of the next transform

void Dft::setAverage ( bool  doAv)

If true, we will store on-the-fly averages of the transforms

....................................................................... If true, we will store on-the-fly averages of the transforms

void Dft::setTimeRes ( TimeVal  tVal)

Set the time resolution of the x-axis. This will be used to calculate frequency span and resolution of the transform.

....................................................................... Set the time resolution of the x-axis. This will be used to calculate frequency span and resolution of the transform.

void Dft::setVectorAverage ( bool  vectorAverage)

If integration is turned on, set the type of integration to do

....................................................................... If true, we will store on-the-fly averages of the transforms

bool Dft::transformIsReady ( )

Will return true after a new transform has been computed, and before the next call to pushSample()

....................................................................... Return true if the input array is full

unsigned Dft::transformSize ( )

Return the size of the transformed array

....................................................................... Return the size of the transformed array

unsigned Dft::transformSize ( unsigned  n)
static

Return the size of the transformed array

....................................................................... Return the size of the transformed array

void Dft::updateMinMax ( unsigned  i,
double &  val,
bool  doLog,
bool &  first,
double &  min,
double &  max 
)

Update the min max

....................................................................... Update the min max

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
Dft obj 
)
friend

Output Operator.


The documentation for this class was generated from the following files: