In file Limiter/Limiter.hh:

class Limiter : public Pipe

Limiter

Inheritance:


Public Classes

enum limiter_type
Limiter type
kNoLimits
No limits
kValues
Bounds
kSlewRate
Slew rate
kBoth
Bounds and slew rate

Public Methods

Limiter ()
Default constructor.
explicit Limiter (double lim)
Constructor.
Limiter (double low, double high)
Constructor.
Limiter (double fsample, limiter_type type, double l1, double l2 = 0, double l3 = 0)
Constructor.
virtual Limiter* clone () const
Clone a MultiRate filter.
virtual void dataCheck (const TSeries& ts) const
Check input data validity.
virtual TSeries apply (const TSeries& in)
Filter a Time Series.
void apply (int N, const float* in, float* out)
Filter a float array.
void apply (int N, const fComplex* in, fComplex* out)
Filter a float array.
virtual void init (double fsample, limiter_type type, double l1, double l2 = 0, double l3 = 0)
Set filter to new values.
virtual void reset ()
Set filter coefficients and reset history.
virtual bool inUse (void) const
Test the filter acitivity status.
virtual Time getCurrentTime () const
Get the current time.
virtual Time getStartTime () const
Get the start time.
virtual limiter_type getType () const
Get the limiter type.
virtual double getSample () const
Get the sampling frequency.
virtual double getLow () const
Get the lower bound.
virtual double getHigh () const
Get the upper bound.
virtual double getSlewRate () const
Get the slew rate limit.

Protected Methods

virtual bool xfer (fComplex& coeff, double f) const
Get a transfer coefficent of a Filter.

Inherited from Pipe:

Public Methods

virtual TSeries operator)(const TSeries& in)
FilterIO& operator)(const FilterIO& in)
virtual bool isDataValid(const TSeries& in) const
KeyChain& getInputKeys(void) const
KeyChain& getOutputKeys(void) const
virtual Interval getTimeDelay(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

Inherited from FilterBase:

Public Methods

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

Documentation

Limiter filter. A limit is applied to the time series. Limits can be applied to the values themselves and/or to the slew rate.

enum limiter_type
Limiter type

kNoLimits
No limits

kValues
Bounds

kSlewRate
Slew rate

kBoth
Bounds and slew rate

Limiter()
Constructs a limiter filter.

explicit Limiter(double lim)
Constructs a limiter filter.
Parameters:
lim - Symmetric limit

Limiter(double low, double high)
Constructs a limiter filter.
Parameters:
low - Low limit
high - High limit

Limiter(double fsample, limiter_type type, double l1, double l2 = 0, double l3 = 0)
Constructs a limiter filter. If the limiter type is kValues, l1 is the lower limit and l2 is the upper limit. If it is kSlewRate, l1 is the slew rate limit in counts/s. If it is kBoth, l1, l2 and l3 are the lower bound, the upper bound and the slew rate limit.
Parameters:
fsample - Smapling rate (Hz)
type - Limiter type
l1 - First limit
l2 - Second limit
l3 - Third limit

virtual Limiter* clone() const
Create an identical Multirate filter and return a pointer to the new filter. The history is zeroed.
Returns:
pointer to an identical filter.

virtual void dataCheck(const TSeries& ts) const
Test whether the TSeries is valid as input data for the filter. a runtime_error exception is thrown if the data are invalid.

virtual TSeries apply(const TSeries& in)
The TSeries is filtered and the result placed in a new TSeries. The resulting TSeries is left on the stack and must be copied to be made permanent. The filter status flag is set if there are insufficient history entries (less than the Filter order) or if the TSeries start time isn't contiguous with the previous data. The input samples are appended to the filter history as the filter response is calculated.
Returns:
A new TSeries containing the filter response to the input series.
Parameters:
in - Time series to be filtered.

void apply(int N, const float* in, float* out)
An N-point float series is filtered from in and stored in out. in may overlap out. The input samples are appended to the filter history as the filter response is calculated.
Returns:
void
Parameters:
N - Number of elements in the input series.
in - Float array containing the input series.
out - Float array to contain the filter response. the end of out may overlap the start of in.

void apply(int N, const fComplex* in, fComplex* out)
An N-point complex series is filtered from in and stored in out. in may overlap out. The input samples are appended to the filter history as the filter response is calculated.
Returns:
void
Parameters:
N - Number of elements in the input series.
in - Float array containing the input series.
out - Float array to contain the filter response. the end of out may overlap the start of in.

virtual void init(double fsample, limiter_type type, double l1, double l2 = 0, double l3 = 0)
Set the filter to new values. If the limiter type is kValues, l1 is the lower limit and l2 is the upper limit. If it is kSlewRate, l1 is the slew rate limit in counts/s. If it is kBoth, l1, l2 and l3 are the lower bound, the upper bound and the slew rate limit.
Returns:
void
Parameters:
fsample - Smapling rate (Hz)
type - Limiter type
l1 - First limit
l2 - Second limit
l3 - Third limit

virtual void reset()
Set filter coefficients and reset history.

virtual bool inUse(void) const
Test the filter acitivity status.
Returns:
true if the filter is being used.

virtual Time getCurrentTime() const
Get the expected start time of the next TSeries to be filtered.
Returns:
true The current time.

virtual Time getStartTime() const
Get the start time of this filter run. This is set by the first filter operation after the filter has been created or reset.
Returns:
true The start time.

virtual limiter_type getType() const
Get the limiter type.
Returns:
limiter type.

virtual double getSample() const
Get the sampling frequency.
Returns:
sampling frequency.

virtual double getLow() const
Get the lower bound.
Returns:
lower bound.

virtual double getHigh() const
Get the upper bound.
Returns:
lower bound.

virtual double getSlewRate() const
Get the slew rate limit.
Returns:
slew rate limit.

virtual bool xfer(fComplex& coeff, double f) const
The transfer coefficient of the filter at the specified frequency is calculated and returned as a complex number.
Returns:
true if successful
Parameters:
coeff - a complex number representing the Filter response at the specified frequency (return)
F - Frequency at which to sample the transfer function.


This class has no child classes.
Author:
Written July 2002 by Daniel Sigg
Version:
1.0

alphabetic index hierarchy of classes


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


generated by doc++