In file DecimateBy2/DecimateBy2.hh:

class DecimateBy2 : public Pipe

Decimation by 2^N.

Inheritance:


Public Methods

DecimateBy2 (void)
Default constructor.
explicit DecimateBy2 (int N, int FilterID=1)
Constructor.
DecimateBy2 (const DecimateBy2& x)
Copy constructor.
DecimateBy2& operator= (const DecimateBy2& x)
Copy constructor.
~DecimateBy2 (void)
Virtual destructor.
DecimateBy2* clone (void) const
Clone the filter.
TSeries apply (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.
double getPhase (void) const
Return the phase difference resulting from the FIR antialiasing filters
Interval getTimeDelay (void) const
Return the Time difference resulting from the FIR antialiasing filters

Inherited from Pipe:

Public Methods

virtual TSeries operator)(const TSeries& in)
FilterIO& operator)(const FilterIO& in)
virtual bool inUse(void) const
KeyChain& getInputKeys(void) const
KeyChain& getOutputKeys(void) const
virtual Time getStartTime(void) const
virtual Time getCurrentTime(void) const
virtual bool Xfer(fComplex& coeff, double f) const
virtual bool Xfer(fComplex* tf, const float* freqs, int points) const
virtual bool Xfer(FSeries& Fs, float Fmin = 0.0, float Fmax = 1000.0, float dF = 1.0) const

Protected Methods

virtual bool xfer(fComplex& coeff, double f) 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-aliasing low-pass FIR filters are available, each of which cuts off 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.
Parameters:
N - Number of stages.
FilterID - Type code of anti-aliasing filter.

DecimateBy2(const DecimateBy2& x)
Build a Decimator as specified identical to the argument.
Parameters:
Decimation - filter to be copied.

DecimateBy2& operator=(const DecimateBy2& x)
Build a Decimator as specified identical to the argument.
Parameters:
Decimation - filter to be copied.

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

DecimateBy2* clone(void) const
Clone a decimation filter.
Returns:
Pointer to the cloned object.

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.

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.
FilterID - Type code of anti-aliasing filter.

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

double getPhase(void) const
Return the phase difference resulting from the FIR antialiasing filters

Interval getTimeDelay(void) const
Return the Time difference resulting from the FIR antialiasing filters


This class has no child classes.
Author:
John G. Zweizig, based on C function written by P. Fritschel
Version:
1.2 ; Modified May 14, 2004

alphabetic index hierarchy of classes


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


generated by doc++