UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
psc_service.hpp
1 /* psc_service.hpp */
2 /* $Id$ */
3 #ifndef __psc_service_hpp
4 #define __psc_service_hpp
5 
6 #include <vector>
7 #include <string>
8 
9 #ifdef GE_BUILD
10 #include <trace.hpp>
11 #include <curve_smooth_sb.hpp>
12 #else
13 #include <s2proc/trace.hpp>
14 #include <mth/curve_smooth_sb.hpp>
15 #endif
16 
18 namespace psc
19 {
21  static const float floatNumEpsilon = 1.e-8;
22 
24  struct CorrDirMask
25  {
26  static const unsigned int ACF = (1 << 0);
28  // 2D observation system
29  static const unsigned int SHOT = (1 << 1);
30  static const unsigned int RECV = (1 << 2);
31  static const unsigned int CMP = (1 << 3);
32  static const unsigned int OFFSET = (1 << 4);
33  static const unsigned int COMPLETE_2D = ACF | SHOT | RECV | CMP | OFFSET;
34 
35  // 3D observation system
36  static const unsigned int NSS = (1 << 5);
37  static const unsigned int NSL = (1 << 6);
38  static const unsigned int NSS_NSL = (1 << 7);
39  static const unsigned int NRS = (1 << 8);
40  static const unsigned int NRL = (1 << 9);
41  static const unsigned int NRS_NRL = (1 << 10);
42  static const unsigned int COMPLETE_3D = ACF | NSS | NSL | NSS_NSL | NRS | NRL | NRS_NRL;
43 
47  static std::string toString(const unsigned int dir_mask);
48 
53  static std::vector<unsigned int> toVec(const unsigned int dir_mask);
54  };
55 
64  bool applyStatics(const std::map<int, Trace::TimeT> &shot_st,
65  const std::map<int, Trace::TimeT> &recv_st,
66  Trace &ccfs);
67 
74  bool removeLowFreq(const double sb_size, rbm_smooth::Curve &st_curve);
75 
83  bool selectCCF(const unsigned int dir,
84  const unsigned int stride,
85  const Trace &ccfs);
86 
91  Trace::AmplT *pmax_val = NULL);
92 
97  Trace::AmplT *pmin_val = NULL);
98 
102  bool isZeroTrace(const Trace &tr);
103 
104 
110  double getPartOfZeros(const Trace &tr, Trace::AmplT eps = 0.);
111 };
112 
113 #endif /* psc_service.hpp */
bool isZeroTrace(const Trace &tr)
float AmplT
Definition: trace.hpp:21
static const unsigned int NSL
Definition: psc_service.hpp:37
static const unsigned int OFFSET
Definition: psc_service.hpp:32
double getPartOfZeros(const Trace &tr, Trace::AmplT eps=0.)
float TimeT
Definition: trace.hpp:22
std::vector< std::pair< double, double > > Curve
Definition: curve_smooth_sb.hpp:14
static const unsigned int ACF
Definition: psc_service.hpp:26
Trace::TimeT getTimeShiftOfMinValue(const Trace &ccf, Trace::AmplT *pmin_val=NULL)
static const unsigned int NRL
Definition: psc_service.hpp:40
static const unsigned int NSS
Definition: psc_service.hpp:36
bool selectCCF(const unsigned int dir, const unsigned int stride, const Trace &ccfs)
bool removeLowFreq(const double sb_size, rbm_smooth::Curve &st_curve)
bool applyStatics(const std::map< int, Trace::TimeT > &shot_st, const std::map< int, Trace::TimeT > &recv_st, Trace &ccfs)
Definition: psc_service.hpp:24
Definition: trace.hpp:14
static const unsigned int NSS_NSL
Definition: psc_service.hpp:38
static const unsigned int SHOT
Definition: psc_service.hpp:29
static std::vector< unsigned int > toVec(const unsigned int dir_mask)
static const unsigned int NRS
Definition: psc_service.hpp:39
static const unsigned int CMP
Definition: psc_service.hpp:31
static const unsigned int RECV
Definition: psc_service.hpp:30
Trace::TimeT getTimeShiftOfMaxValue(const Trace &ccf, Trace::AmplT *pmax_val=NULL)
static std::string toString(const unsigned int dir_mask)
static const unsigned int NRS_NRL
Definition: psc_service.hpp:41