MeteoIODoc  MeteoIODoc-2.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mio::ProcNoise Class Reference

Detailed Description

Generate a noise signal to modify the input. The noise signal is either added ("add") to the input or used as a fraction and multiplied by the input signal ("mult"). This filter always takes three arguments: a type specifying if the noise is added or multiplied, a distribution specifying the random numbers distribution and a range that is the scaling factor to apply. The following random distributions are supported:

  • "uniform": the range represents the maximum amplitude of the noise;
  • "normal": the range represents the standard deviation of the noise.
Note
When multiplying the input signal by the noise, the range is interpreted as a fraction. For example, to modify the input by +/-10%, select "mult" with "uniform" and "0.1" as a range.
Author
Mathias Bavay
Date
2015-06-12
#add a normally distributed noise (mean=0) of standard deviation 5 to TA
TA::filter1 = Noise
TA::arg1 = add normal 5
#add +/-10% of variation, uniformly distributed to HS
HS::filter1 = Noise
HS::arg1 = mult uniform 0.1

#include <ProcNoise.h>

Public Member Functions

 ProcNoise (const std::vector< std::string > &vec_args, 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 ()
 
std::string getName () const
 
const ProcessingPropertiesgetProperties () const
 
const std::string toString () const
 

Additional Inherited Members

- Protected Member Functions inherited from mio::ProcessingBlock
 ProcessingBlock (const std::string &name)
 protected constructor only to be called by children More...
 
void convert_args (const size_t &min_nargs, const size_t &max_nargs, const std::vector< std::string > &vec_args, std::vector< double > &dbl_args) const
 
- Static Protected Member Functions inherited from mio::ProcessingBlock
static bool is_soft (std::vector< std::string > &vec_args)
 
static void readCorrections (const std::string &filter, const std::string &filename, const char &c_type, const double &init, std::vector< double > &corrections)
 
- Protected Attributes inherited from mio::ProcessingBlock
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

mio::ProcNoise::ProcNoise ( const std::vector< std::string > &  vec_args,
const std::string &  name 
)

Member Function Documentation

void mio::ProcNoise::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: