class DecimateBy2 : public Pipe

Decimation by 2^N.

Inheritance:


Public Methods

DecimateBy2(void)
Default constructor.
explicit DecimateBy2(int N, int FilterID=1)
Constructor.
~DecimateBy2(void)
Virtual destructor.
TSeries apply(const TSeries& ts)
Return a Decimated TSeries.
TSeries operator)(const TSeries& ts)
Return a Decimated TSeries.
void dataCheck(const TSeries& ts) const
Check the data for validity
bool isDataValid(const TSeries& ts) const
Check the data for validity
void setDecimation(int N, int FilterID=1)
Set the number of decimate-by-2 steps to perform.
void reset(void)
Set the number of decimate-by-2 steps to perform.

Inherited from Pipe:

Public Methods

virtual bool inUse(void) const
KeyChain& getInputKeys(void) const
KeyChain& getOutputKeys(void) const
virtual Time getStartTime(void) const
virtual Time getCurrentTime(void) const

Inherited from FilterBase:

Public Methods

virtual bool rootGetStartTime(Time& t) const throw()
virtual bool rootGetCurrentTime(Time& t) const throw()

Documentation

The DecimateBy2 class decimates a TSeries by 2^N. The TSeries data are filtered before decimation to remove aliasing. This class is essentially a wrapper of the C code written for LIGO GDS by Peter Fritschel.

DecimateBy2 is based on the DMT FilterBase clas and as such is can be treated as a generic DMT Filter. The decimation may be applied to the TSeries with either the apply method or the parentheses operator. These methods return a complex TSeries if the input series is complex, and a single precision floating point TSeries for all other input series data types.

Four anti-aliasinglow-pass FIR filters are available, each of which cuts of at 0.9 F_{Nyquist}. The options are tabulated below:
ID Order Comments
1 42 Least-Squares design, ripple ~.015 (-0.2 dB)
2 42 Equiripple design, ripple ~0.06 dB
3 22 Least-squares design, ripple ~0.1 (-1 dB)
4 82 Least-squares design, ripple ~0.0006 (-0.01 dB)
The antialiasing filters add an effective delay of , where N is the number of stages (the decimation factor exponent) and is the filter order. This delay is NOT added to the TSeries start time.

DecimateBy2(void)
Build an empty Decimator.

explicit DecimateBy2(int N, int FilterID=1)
Build a Decimator and specify the decimation factor and the anti-aliasing filter type.

~DecimateBy2(void)
Destroy the DecimateBy2 object and release the function storage.

TSeries apply(const TSeries& ts)
The argument time series is filtered to remove aliasing, and decimated by 2^N. The argument TSeries is left unchanged.

TSeries operator)(const TSeries& ts)
The argument time series is filtered to remove aliasing, and decimated by 2^N. The argument TSeries is left unchanged.

void dataCheck(const TSeries& ts) const
Check the data for validity. If the data are not applicable for this DecimateBy2, an exception is thrown.

bool isDataValid(const TSeries& ts) const
Check the data for validity. Performs the same data checks as dataCheck() but returns a boolean status instead f throwing an exception.

void setDecimation(int N, int FilterID=1)
The Decimate by 2 may be used to decimate by an arbitrary power of 2. This sets the power.
Parameters:
N - Number of stages.

void reset(void)
Clear/release the internal History vector and reset the current time.


This class has no child classes.
Author:
John G. Zweizig, based on C function written by P. Fritschel
Version:
1.1 ; Modified July 21, 1999

alphabetic index hierarchy of classes


generated by doc++