1 #ifndef __SIIMPLE_GENERAL_ITER_DECON__
2 #define __SIIMPLE_GENERAL_ITER_DECON__
4 #include "mspass/algorithms/deconvolution/ComplexArray.h"
5 #include "mspass/algorithms/deconvolution/ScalarDecon.h"
6 #include "mspass/algorithms/deconvolution/FFTDeconOperator.h"
7 #include "mspass/algorithms/TimeWindow.h"
8 #include "mspass/utility/dmatrix.h"
9 #include "mspass/utility/Metadata.h"
10 #include "mspass/utility/AntelopePf.h"
11 #include "mspass/seismic/CoreTimeSeries.h"
12 #include "mspass/seismic/Seismogram.h"
13 namespace mspass::algorithms::deconvolution{
19 enum IterDeconType {WATER_LEVEL,LEAST_SQ,MULTI_TAPER};
80 this->preprocessor->changeparameter(md);
94 return this->preprocessor->ideal_output();
123 int ndwin, nnwin,nfft;
135 std::list<ThreeCSpike> spikes;
142 std::vector<double> lag_weights;
145 std::vector<double> wtf;
150 ScalarDecon *preprocessor;
155 ShapingWavelet shapingwavelet;
167 std::vector<double> winv_fir, actual_o_fir;
169 IterDeconType decon_type;
177 void update_residual_matrix(ThreeCSpike spk);
184 void update_lag_weights(
int col);
190 double compute_resid_linf_floor();
193 bool has_not_converged();
199 double lw_linf_initial, lw_linf_prev;
200 double lw_l2_initial, lw_l2_prev;
201 double resid_linf_initial, resid_linf_prev;
202 double resid_l2_initial, resid_l2_prev;
204 int iter_count, iter_max;
207 double lw_linf_floor, lw_l2_floor;
210 double resid_linf_prob, resid_linf_floor;
215 std::vector<double> lw_linf_history,lw_l2_history,resid_l2_history,resid_linf_history;
216 void print_convergence_history(std::ostream& ofs)
218 ofs <<
"lw_inf lw_l2 resid_l2, resid_linf"<<std::endl;
219 for(
int i=0; i<iter_count; ++i)
221 if(i<lw_linf_history.size())
223 ofs<<lw_linf_history[i]<<
" ";
229 if(i<lw_l2_history.size())
231 ofs<<lw_l2_history[i]<<
" ";
237 if(i<resid_linf_history.size())
239 ofs<<resid_linf_history[i]<<
" ";
245 if(i<resid_l2_history.size())
247 ofs<<resid_l2_history[i]<<
" ";
Defines a time window.
Definition: TimeWindow.h:14
Implements the Generalized Iterative Method of Wang and Pavlis.
Definition: GeneralIterDecon.h:68
mspass::seismic::CoreTimeSeries inverse_wavelet()
Return a FIR represention of the inverse filter.
Definition: GeneralIterDecon.h:99
mspass::seismic::CoreTimeSeries actual_output()
Definition: GeneralIterDecon.h:96
GeneralIterDecon(mspass::utility::AntelopePf &md)
Create an initialize an operator for subseqquent processing.
Definition: GeneralIterDecon.cc:55
mspass::utility::Metadata QCMetrics()
Return appropriate quality measures.
Definition: GeneralIterDecon.cc:736
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
Definition: GeneralIterDecon.h:21
double amp
Definition: GeneralIterDecon.h:29
double u[3]
Definition: GeneralIterDecon.h:27
ThreeCSpike & operator=(const ThreeCSpike &parent)
Definition: ThreeCSpike.cc:27
int col
Definition: GeneralIterDecon.h:25
Vector (three-component) seismogram data object.
Definition: CoreSeismogram.h:40
Scalar time series data object.
Definition: CoreTimeSeries.h:18
C++ object version of a parameter file.
Definition: AntelopePf.h:62
Lightweight, simple matrix object.
Definition: dmatrix.h:102