Oinject Class Reference

Inject sinusoidal Gaussian waveforms. More...

#include <Oinject.h>

List of all members.

Public Member Functions

double GetAmplitude (void)
 Returns the injection amplitude.
double GetAmplitudeMax (void)
 Returns the maximum amplitude.
double GetAmplitudeMin (void)
 Returns the minimum amplitude.
double GetFrequency (void)
 Returns the injection frequency.
double GetFrequencyMax (void)
 Returns the maximum frequency.
double GetFrequencyMin (void)
 Returns the minimum frequency.
double GetPhase (void)
 Returns the injection phase.
double GetQ (void)
 Returns the injection Q.
double GetQMax (void)
 Returns the maximum Q.
double GetQMin (void)
 Returns the minimum Q.
double GetSigmaf (void)
 Returns the injection bandwidth.
double GetSigmat (void)
 Returns the injection duration.
double GetTime (void)
 Returns the injection time.
double GetTimeMax (void)
 Returns the maximum time.
double GetTimeMin (void)
 Returns the minimum time.
double GetTrueSNR (Spectrum *aSpec1, Spectrum *aSpec2)
 Returns the true value of SNR.
double GetWaveform (const int aIndex, const int aSamplingFrequency)
 Returns the waveform value for a given index.
void MakeWaveform (void)
 Generates a new set of waveform parameters.
void SetAmplitudeRange (const double aAmpMin, const double aAmpMax)
 Sets a new amplitude range.
void SetFrequencyRange (const double aFreqMin, const double aFreqMax)
 Sets a new frequency range.
void SetQRange (const double aQMin, const double aQMax)
 Sets a new Q range.
void SetTimeRange (const double aTimeMin, const double aTimeMax)
 Sets a new time range.
Constructors and destructors



 Oinject (const double aDuration)
 Constructor of the Oinject class.
virtual ~Oinject (void)
 Destructor of the Oinject class.

Detailed Description

Inject sinusoidal Gaussian waveforms.

Author:
Florent Robinet

Constructor & Destructor Documentation

Oinject::Oinject ( const double  aDuration  ) 

Constructor of the Oinject class.

The ranges for the parameters are set to default values:

  • time: fixed at 0
  • frequency: 32-2048 Hz
  • Q: 4-100
  • amplitude: fixed at 1e-21

A set of random parameters is generated with MakeWaveform(). The user must specify the duration of the injection waveform.

Parameters:
aDuration waveform duration [s]
Oinject::~Oinject ( void   )  [virtual]

Destructor of the Oinject class.


Member Function Documentation

double Oinject::GetAmplitude ( void   )  [inline]

Returns the injection amplitude.

double Oinject::GetAmplitudeMax ( void   )  [inline]

Returns the maximum amplitude.

double Oinject::GetAmplitudeMin ( void   )  [inline]

Returns the minimum amplitude.

double Oinject::GetFrequency ( void   )  [inline]

Returns the injection frequency.

double Oinject::GetFrequencyMax ( void   )  [inline]

Returns the maximum frequency.

double Oinject::GetFrequencyMin ( void   )  [inline]

Returns the minimum frequency.

double Oinject::GetPhase ( void   )  [inline]

Returns the injection phase.

double Oinject::GetQ ( void   )  [inline]

Returns the injection Q.

double Oinject::GetQMax ( void   )  [inline]

Returns the maximum Q.

double Oinject::GetQMin ( void   )  [inline]

Returns the minimum Q.

double Oinject::GetSigmaf ( void   )  [inline]

Returns the injection bandwidth.

double Oinject::GetSigmat ( void   )  [inline]

Returns the injection duration.

double Oinject::GetTime ( void   )  [inline]

Returns the injection time.

double Oinject::GetTimeMax ( void   )  [inline]

Returns the maximum time.

double Oinject::GetTimeMin ( void   )  [inline]

Returns the minimum time.

double Oinject::GetTrueSNR ( Spectrum aSpec1,
Spectrum aSpec2 
)

Returns the true value of SNR.

Parameters:
aSpec1 noise spectrum (1)
aSpec2 noise spectrum (2)
double Oinject::GetWaveform ( const int  aIndex,
const int  aSamplingFrequency 
) [inline]

Returns the waveform value for a given index.

The waveform value is computed according to the set of parameters previously generated with MakeWaveform(). The user must specify the frequency at which the data vector is sampled. This way, combined with the duration set in the constructor, the index can be converted to a time value.

Parameters:
aIndex waveform vector index
aSamplingFrequency sampling frequency [Hz]
void Oinject::MakeWaveform ( void   ) 

Generates a new set of waveform parameters.

The waveform parameters are randomly generated:

  • time: uniform
  • frequency: uniform
  • Q: uniform
  • amplitude: uniform in log
  • phase: uniform
void Oinject::SetAmplitudeRange ( const double  aAmpMin,
const double  aAmpMax 
) [inline]

Sets a new amplitude range.

Parameters:
aAmpMin minimum amplitude
aAmpMax maximum amplitude
void Oinject::SetFrequencyRange ( const double  aFreqMin,
const double  aFreqMax 
) [inline]

Sets a new frequency range.

Parameters:
aFreqMin minimum frequency [Hz]
aFreqMax maximum frequency [Hz]
void Oinject::SetQRange ( const double  aQMin,
const double  aQMax 
) [inline]

Sets a new Q range.

Parameters:
aQMin minimum Q
aQMax maximum Q
void Oinject::SetTimeRange ( const double  aTimeMin,
const double  aTimeMax 
) [inline]

Sets a new time range.

Parameters:
aTimeMin minimum time [s]
aTimeMax maximum time [s]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Friends Defines

Generated on 29 Sep 2016 by  doxygen 1.6.1