UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
seis.hpp
1 // seis.hpp
2 // $Id: seis.hpp,v 1.19 2008/06/30 08:04:40 guser1 Exp $
3 //---------------------------------------------------------------------
4 #ifndef __ASeisH
5 #define __ASeisH
6 
7 #ifndef GE_BUILD_RAYTR
8 #include <vel2dmod/os.hpp>
9 #include <mth/coord2d.hpp> // for coordinate system transformation
10 #else
11 #include <os.hpp>
12 #include <coord2d.hpp> // for coordinate system transformation
13 #endif
14 
15 enum OS_TYPE {OFFSET_VSP, WALKAWAY_VSP};
16 
17 //---------------------------------------------------------------------
18 struct MigrGridArea
19 {
20  double x_min;
21  double x_max;
22  double z_min;
23  double z_max;
24  double step_x;
25  double step_z;
26 };
27 
28 struct Ampls
29 {
30  double **ampl_grid;
31  int i_max;
32  int j_max;
33  int epsilon;
34 };
35 
36 //=============================================================================
38 class AbstractSeis {
39 
40 public :
41  AbstractSeis();
42  virtual ~AbstractSeis();
43 
45  double getAmpl(int spnum, int recnum, double time, double angle);
46  double getA(int spnum, int recnum, int sample_num, double angle);
47 
49  int getSPNum() { return spNum; };
50 
52  int getRecNum() { return recNum; };
53 
55  ObservSys* getOS(int spN);
56 
58  bool getSP(int spN, double &sp_x, double &sp_z);
59 
61  bool getRec(int recN, double &rec_x, double &rec_z);
62 
64  bool getReady();
65 
67  void sortRec(double_ar &xrecs, double_ar &yrecs, double_ar &zrecs);
68 
70  double* getTrace(int sp_n, int rec_n, int &length)
71  {
72  double *trace = new double[trLength];
73  for (int i=0; i<trLength; i++)
74  trace[i] = seisDataXComp[sp_n][rec_n][i];
75  length = trLength;
76  return trace;
77  };
78 
79  void getTraceParam(int &tr_length, double &tr_step)
80  {
81  tr_length = trLength;
82  tr_step = trStep;
83  };
84 
86  bool saveAmpl(double **ampl_grid, char *OutMod, MigrGridArea mg_area);
87  double** interpolation(Ampls stAmpls, double factor);
88  void smoothing(Ampls stAmpls);
89  void detalization(Ampls stAmpls, double reinforcement);
90  // UNUSED
91  void contrastIncreasing(Ampls stAmpls, double reinforcement);
92  void medianFilter();
93 
94  virtual bool saveResult(double **ampl_grid, char *OutMod, MigrGridArea mg_area) { return false; };
95  void cutDown(Ampls stAmpls, double x_min, double step_x);
96  void cleaning(Ampls stAmpls);
97  // DEBUG
98  bool saveResultToFile(Ampls stAmpls);
99 
100  //void RecalculateAmplGrid(double **ampl_grid, int **ipc_num_grid, int i_max, int j_max);
101 
102  void recalcSPRecCoordinates(double_ar xsps, double_ar ysps, double_ar zsps,
103  double_ar &xrecs, double_ar &yrecs, double_ar &zrecs,
104  OS_TYPE ostype, double mx, double my, double maz, bool well_project=true);
105 
106  void setReady() { ready = true; }
107 
108 protected:
109 
110  double getAzimuth(double x, double y);
111 
112  void deleteAllData();
113 
114  bool ready;
115  bool flag1d;
117  int recNum;
118  int spNum;
119  int trLength;
120  double trStep;
122  double ***seisDataXComp;
123  double ***seisDataZComp;
126  double *spX;
127  double *spZ;
128  double *recX;
129  double *recZ;
131 };
132 
133 
134 #endif
double *** seisDataXComp
Definition: seis.hpp:122
double * recZ
Definition: seis.hpp:129
double trStep
Definition: seis.hpp:120
Definition: seis.hpp:38
double * getTrace(int sp_n, int rec_n, int &length)
Definition: seis.hpp:70
int getSPNum()
Definition: seis.hpp:49
bool saveAmpl(double **ampl_grid, char *OutMod, MigrGridArea mg_area)
bool ready
Definition: seis.hpp:114
Definition: seis.hpp:18
double getAmpl(int spnum, int recnum, double time, double angle)
bool flag1d
Definition: seis.hpp:115
Observation system class.
Definition: os.hpp:13
Definition: seis.hpp:28
double *** seisDataZComp
Definition: seis.hpp:123
int trLength
Definition: seis.hpp:119
bool getRec(int recN, double &rec_x, double &rec_z)
Definition: objectar.hpp:55
int getRecNum()
Definition: seis.hpp:52
double * recX
Definition: seis.hpp:128
bool getSP(int spN, double &sp_x, double &sp_z)
bool getReady()
int recNum
Definition: seis.hpp:117
int spNum
Definition: seis.hpp:118
void sortRec(double_ar &xrecs, double_ar &yrecs, double_ar &zrecs)
double * spX
Definition: seis.hpp:126
ObservSys * getOS(int spN)
double * spZ
Definition: seis.hpp:127