ldas-tools-filters  2.6.6
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Filters::KFIRLP Class Reference

#include <KFIRLP.hh>

Public Member Functions

 KFIRLP (const double &t_fc, const double &t_alpha, const double &t_df)
 Constructor. More...
 
void setFc (double t_fc)
 set mid-point of transition band More...
 
double getFc () const
 get mid-point of transition band More...
 
void setAlpha (double t_alpha)
 set stop-band depth More...
 
double getAlpha () const
 get stop-band depth More...
 
void setDf (const double t_df)
 set transition band width More...
 
double getDf () const
 get transition band width More...
 
template<class T >
void apply (std::valarray< T > &b)
 get transfer function More...
 
int getOrder () const
 filter order More...
 
 KFIRLP (const double &t_fc, const double &t_alpha, const double &t_df)
 Constructor. More...
 
void setFc (double t_fc)
 set mid-point of transition band More...
 
double getFc () const
 get mid-point of transition band More...
 
void setAlpha (double t_alpha)
 set stop-band depth More...
 
double getAlpha () const
 get stop-band depth More...
 
void setDf (const double t_df)
 set transition band width More...
 
double getDf () const
 get transition band width More...
 
template<class T >
void apply (std::valarray< T > &b)
 get transfer function More...
 
int getOrder () const
 filter order More...
 
 KFIRLP (const double &t_fc, const double &t_alpha, const double &t_df)
 Constructor. More...
 
void setFc (double t_fc)
 set mid-point of transition band More...
 
double getFc () const
 get mid-point of transition band More...
 
void setAlpha (double t_alpha)
 set stop-band depth More...
 
double getAlpha () const
 get stop-band depth More...
 
void setDf (const double t_df)
 set transition band width More...
 
double getDf () const
 get transition band width More...
 
template<class T >
void apply (std::valarray< T > &b)
 get transfer function More...
 
int getOrder () const
 filter order More...
 

Private Member Functions

double getBeta () const
 Kaiser Window beta parameter. More...
 
double getBeta () const
 Kaiser Window beta parameter. More...
 
double getBeta () const
 Kaiser Window beta parameter. More...
 

Private Attributes

double fc
 
double df
 width of the transition zone of the filter More...
 
double alpha
 side lobe height More...
 
KaiserWindow kwin
 Kaiser Window. More...
 

Constructor & Destructor Documentation

◆ KFIRLP() [1/3]

Filters::KFIRLP::KFIRLP ( const double &  t_fc,
const double &  t_alpha,
const double &  t_df 
)

Constructor.

Parameters
[in]t_fcfreq. of mid-transition band (Nyquist units) param: const double& t_alpha - is stop-band depth in dB (positive) param: const double& t_df - is transition band width (Nyquist units)
Exceptions
domain_errorThrown if t_fc <= 0 or t_fc >= 1 or the abs(2*df-1) is not less than one
invalid_argumentThrown if t_alpha<=0

◆ KFIRLP() [2/3]

Filters::KFIRLP::KFIRLP ( const double &  t_fc,
const double &  t_alpha,
const double &  t_df 
)

Constructor.

Parameters
[in]t_fcfreq. of mid-transition band (Nyquist units) param: const double& t_alpha - is stop-band depth in dB (positive) param: const double& t_df - is transition band width (Nyquist units)
Exceptions
domain_errorThrown if t_fc <= 0 or t_fc >= 1 or the abs(2*df-1) is not less than one
invalid_argumentThrown if t_alpha<=0

◆ KFIRLP() [3/3]

Filters::KFIRLP::KFIRLP ( const double &  t_fc,
const double &  t_alpha,
const double &  t_df 
)

Constructor.

Parameters
[in]t_fcfreq. of mid-transition band (Nyquist units) param: const double& t_alpha - is stop-band depth in dB (positive) param: const double& t_df - is transition band width (Nyquist units)
Exceptions
domain_errorThrown if t_fc <= 0 or t_fc >= 1 or the abs(2*df-1) is not less than one
invalid_argumentThrown if t_alpha<=0

Member Function Documentation

◆ apply() [1/3]

template<class T >
void Filters::KFIRLP::apply ( std::valarray< T > &  b)

get transfer function

Parameters
[in]bfilter coefficients in the container

◆ apply() [2/3]

template<class T >
void Filters::KFIRLP::apply ( std::valarray< T > &  b)

get transfer function

Parameters
[in]bfilter coefficients in the container

◆ apply() [3/3]

template<class T >
void Filters::KFIRLP::apply ( std::valarray< T > &  b)

get transfer function

Parameters
[in]bfilter coefficients in the container

◆ getAlpha() [1/3]

double Filters::KFIRLP::getAlpha ( ) const
inline

get stop-band depth

Returns
Returns the current stop-band attenuation

◆ getAlpha() [2/3]

