19#ifndef FilterDespikingPS_H
20#define FilterDespikingPS_H
92 FilterDespikingPS(
const std::vector< std::pair<std::string, std::string> >& vecArgs,
const std::string& name,
const Config& cfg);
94 virtual void process(
const unsigned int& param,
const std::vector<MeteoData>& ivec,
95 std::vector<MeteoData>& ovec);
98 typedef enum IMPLEMENTATION_TYPE {
101 } implementation_type;
103 void parse_args(
const std::vector< std::pair<std::string, std::string> >& vecArgs);
105 std::vector<int> findSpikesGoring(
const std::vector<double>& timeVec,
const std::vector<double>& ivec,
unsigned int& nNewSpikes)
const;
106 std::vector<int> findSpikesMori(
const std::vector<double>& timeVec,
const std::vector<double>& ivec,
unsigned int& nNewSpikes)
const;
107 void replaceSpikes(
const std::vector<double>& timeVec, std::vector<double>& uVec, std::vector<int>& spikesVec)
const;
109 static std::vector<double> calculateDerivatives(
const std::vector<double>& ivec,
const std::vector<double>& timeVec);
110 static double calculateCrossCorrelation(
const std::vector<double>& aVec,
const std::vector<double>& bVec);
111 static unsigned int nNodataElements(
const std::vector<double>& iVec);
112 static void findPointsOutsideEllipse(
const std::vector<double>& xVec,
const std::vector<double>& yVec,
113 const double a,
const double b,
const double theta, std::vector<int>& outsideVec);
114 static void findPointsOutsideEllipsoid(
const std::vector<double>& xVec,
const std::vector<double>& yVec,
const std::vector<double>& zVec,
115 const double a,
const double b,
const double c, std::vector<int>& outsideVec);
116 void getWindowForInterpolation(
const size_t index,
const std::vector<double>& timeVec,
const std::vector<double>& uVec,
117 const std::vector<int>& spikesVec, std::vector<double>& xVec, std::vector<double>& yVec)
const;
118 static bool checkIfWindowForInterpolationIsSufficient(
const std::vector<double>& xVec,
const double time,
const unsigned int minPoints,
119 const bool avoidExtrapolation);
121 static void solve2X2LinearEquations(
const double* a,
const double* b,
const double* c,
double* x);
122 static const std::vector<double> helperGetDoubleVectorOutOfMeteoDataVector(
const std::vector<MeteoData>& ivec,
const unsigned int& param);
123 static const std::vector<double> helperGetTimeVectorOutOfMeteoDataVector(
const std::vector<MeteoData>& ivec);
125 double sensitivityParam;
126 implementation_type methodParam;
130 unsigned int degreeOfInterpolation;
131 unsigned int windowWidth;
A class that reads a key/value file. These files (typically named *.ini) follow the INI file format s...
Definition: Config.h:79
Despiking filter using phase space.
Definition: FilterDespikingPS.h:90
FilterDespikingPS(const std::vector< std::pair< std::string, std::string > > &vecArgs, const std::string &name, const Config &cfg)
Definition: FilterDespikingPS.cc:29
virtual void process(const unsigned int ¶m, const std::vector< MeteoData > &ivec, std::vector< MeteoData > &ovec)
This function is the main function to do the filtering:
Definition: FilterDespikingPS.cc:46
The base class for all filters that provides the interface and a few helper methods.
Definition: ProcessingBlock.h:67