In file TSeries/FixedLenTS.hh:

class FixedLenTS : public TSeries

Fixed length Time series

Inheritance:


Public Methods

FixedLenTS (void)
Default constructor.
explicit FixedLenTS (Interval max)
Data constructor.
FixedLenTS (const FixedLenTS& x)
Copy constructor.
inline virtual ~FixedLenTS ()
Destructor.
void fixedAppend (const Time& t0, Interval dT, float* x, int n=1)
Append float data.
void fixedAppend (const TSeries& ts)
Append a TSeries.
void padUntil (const Time& t0, Interval dT)
Append zeroes until the specified time.
void setMaxLen (Interval dt)
specify the maximum length.
Interval getMaxLen (void) const
Get the Maximum length.

Inherited from TSeries:

Public Fields

typedef unsigned long size_type
typedef unsigned long stat_type
typedef double math_type

Public Methods

TSeries& copy(const TSeries& in)
std::ostream& Dump(std::ostream& out) const
TSeries decimate(size_type dec) const
void eraseStart(Interval dT)
TSeries extract(const Time& t0, const Interval& dT=Interval(0.0)) const
void extend(const Time& t0)
size_type getBin(const Time& t) const
Time getBinT(size_type inx) const
fComplex getComplex(size_type index) const
size_type getData(size_type len, short* data) const
size_type getData(size_type len, int* data) const
size_type getData(size_type len, float* data) const
size_type getData(size_type len, double* data) const
size_type getData(size_type len, fComplex* data) const
double getDouble(size_type index) const
Time getEndTime(void) const
double getF0(void) const
double getFNyquist(void) const
Interval getInterval(void) const
const char* getName(void) const
size_type getNSample(void) const
Time getStartTime(void) const
Interval getTStep(void) const
math_type getAverage(void) const
fComplex getComplexAverage(void) const
math_type getMaximum(void) const
math_type getMinimum(void) const
size_type getNBetween(math_type low, math_type high) const
size_type getNGreater(math_type Limit) const
size_type getNLess(math_type Limit) const
math_type getSigmaW(void) const
stat_type getStatus(void) const
bool isComplex(void) const
bool empty(void) const
bool isGood(void) const
const DVector* refDVect(void) const
const void* refData(void) const
void* refData(void)
void appName(const char* name)
void combineStatus(stat_type stat)
int setData(const Time& t, const Interval& Step, const short* data, size_type N)
int setData(const Time& t, const Interval& Step, const int* data, size_type N)
int setData(const Time& t, const Interval& Step, const float* data, size_type N)
int setData(const Time& t, const Interval& Step, const double* data, size_type N)
int setData(const Time& t, const Interval& Step, const fComplex* data, size_type N)
void setF0(double f0)
void setFNyquist(double fNy)
void setName(const char* name)
void setSigmaW(math_type sw)
void setStatus(stat_type stat)
int Append(const Time& t, const Interval& Step, const short* data, size_type N)
int Append(const Time& TS, const Interval& Step, const int* data, size_type N)
int Append(const Time& TS, const Interval& Step, const float* data, size_type N)
int Append(const Time& TS, const Interval& Step, const double* data, size_type N)
int Append(const Time& TS, const Interval& Step, const fComplex* data, size_type N)
int Append(const TSeries& t, size_type decim8=1)
void Convert(int type)
void ReSize(size_type len)
void Clear(const Time& t0=Time(0), const Interval& dt=Interval(0.0))
TSeries fShift(math_type f0, math_type phi0=0) const
TSeries& operator=(const TSeries& ts)
math_type operator*(const TSeries& y) const
TSeries operator/(const TSeries& y) const
TSeries& operator+=(math_type bias)
TSeries& operator-=(math_type bias)
TSeries& operator*=(math_type scale)
TSeries& operator/=(math_type scale)
TSeries& operator+=(const TSeries& rhs)
TSeries& operator-=(const TSeries& rhs)
DVector* refDVect(void)
int Contig(const Time& t, const Interval& Step)
size_type overlap(const TSeries& ts, size_type& inx, size_type& inx1) const

Documentation

The fixed length time series is defined in

     #include "FixedLenTS.hh"
     
You set the maximum time either in the constructor, e.g.
     FixedLenTS mHistory(7200.0);
     
Or explicitly
     FixedLenTS mHistory;
     mHistory.setMaxLen(t);
     
You then append data like....
     //----------------------------------  Keep the history
     Time t0 = fs.getStartTime();
     Interval dT = fs.getEndTime()-t0;
     mTimeTot += dT;
     float bandP = mBand;
     mHistory.fixedAppend(t0, dT, &bandP);
     
When it reaches the maximum it starts to delete data from the start, rather than increasing the length. The FixedLenTS is based on a TSeries so you can reference it as you would a TSeries.
FixedLenTS(void)
Default constructor creates a fixed length TSeries with zero length. A FixedLenTS created with this constructor is unusable until the maximum length has been set with setMaxLen()

explicit FixedLenTS(Interval max)
Construct a FixedLengthTS with a specified maximum length.
Parameters:
max - maximum length for time series.

FixedLenTS(const FixedLenTS& x)
Create a FixedLenTS that is an identical copy of the argument series.

inline virtual ~FixedLenTS()
Destroy the Fixed length time series.

void fixedAppend(const Time& t0, Interval dT, float* x, int n=1)
Append one or more float data words to the series. If the series with the appended data is longer than the specified maximum length, data are removed from the beginning of the series and the start time is updated as appropriate.
Parameters:
t0 - Time of first datum.
dT - Time step between data.
x - Pointer to one or more data.
n - Number of data to be appended to the time series.

void fixedAppend(const TSeries& ts)
Append a TSeries to the fixed length series. If the resulting series would be longer than the specified maximum length, data are removed from the start of the current series and/or the start of the data to be appended and the current series start time is updated as appropriate.
Parameters:
ts - Teries to be appended.

void padUntil(const Time& t0, Interval dT)
Append zeros to the series until the specified end-time.
Parameters:
t0 - Time of first datum.
dT - Time step between data.

void setMaxLen(Interval dt)
Set the maximum length for the fixed length time series.
Parameters:
dt - Maximum length

Interval getMaxLen(void) const
Get the Maximum length specified.
Returns:
aximum length.


This class has no child classes.
Author:
J. Zweizig
Version:
1.2; Last modified February 17, 2006

alphabetic index hierarchy of classes


Please send questions and comments to zweizig_j@ligo.caltech.edu


generated by doc++