UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
polarity_wave_detector.hpp
1 /* polarity_wave_detector.hpp */
2 /* $Id$ */
3 #ifndef __polarity_wave_detector_hpp
4 #define __polarity_wave_detector_hpp
5 
6 #include <lapackpp/laslv.h>
7 #include <s2proc/abstract_wave_detector.hpp>
8 
10 {
11 public:
12 
13  PolarityWaveDetector(size_t time_base, size_t sb_size, size_t sb_step = 1);
14 
15  virtual ~PolarityWaveDetector();
16 
18  bool appendTracePointer(const Trace &tr) const;
19 
22  bool setTFB(size_t app_tfb);
23 
25  void clear();
26 
28  static float calcRatio(const float& E1, const float& E2);
29 
30 protected:
31 
34  virtual bool calc(Trace &tr) const;
35 
37  typedef struct PolarityParams {
38  double R1;
39  double R2;
40  PolarityParams() : R1(0.), R2(0.) {}
41  PolarityParams(const double& r1, const double& r2) : R1(r1), R2(r2) {}
42  };
43  typedef std::vector<PolarityParams> PolarityParamsAr;
44 
46  static void interpolatePolParams(const size_t&, const size_t&,
49  std::map<size_t, PolarityWaveDetector::PolarityParams>&);
50 
51  bool formDetectorData(Trace &tr) const;
52 
55  bool formParamsAr(PolarityParamsAr&) const;
56 
60  bool getWinPolarityParams(PolarityWaveDetector::PolarityParams& params, const size_t& s0, const size_t& s1) const;
61 
65 
69  bool getMatrix(LaGenMatDouble& matrix) const;
70 
73  double getMatrixItem(size_t tr1, size_t tr2) const;
74 
77  double getAvValue(size_t tr) const;
78 
79 
80  mutable std::vector<const Trace*> m_traces;
82  size_t m_tfb;
84  size_t m_time_base;
86  size_t m_sbase;
88  size_t m_sb_step;
90  bool m_ready;
92 };
93 
94 
95 #endif /* polarity_wave_detector.hpp */
size_t m_sb_step
Definition: polarity_wave_detector.hpp:88
double getAvValue(size_t tr) const
bool appendTracePointer(const Trace &tr) const
bool m_ready
Definition: polarity_wave_detector.hpp:90
Definition: abstract_wave_detector.hpp:7
static void interpolatePolParams(const size_t &, const size_t &, const PolarityWaveDetector::PolarityParams &, const PolarityWaveDetector::PolarityParams &, std::map< size_t, PolarityWaveDetector::PolarityParams > &)
double getMatrixItem(size_t tr1, size_t tr2) const
Definition: trace.hpp:14
bool getMatrix(LaGenMatDouble &matrix) const
virtual bool calc(Trace &tr) const
Definition: polarity_wave_detector.hpp:37
size_t m_time_base
Definition: polarity_wave_detector.hpp:84
bool setTFB(size_t app_tfb)
static float calcRatio(const float &E1, const float &E2)
std::vector< const Trace * > m_traces
Definition: polarity_wave_detector.hpp:80
bool getWinPolarityParams(PolarityWaveDetector::PolarityParams &params, const size_t &s0, const size_t &s1) const
bool formParamsAr(PolarityParamsAr &) const
size_t m_sbase
Definition: polarity_wave_detector.hpp:86
Definition: polarity_wave_detector.hpp:9
size_t m_tfb
Definition: polarity_wave_detector.hpp:82
bool getPolarityParams(PolarityWaveDetector::PolarityParams &params) const