UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
psc_ts_optimizer.hpp
1 /* psc_ts_optimizer.hpp */
2 /* $Id$ */
3 #ifndef __psc_ts_optimizer_hpp
4 #define __psc_ts_optimizer_hpp
5 
6 #include <utility>
7 
8 #ifdef GE_BUILD
9 #include <psc_service.hpp>
10 #include <psc_solver.hpp>
11 #include <psc_ts_dispersion_residual.hpp>
12 #else
13 #include <s2proc/psc_service.hpp>
14 #include <s2proc/psc_solver.hpp>
15 #include <s2proc/psc_ts_dispersion_residual.hpp>
16 #endif
17 
19 namespace psc
20 {
23  {
24  public:
25 
27  struct Params
28  {
29  Params():
30  max_time_shift(50),
31  iters_num(5),
34  {/* nothing to do */}
35 
36 
38  size_t iters_num;
42  };
43 
45  struct Results
46  {
47  double dispersion[2];
48  unsigned int iters_num;
49  };
50 
52  TsOptimizer(const Params &params);
53 
55  virtual ~TsOptimizer();
56 
60  Solver::TimeShifts *const p_shots_statics,
61  Solver::TimeShifts *const p_recvs_statics,
62  Results *const p_results = NULL) const;
63  protected:
64 
67 
70  const Trace::Header::AttrId &attr_id,
71  Solver::TimeShifts &statics) const;
72 
75  const Trace::Header::AttrId &attr_id) const;
76 
78  double dummy_minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const;
79 
81  double minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const;
82 
84  double least_squares_minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const;
85 
87  virtual void progress(const int cur, const int max) const;
88 
89  private:
90 
91  void test_apriory_statics_apply(TsDispersionResidual &dr) const;
92 
93  }; // class TsOptimizer
94 
95 }; // namespace psc
96 
97 #endif /* psc_ts_optimizer.hpp */
virtual ~TsOptimizer()
bool operator()(TsDispersionResidual &dr, Solver::TimeShifts *const p_shots_statics, Solver::TimeShifts *const p_recvs_statics, Results *const p_results=NULL) const
float TimeT
Definition: trace.hpp:22
std::vector< TimeShift > TimeShifts
Definition: psc_solver.hpp:65
virtual void progress(const int cur, const int max) const
Params m_params
Definition: psc_ts_optimizer.hpp:66
double dummy_minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const
float conv_stability_coeff
Definition: psc_ts_optimizer.hpp:40
Definition: psc_ts_optimizer.hpp:27
TsOptimizer(const Params &params)
Trace::TimeT max_time_shift
Definition: psc_ts_optimizer.hpp:37
Definition: psc_ts_dispersion_residual.hpp:24
double statics_iter(TsDispersionResidual &dr, const Trace::Header::AttrId &attr_id, Solver::TimeShifts &statics) const
unsigned int iters_num
Definition: psc_ts_optimizer.hpp:48
double minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const
Trace::TimeT min_disp_change
Definition: psc_ts_optimizer.hpp:41
size_t iters_num
Definition: psc_ts_optimizer.hpp:38
double least_squares_minimize(const TsDispersionResidual &dr, Trace::TimeT &min_dt) const
Definition: psc_ts_optimizer.hpp:45
double calc_dispersion(TsDispersionResidual &dr, const Trace::Header::AttrId &attr_id) const
AttrId
Definition: trace.hpp:34
Definition: psc_ts_optimizer.hpp:22
double dispersion[2]
Definition: psc_ts_optimizer.hpp:47