double Filters::KFIRLP::getAlpha ( ) const

get stop-band depth

Returns
Returns the current stop-band attenuation

◆ getAlpha() [3/3]

double Filters::KFIRLP::getAlpha ( ) const

get stop-band depth

Returns
Returns the current stop-band attenuation

◆ getBeta() [1/3]

double Filters::KFIRLP::getBeta ( ) const
private

Kaiser Window beta parameter.

Returns
the beta parameter corresponding to the current

◆ getBeta() [2/3]

double Filters::KFIRLP::getBeta ( ) const
private

Kaiser Window beta parameter.

Returns
the beta parameter corresponding to the current

◆ getBeta() [3/3]

double Filters::KFIRLP::getBeta ( ) const
private

Kaiser Window beta parameter.

Returns
the beta parameter corresponding to the current

◆ getDf() [1/3]

double Filters::KFIRLP::getDf ( ) const
inline

get transition band width

Returns
Returns the current width of the transition band

◆ getDf() [2/3]

double Filters::KFIRLP::getDf ( ) const

get transition band width

Returns
Returns the current width of the transition band

◆ getDf() [3/3]

double Filters::KFIRLP::getDf ( ) const

get transition band width

Returns
Returns the current width of the transition band

◆ getFc() [1/3]

double Filters::KFIRLP::getFc ( ) const
inline

get mid-point of transition band

Returns
Returns the current mid-point of the transition band

◆ getFc() [2/3]

double Filters::KFIRLP::getFc ( ) const

get mid-point of transition band

Returns
Returns the current mid-point of the transition band

◆ getFc() [3/3]

double Filters::KFIRLP::getFc ( ) const

get mid-point of transition band

Returns
Returns the current mid-point of the transition band

◆ getOrder() [1/3]

int Filters::KFIRLP::getOrder ( ) const

filter order

Returns
order (length-1) of the filter

◆ getOrder() [2/3]

int Filters::KFIRLP::getOrder ( ) const

filter order

Returns
order (length-1) of the filter

◆ getOrder() [3/3]

int Filters::KFIRLP::getOrder ( ) const

filter order

Returns
order (length-1) of the filter

◆ setAlpha() [1/3]

void Filters::KFIRLP::setAlpha ( double  t_alpha)

set stop-band depth

Parameters
[in]t_alphasets the stop-band attenuation
Exceptions
invalid_argumentif t_alpha <= 0

◆ setAlpha() [2/3]

void Filters::KFIRLP::setAlpha ( double  t_alpha)

set stop-band depth

Parameters
[in]t_alphasets the stop-band attenuation
Exceptions
invalid_argumentif t_alpha <= 0

◆ setAlpha() [3/3]

void Filters::KFIRLP::setAlpha ( double  t_alpha)

set stop-band depth

Parameters
[in]t_alphasets the stop-band attenuation
Exceptions
invalid_argumentif t_alpha <= 0

◆ setDf() [1/3]

void Filters::KFIRLP::setDf ( const double  t_df)

set transition band width

Parameters
[in]t_dfis transition band width (Nyquist frequency units) exc: domain_error - if the abs(2*df-1) is not less than one

◆ setDf() [2/3]

void Filters::KFIRLP::setDf ( const double  t_df)

set transition band width

Parameters
[in]t_dfis transition band width (Nyquist frequency units) exc: domain_error - if the abs(2*df-1) is not less than one

◆ setDf() [3/3]

void Filters::KFIRLP::setDf ( const double  t_df)

set transition band width

Parameters
[in]t_dfis transition band width (Nyquist frequency units) exc: domain_error - if the abs(2*df-1) is not less than one

◆ setFc() [1/3]

void Filters::KFIRLP::setFc ( double  t_fc)

set mid-point of transition band

Parameters
[in]doublet_fc freq. of mid-transition band (Nyquist units)
Exceptions
domain_errorif t_fc <= 0 or t_fc >= 1

◆ setFc() [2/3]

void Filters::KFIRLP::setFc ( double  t_fc)

set mid-point of transition band

Parameters
[in]doublet_fc freq. of mid-transition band (Nyquist units)
Exceptions
domain_errorif t_fc <= 0 or t_fc >= 1

◆ setFc() [3/3]

void Filters::KFIRLP::setFc ( double  t_fc)

set mid-point of transition band

Parameters
[in]doublet_fc freq. of mid-transition band (Nyquist units)
Exceptions
domain_errorif t_fc <= 0 or t_fc >= 1

Member Data Documentation

◆ alpha

double Filters::KFIRLP::alpha
private

side lobe height

◆ df

double Filters::KFIRLP::df
private

width of the transition zone of the filter

◆ fc

double Filters::KFIRLP::fc
private

◆ kwin

KaiserWindow Filters::KFIRLP::kwin
private

Kaiser Window.


The documentation for this class was generated from the following files: