namespace generator class DampedSine : public DataSource

Damped sinusoid data source.

Inheritance:


Public Methods

DampedSine(void)
Default constructor
DampedSine(double Amp, double Freq, double Q, double Phi=0.0, double wid=6.0)
Parameter constructor
~DampedSine(void)
Destructor
DampedSine* clone(void) const
Construct an identical data source
const char* getDataType(void) const
Get the data source type name.
Interval getDuration(void) const
Get the duration of data to be generated.
Interval getStartOffset(void) const
Get the duration of data to be generated.

Inherited from DataSource:

Public Classes

enum RepMode
kContinuous
Continuous data source
kSingle
Generate a single event
kRate
Generate events with poisson statistics
kFixed
Generate events at fixed intervals
class SrcEvent
SrcEvent(void)
Default SrcEvent constructor
SrcEvent(const std::string& name, const std::string& comment, const Time& t0, Interval before, Interval after, const ParamMap& map)
SrcEvent data constructor
const char* getComment(void) const
Get the comment field
const char* getInputs(void) const
Get the input data
const char* getName(void) const
Get the data source name
const Time& getGPSMax(void) const
Get the GPS time of the maximum value
Interval getTimeBefore(void) const
Get the duration of the generated waveform before the maximum time
Interval getTimeAfter(void) const
Get the duration of the generated waveform after the maximum time
double getAmplitude(void) const
Get the waveform amplitude
const ParamList& getParamList(void) const
Get a list of the generated parameters

Public Methods

static DataSource* parse(const std::string& desc)
virtual std::ostream& dump(std::ostream& out) const
bool isContinuous(void) const
void generate(const Time& t0, Interval dt)
int getDebug(void) const
Time getLatest(void) const
const char* getName(void) const
virtual double getNumeric(const std::string& name) const
virtual const char* getParameter(const std::string& name) const
double getRate(void) const
Interval getSample(void) const
Time getStartTime(void) const
Time getTrigTime(void) const
TSeries getTimeSeries(const Time& t0, Interval dT) const
const TSeries& getTimeSeries(void) const
virtual std::string getSourceName(void) const
virtual void randomize(void)
void release(const Time& t0)
void setDebug(int lvl)
void setName(const std::string& name)
virtual void setParameter(const std::string& name, const std::string& val)
virtual void setParameter(const std::string& name, double value)
void setSample(Interval dT)
void setTriggerRate(double rate)
void setTriggerTime(const Time& t0)
bool getWriteFlag(void) const
bool getSaveFlag(void) const
void setWriteFlag(bool yorn=true)
void setSaveFlag(bool yorn=true)
unsigned long getNEvent(void) const
const SrcEvent& refEvent(void) const
const SrcEvent& refEvent(unsigned long i) const
void eraseEvent(unsigned long N)

Documentation

DampedSine is a damped sinusoid generator. The generated waveform is:
           x(t)  = A * sin(omega*t + phi) * exp(-(t-to)*omega/Q )
       
where the parameters are derived from the Generator Parameters as follows: A='A', omega=2*pi*'F' and phi='Phi'. The parameter 'Width' specifies the duration of the waveform to be generated and is specified in units of Q/omega. At the default Width value of 6.0, the gaussian envelope has decreased to 1.25x10^-4 of its initial amplitude.
DampedSine(void)
Default constructor

DampedSine(double Amp, double Freq, double Q, double Phi=0.0, double wid=6.0)
Parameter constructor
Parameters:
Amp - is the amplitude (A).
Freq - is the sinusoid frequency (F).
Q - is the quality factor (Q).
Phi - is the initial phase (Phi).
wid - is the generation width.

~DampedSine(void)
Destructor

DampedSine* clone(void) const
Construct an identical data source

const char* getDataType(void) const
This function returns a literal string "DampedSine";

Interval getDuration(void) const
Returns the duration of generated data. This is calculated on an event-by-event basis as Q*Width/(2*pi*F).
Returns:
Duraiton of generated data.

Interval getStartOffset(void) const
Returns the start of generated data relative to the critical time specified. For DampedSine this always returns zero.
Returns:
Duration of generated data.


This class has no child classes.
Author:
John Zweizig
Version:
1.1; Last modified February 23, 2004

alphabetic index hierarchy of classes


generated by doc++