Inject sinusoidal Gaussian waveforms. More...
#include <Oinject.h>
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. |
Inject sinusoidal Gaussian waveforms.
Oinject::Oinject | ( | const double | aDuration | ) |
Constructor of the Oinject class.
The ranges for the parameters are set to default values:
A set of random parameters is generated with MakeWaveform(). The user must specify the duration of the injection waveform.
aDuration | waveform duration [s] |
Oinject::~Oinject | ( | void | ) | [virtual] |
Destructor of the Oinject class.
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.
Returns the true value of SNR.
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.
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:
void Oinject::SetAmplitudeRange | ( | const double | aAmpMin, | |
const double | aAmpMax | |||
) | [inline] |
Sets a new amplitude range.
aAmpMin | minimum amplitude | |
aAmpMax | maximum amplitude |
void Oinject::SetFrequencyRange | ( | const double | aFreqMin, | |
const double | aFreqMax | |||
) | [inline] |
Sets a new frequency range.
aFreqMin | minimum frequency [Hz] | |
aFreqMax | maximum frequency [Hz] |
void Oinject::SetQRange | ( | const double | aQMin, | |
const double | aQMax | |||
) | [inline] |
Sets a new Q range.
aQMin | minimum Q | |
aQMax | maximum Q |
void Oinject::SetTimeRange | ( | const double | aTimeMin, | |
const double | aTimeMax | |||
) | [inline] |
Sets a new time range.
aTimeMin | minimum time [s] | |
aTimeMax | maximum time [s] |