GPLIB++
IterDecon.h
Go to the documentation of this file.
1 #ifndef ITERDECON_H_
2 #define ITERDECON_H_
3 #include "AdaptiveFilter.h"
4 #include "TsSpectrum.h"
5 
6 namespace gplib
7  {
8  /** \addtogroup sigproc Signal processing methods */
9  /* @{ */
10 
11  //! The iterative deconvolution algorithm, mainly used for receiver function computation
12  /*! Implements iterative deconvolution used for receiver function calculations
13  * but it is basically just another adaptive filter
14  */
15  class IterDecon: public AdaptiveFilter
16  {
17  private:
18  //! The weights are in toeplitz matrix form, so we can store them in a vector
19  gplib::rvec Weights;
20  TsSpectrum &Spectrum;
21  public:
22  //! return the Weights as a vector, in this case the same as GetWeights
23  virtual const gplib::rvec &GetWeightsAsVector()
24  {
25  return Weights;
26  }
27  //! return the Weights
28  const gplib::rvec &GetWeights()
29  {
30  return Weights;
31  }
32  //! print weights to a file
33  virtual void PrintWeights(std::ostream &output);
34  virtual void
35  AdaptFilter(const gplib::rvec &Input, const gplib::rvec &Desired);
36  virtual void CalcOutput(const gplib::rvec &Input, gplib::rvec &Output);
37  //! Input and output length have to be the same, so only one parameter for the constructor
38  IterDecon(const int inputsize, TsSpectrum &Spec);
39  virtual ~IterDecon();
40  };
41  /* @} */
42  }
43 #endif /*ITERDECON_H_*/
const gplib::rvec & GetWeights()
return the Weights
Definition: IterDecon.h:28
IterDecon(const int inputsize, TsSpectrum &Spec)
Input and output length have to be the same, so only one parameter for the constructor.
Definition: IterDecon.cpp:10
virtual const gplib::rvec & GetWeightsAsVector()
return the Weights as a vector, in this case the same as GetWeights
Definition: IterDecon.h:23
virtual void AdaptFilter(const gplib::rvec &Input, const gplib::rvec &Desired)
Adapt the filter weights given the Input and Desired vectors.
Definition: IterDecon.cpp:27
A generic base class for all types of adaptive filters.
virtual void PrintWeights(std::ostream &output)
print weights to a file
Definition: IterDecon.cpp:21
virtual void CalcOutput(const gplib::rvec &Input, gplib::rvec &Output)
Calculate the filter output given Input.
Definition: IterDecon.cpp:45
The class CTsSpectrum is used to calculate spectra from (real) time series data.
Definition: TsSpectrum.h:21
virtual ~IterDecon()
Definition: IterDecon.cpp:17
The iterative deconvolution algorithm, mainly used for receiver function computation.
Definition: IterDecon.h:15