UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
s2_corr.hpp
1 /* s2_corr.hpp */
2 /* $Id: s2_corr.hpp 21237 2011-11-15 10:22:54Z guser1 $ */
3 #ifndef __s2_corr_hpp
4 #define __s2_corr_hpp
5 
6 #ifdef GE_BUILD
7 #include <wave_field.hpp>
8 #include <base_separator.hpp>
9 #else
10 #include <s2proc/wave_field.hpp>
11 #include <s2proc/base_separator.hpp>
12 #endif
13 
14 #include <stdio.h>
15 
17 namespace S2Corr
18 {
20  typedef std::vector<Trace::AmplT> DVector;
21 
23  typedef std::vector<DVector> DMatrix;
24 
25 
28  template <template<class> class Functor>
29  bool traceBaseOp(Trace &tr, const DVector &bases);
30 
31 
35  bool traceWeightSum(const Trace &tr1,
36  const Trace &tr2,
37  Trace::AmplT &koeff);
38 
39 
42  bool traceAmplKoeffs(const Trace &tr1,
43  const Trace &tr2,
44  DVector &koeffs);
45 
46 
52  bool polycorPrepare(const WaveField &field, DMatrix &C);
53 
54 
60  bool polycorPrepare(const WaveField &field, const Trace &tr, DVector &C);
61 
65  bool polycorPrepare(const WaveField &field, const Trace &trs, size_t wsize, Trace &trr);
66 
71  bool tracesIntercorr(const Trace &tr1, const Trace &tr2, DVector &corr);
72 
75  bool tracesIntercorr(const Trace &tr1, const Trace &tr2, size_t wsize, Trace &tr);
76 
78  bool GetDispersion(const Trace &trs, float &disp);
79 
82  template <typename FFT_T>
83  bool tracesCCF(FFT_T &fft,
84  const Trace &tr1,
85  const Trace &tr2,
86  Trace &ccf,
87  bool norma);
93  template <typename FFT_T>
94  bool traceACF(FFT_T &fft,
95  const Trace &tr,
96  Trace &acf,
97  bool norma);
101  template <typename FFT_T>
102  bool SpectrWidth(FFT_T &fft,
103  const Trace &tr,
104  float &sw_val);
105 
106 
108  bool diff(Trace &trace);
109 
114  bool fieldEnergy(const WaveField &field, DMatrix &E);
115 
116  bool fieldEnergy(const WaveField &field, size_t wsize, WaveField &E);
117 
122  bool traceEnergy(const Trace &tr, DVector &e);
123 
124  bool traceEnergy(const Trace &tr, size_t wsize, Trace &e);
125 
128  bool intercorr(size_t n,
129  const Trace::AmplT *x,
130  const Trace::AmplT *y,
131  Trace::AmplT &r
132  );
133 
134  bool traceAutocorr(const Trace &tr_in,
135  size_t base,
136  Trace &tr_out
137  );
138 
139  bool autocorr(size_t n,
140  const Trace::AmplT *x,
141  std::vector<Trace::AmplT> &y,
142  size_t acf_size=0
143  );
144 
146  bool energy(size_t n,
147  const Trace::AmplT *x,
148  Trace::AmplT &e,
149  bool norm_flag = false
150  );
151 
152 
155  bool sim(size_t n,
156  const Trace::AmplT *x,
157  const Trace::AmplT *y,
158  Trace::AmplT &s
159  );
160 
161  bool modsum(size_t n,
162  const Trace::AmplT *x,
163  Trace::AmplT &e
164  );
165 
166 };
167 
168 #ifdef GE_BUILD
169 #include <s2_corr_inline.hpp>
170 #else
171 #include <s2proc/s2_corr_inline.hpp>
172 #endif
173 
174 
175 
176 #endif /* s2_corr.hpp */
float AmplT
Definition: trace.hpp:21
bool traceACF(FFT_T &fft, const Trace &tr, Trace &acf, bool norma)
Definition: s2_corr_inline.hpp:138
bool traceWeightSum(const Trace &tr1, const Trace &tr2, Trace::AmplT &koeff)
bool tracesCCF(FFT_T &fft, const Trace &tr1, const Trace &tr2, Trace &ccf, bool norma)
Definition: s2_corr_inline.hpp:55
bool modsum(size_t n, const Trace::AmplT *x, Trace::AmplT &e)
bool GetDispersion(const Trace &trs, float &disp)
std::vector< Trace::AmplT > DVector
Definition: s2_corr.hpp:20
Definition: wave_field.hpp:13
Definition: trace.hpp:14
bool sim(size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &s)
bool traceAmplKoeffs(const Trace &tr1, const Trace &tr2, DVector &koeffs)
bool polycorPrepare(const WaveField &field, DMatrix &C)
bool traceBaseOp(Trace &tr, const DVector &bases)
Definition: s2_corr_inline.hpp:17
bool diff(Trace &trace)
bool fieldEnergy(const WaveField &field, DMatrix &E)
bool intercorr(size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &r)
bool tracesIntercorr(const Trace &tr1, const Trace &tr2, DVector &corr)
bool energy(size_t n, const Trace::AmplT *x, Trace::AmplT &e, bool norm_flag=false)
std::vector< DVector > DMatrix
Definition: s2_corr.hpp:23
bool traceEnergy(const Trace &tr, DVector &e)