MeteoIODoc  MeteoIODoc-2.9.0
mio::ProcIIR Class Reference

Detailed Description

Infinite Impulse Response (IIR) filter.

This filter can either be used as a low pass or high pass filter. It is based on a Critically Damped, 2 poles filter (considering that it is better avoid overshooting even at the cost of a gentler falloff). It takes the following arguments:

  • FREQ_RESPONSE: frequency response, either LP (for Low Pass) or HP (for High Pass);
  • CUTOFF: The cutoff period (defined as the frequency at a -3dB gain) given in seconds;
  • TYPE: either CRITICALLY_DAMPED (default), BUTTERWORTH or BESSEL (see figure below);
  • SINGLE_PASS: Normally, the phase is removed by bidirectional filtering, ie. running the filter twice, first backward and then forward (this also squares the amplitude response). If set to TRUE, this bidirectional filtering is disabled.
IIR_filter.png
Infinite Impulse Response filter: step response, LP bidirectional filtering over 24 hours
HS::filter1 = IIR
HS::arg1::freq_response = LP
HS::arg1::type = CRITICALLY_DAMPED
HS::arg1::cutoff = 10800 ;ie. 3 hours

To know more: http://unicorn.us.com/trading/allpolefilters.html and http://www.dspguide.com/ch19/4.htm.

#include <ProcIIR.h>

Public Member Functions

 ProcIIR (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name)
 
virtual void process (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
 
- Public Member Functions inherited from mio::ProcessingBlock
virtual ~ProcessingBlock ()
 
virtual void process (Date &dateStart, Date &dateEnd)
 
std::string getName () const
 
const ProcessingPropertiesgetProperties () const
 
const std::string toString () const
 
bool skipStation (const std::string &station_id) const
 
bool noStationsRestrictions () const
 

Additional Inherited Members

- Static Public Member Functions inherited from mio::ProcessingBlock
static void readCorrections (const std::string &filter, const std::string &filename, std::vector< double > &X, std::vector< double > &Y)
 
static void readCorrections (const std::string &filter, const std::string &filename, std::vector< double > &X, std::vector< double > &Y1, std::vector< double > &Y2)
 
static std::vector< double > readCorrections (const std::string &filter, const std::string &filename, const size_t &col_idx, const char &c_type, const double &init)
 
static std::vector< offset_specreadCorrections (const std::string &filter, const std::string &filename, const double &TZ, const size_t &col_idx=2)
 
static std::map< std::string, std::vector< dates_range > > readDates (const std::string &filter, const std::string &filename, const double &TZ)
 
static std::set< std::string > initStationSet (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &keyword)
 
- Protected Member Functions inherited from mio::ProcessingBlock
 ProcessingBlock (const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name)
 protected constructor only to be called by children More...
 
- Static Protected Member Functions inherited from mio::ProcessingBlock
static void extract_dbl_vector (const unsigned int &param, const std::vector< MeteoData > &ivec, std::vector< double > &ovec)
 
static void extract_dbl_vector (const unsigned int &param, const std::vector< const MeteoData *> &ivec, std::vector< double > &ovec)
 
- Protected Attributes inherited from mio::ProcessingBlock
const std::set< std::string > excluded_stations
 
const std::set< std::string > kept_stations
 
ProcessingProperties properties
 
const std::string block_name
 
- Static Protected Attributes inherited from mio::ProcessingBlock
static const double soil_albedo = .23
 
static const double snow_albedo = .85
 
static const double snow_thresh = .1
 parametrize the albedo from HS More...
 

Constructor & Destructor Documentation

◆ ProcIIR()

mio::ProcIIR::ProcIIR ( const std::vector< std::pair< std::string, std::string > > &  vecArgs,
const std::string &  name 
)

Member Function Documentation

◆ process()

void mio::ProcIIR::process ( const unsigned int &  param,
const std::vector< MeteoData > &  ivec,
std::vector< MeteoData > &  ovec 
)
virtual

Implements mio::ProcessingBlock.


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