version  0.0.1
Defines the C++ API for MsPASS
ScalarDecon.h
1 #ifndef __SIMPLE_DECON_H__
2 #define __SIMPLE_DECON_H__
3 
4 #include <vector>
5 #include "mspass/utility/Metadata.h"
6 #include "mspass/algorithms/deconvolution/BasicDeconOperator.h"
7 #include "mspass/algorithms/deconvolution/ShapingWavelet.h"
8 #include "mspass/seismic/CoreTimeSeries.h"
9 namespace mspass::algorithms::deconvolution{
24 {
25 public:
26  ScalarDecon():shapingwavelet() {};
28  ScalarDecon(const std::vector<double>& d, const std::vector<double>& w);
29  ScalarDecon(const ScalarDecon& parent);
40  int load(const std::vector<double> &wavelet,const std::vector<double> &data);
42  int loaddata(const std::vector<double> &data);
44  int loadwavelet(const std::vector<double> &wavelet);
45  virtual void process()=0;
46  ~ScalarDecon() {};
47  ScalarDecon& operator=(const ScalarDecon& parent);
48  std::vector<double> getresult() {
49  return result;
50  };
51  /* This method does nothing, but needs to be defined to avoid
52  * gcc compile errors in programs using children of this class.*/
53  void changeparameter(const mspass::utility::Metadata &md);
60  void change_shaping_wavelet(const ShapingWavelet& nsw);
61  /* \brief Return the ideal output of the deconvolution operator.
62 
63  All deconvolution operators have a implicit or explicit ideal output
64  signal. e.g. for a spiking Wiener filter it is a delta function with or
65  without a lag. For a shaping wavelt it is the time domain version of the
66  wavelet. */
67  mspass::seismic::CoreTimeSeries ideal_output() {
68  return this->shapingwavelet.impulse_response();
69  };
77 
89 protected:
90  std::vector<double> data;
91  std::vector<double> wavelet;
92  std::vector<double> result;
93  ShapingWavelet shapingwavelet;
94 };
95 }
96 #endif
Base class decon operator for single station 3C decon (receiver functions).
Definition: ScalarDecon.h:24
virtual mspass::seismic::CoreTimeSeries inverse_wavelet()=0
Return a FIR represention of the inverse filter.
virtual mspass::seismic::CoreTimeSeries actual_output()=0
int load(const std::vector< double > &wavelet, const std::vector< double > &data)
Load all data required for decon.
Definition: ScalarDecon.cc:39
void change_shaping_wavelet(const ShapingWavelet &nsw)
Definition: ScalarDecon.cc:66
int loadwavelet(const std::vector< double > &wavelet)
Definition: ScalarDecon.cc:56
int loaddata(const std::vector< double > &data)
Definition: ScalarDecon.cc:50
virtual mspass::utility::Metadata QCMetrics()=0
Return appropriate quality measures.
Frequency domain shaping wavelet.
Definition: ShapingWavelet.h:19
mspass::seismic::CoreTimeSeries impulse_response()
Definition: ShapingWavelet.cc:269
Scalar time series data object.
Definition: CoreTimeSeries.h:18
Definition: Metadata.h:76