class MultiRate : public Pipe Resampling filter
| | datatype Data type
|
| | MultiRate () Default constructor. |
| | MultiRate (double fsample, int up, int down, double atten = 80) Constructor. |
| | MultiRate (const MultiRate& filter) Copy constructor. |
| | ~MultiRate () Destructor. |
| | operator= (const MultiRate& filter) Assignment operator. |
| | clone () const Clone a MultiRate filter. |
| | dataCheck (const TSeries& ts) const Check input data validity. |
| | apply (const TSeries& in) Filter a Time Series. |
| | apply (int N, const float* in, float* out) Filter a float array. |
| | apply (int N, const fComplex* in, fComplex* out) Filter a float array. |
| | init (double fsample, int up, int down, double atten = 80) Set filter to new values. |
| | reset () Set filter coefficients and reset history. |
| | resetHist () Reset history. |
| | inUse (void) const Test the filter acitivity status. |
| | getCurrentTime () const Get the current time. |
| | getStartTime () const Get the start time. |
| | getUp () const Get the interpolation factor. |
| | getDown () const Get the decimation factor. |
| | getAtten () const Get the stopband attenuation. |
| | getSampleIn () const Get the input sampling frequency. |
| | getSampleOut () const Get the output sampling frequency. |
| | getOrder () const Get the filter order. |
| | getHistType () const Get the history data type. |
Resampling filter. This filter can be used for data rate
conversion. It implements a polyphase filter using the
following formula:
y(m) = SUM_{n=0}^{K-1} g(n,m-[m/u]*u) * x([m*d/u]-n)
\begin{end}
The decimation/interpolation filter is a FIR filter designed
with the Kaiser window method. Its corner frequency is at
0.9 of the Nyquist frequency of the output series (when the
sampling rate gets overall smaller) or of the input series
(if the sampling rate gets larger).
The stop band attenuation can be specified; default is 80dB.
Since this filter has equal stopband and pass band ripple, the
passband ripple can be calculated from the stopband attenuation
with $ripple = 10^{-attenuation/20}$, where the attenuation
is given in dB.
If the overall down sampling factor is large, it is better to
decimate in steps. Since this algorithm implements a set of
polyphase filters, a large sampling mismatch---like if one
wants to go from 16384Hz to 10000Hz---is handled efficiently.
@memo Multi rate filter
@see J.G. Proakis and D.G. Manolakis, "Digital Signal Processing",
chap. 10, pp 800.
@see A.V. Oppenheim and R.W. Schafer, "Discrete-time Signal
Processing", sect. 4.6, 4.7 and 7.2.
@author Written July 2002 by Daniel Sigg
@version 1.0
MultiRate(double fsample, int up, int down, double atten = 80)
up - Interpolation factor
down - Decimation factor
attn - Stopband attenuation
MultiRate(const MultiRate& filter)
virtual ~MultiRate()
MultiRate& operator= (const MultiRate& filter)
virtual MultiRate* clone() const
virtual void dataCheck(const TSeries& ts) const
virtual TSeries apply(const TSeries& in)
int apply(int N, const float* in, float* out)
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.
int apply(int N, const fComplex* in, fComplex* out)
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, int up, int down, double atten = 80)
up - Interpolation factor
down - Decimation factor
attn - Stopband attenuation
virtual void reset()
virtual void resetHist()
virtual bool inUse(void) const
virtual Time getCurrentTime() const
virtual Time getStartTime() const
virtual int getUp() const
virtual int getDown() const
virtual double getAtten() const
virtual double getSampleIn() const
virtual double getSampleOut() const
virtual int getOrder() const
virtual datatype getHistType() const
virtual bool xfer(fComplex& coeff, double f) const
F - Frequency at which to sample the transfer function.
void allocHist(int size)
void allocCoeff(int num, int len)
alphabetic index hierarchy of classes
Please send questions and comments to zweizig_j@ligo.caltech.edu
generated by doc++