OpendTect-6_4  6.4
synthseis.h
Go to the documentation of this file.
1 #ifndef synthseis_h
2 #define synthseis_h
3 
4 /*+
5 ________________________________________________________________________
6 
7  (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
8  Author: A.H. Bril
9  Date: 24-3-1996
10  RCS: $Id$
11 ________________________________________________________________________
12 
13 -*/
14 
15 #include "seismod.h"
16 #include "ailayer.h"
17 #include "factory.h"
18 #include "reflectivitymodel.h"
19 #include "iopar.h"
20 #include "odmemory.h"
21 #include "odcomplex.h"
22 #include "paralleltask.h"
23 #include "threadlock.h"
24 #include "uistrings.h"
25 
26 class RayTracer1D;
27 class SeisTrc;
28 class SeisTrcBuf;
29 class TimeDepthModel;
30 class RayTracerRunner;
31 class Wavelet;
32 template <class T> class Array1D;
33 template <class T> class SamplingData;
34 
35 namespace Fourier { class CC; };
36 namespace PreStack { class Gather; }
37 
38 namespace Seis
39 {
40 
41 /*
42  brief generates synthetic traces.The SynthGenerator performs the basic
43  convolution with a reflectivity series and a wavelet.
44  The MultiTraceSynthGenerator is a Parallel runner of the SynthGenerator.
45 
46  If you have AI layers and want directly some synthetics out of them,
47  then you should use the RayTraceSynthGenerator.
48 */
49 
50 
52 { mODTextTranslationClass(SynthGenBase);
53 public:
54 
55  virtual bool setWavelet(const Wavelet*,OD::PtrPolicy pol);
56  /* auto computed + will be overruled if too small */
57  virtual bool setOutSampling(const StepInterval<float>&);
58  /* depends on the wavelet size too */
59  bool getOutSamplingFromModel
61  StepInterval<float>&, bool usenmo=false);
62 
63  void setMuteLength(float n) { mutelength_ = n; }
64  float getMuteLength() const { return mutelength_; }
65 
66  void setStretchLimit(float n){ stretchlimit_ = n; }
67  float getStretchLimit() const;
68  void doSampledReflectivity(bool yn)
69  { dosampledreflectivities_ = yn; }
70 
71  virtual void enableFourierDomain(bool fourier)
72  { isfourier_ = fourier; }
73 
74  uiString errMsg() const { return errmsg_;}
75 
76  virtual void fillPar(IOPar&) const;
77  virtual bool usePar(const IOPar&);
78 
79  static float cStdMuteLength() { return 0.02f; }
80  static float cStdStretchLimit() { return 0.2f; }
81 
82  static const char* sKeyFourier() { return "Convolution Domain"; }
83  static const char* sKeyNMO() { return "Use NMO"; }
84  static const char* sKeyInternal() { return "Internal Multiples"; }
85  static const char* sKeySurfRefl() { return "Surface Reflection coef"; }
86  static const char* sKeyMuteLength(){ return "Mute length"; }
87  static const char* sKeyStretchLimit(){ return "Stretch limit"; }
88 
89 protected:
90  SynthGenBase();
91  virtual ~SynthGenBase();
92 
93  bool isfourier_;
94  bool applynmo_;
96  float mutelength_;
98  const Wavelet* wavelet_;
103 
105 
106  bool isInputOK();
107 };
108 
109 
110 
113 public:
115 
116  static SynthGenerator* create(bool advanced);
117 
118  SynthGenerator();
119  ~SynthGenerator();
120 
121  virtual bool setWavelet(const Wavelet*,OD::PtrPolicy pol);
122  /* auto computed: not necessary -
123  will be overruled if too small */
124  virtual bool setOutSampling(const StepInterval<float>&);
125  bool setModel(const ReflectivityModel&);
126 
127  bool doWork();
128  od_int64 currentProgress() const { return progress_; }
129 
130  const SeisTrc& result() const { return outtrc_; }
131  SeisTrc& result() { return outtrc_; }
132 
133  /*<! available after execution */
135  { return freqreflectivities_; }
136  void getSampledRM(ReflectivityModel&) const;
137 
138 
139 protected:
140 
141  int nextStep();
142  int setConvolveSize();
143  int genFreqWavelet();
144 
145  bool computeTrace(SeisTrc&);
146  bool doNMOStretch(const ValueSeries<float>&, int insz,
147  ValueSeries<float>& out,int outsz) const;
148  bool doFFTConvolve(ValueSeries<float>&,int sz);
149  bool doTimeConvolve(ValueSeries<float>&,int sz);
150  void getWaveletTrace(Array1D<float>&,float z,float scal,
151  SamplingData<float>&) const;
152  void sortOutput(float_complex*,ValueSeries<float>&,
153  int sz) const;
154 
155  virtual bool computeReflectivities();
156 
160 
164 
166 
167 };
168 
169 
171  public SynthGenBase
173 public:
176 
177  void setModels(
179 
180  void getResult(ObjectSet<SeisTrc>&);
181  void getSampledRMs(
183 
184  uiString uiMessage() const {
185  return m3Dots(tr("Generating synthetics"));
186  }
187 
188  od_int64 totalNr() const { return totalnr_; }
189 
190 protected:
191 
192  od_int64 nrIterations() const;
193  bool doPrepare(int);
194  virtual bool doWork(od_int64,od_int64,int);
195 
203 };
204 
205 
206 
209 public:
210 
211  mStruct(Seis) RayModel
212  {
213  RayModel(const RayTracer1D& rt1d,int nroffsets);
214  ~RayModel();
215 
216  void getTraces(ObjectSet<SeisTrc>&,bool steal);
217  void getD2T(ObjectSet<TimeDepthModel>&,bool steal);
218  void getZeroOffsetD2T(TimeDepthModel&);
219  void getRefs(ObjectSet<const ReflectivityModel>&,bool steal,
220  bool sampled=false);
221  void forceReflTimes(const StepInterval<float>&);
222 
223  const SeisTrc* stackedTrc() const;
224 
225  protected:
226  ObjectSet<SeisTrc> outtrcs_; //this is a gather
227  ObjectSet<TimeDepthModel> t2dmodels_;
228  TimeDepthModel* zerooffset2dmodel_;
230  ObjectSet<const ReflectivityModel> sampledrefmodels_;
231 
232  friend class RaySynthGenerator;
233 
234  };
235 
237  bool ownrms=true);
240 
241  void reset();
242 
243  //input
244  void fillPar(IOPar& raypars) const;
245  bool usePar(const IOPar& raypars);
246  void forceReflTimes(const StepInterval<float>&);
247 
248  //available after initialization
249  void getAllRefls(ObjectSet<const ReflectivityModel>&);
250 
252  { return errmsg_.isEmpty() ? message_ : errmsg_; }
253 
254 
255  //available after execution
256  RayModel& result(int id) { return *(*raymodels_)[id]; }
257  const RayModel& result(int id) const { return *(*raymodels_)[id]; }
258  ObjectSet<RayModel>* rayModels() { return raymodels_; }
259 
260  const ObjectSet<RayTracer1D>& rayTracers() const;
261  const TypeSet<ElasticModel>& elasticModels() const { return *aimodels_; }
262  void getTraces(ObjectSet<SeisTrcBuf>&);
263  void getStackedTraces(SeisTrcBuf&);
264 
265 protected:
267  od_int64 nrIterations() const;
268  od_int64 nrDone() const;
269  uiString uiNrDoneText() const;
270  od_int64 totalNr() const;
271  bool doPrepare(int);
272  bool doWork(od_int64,od_int64,int);
273 
280 
284 };
285 
286 } // namespace Seis
287 
288 #endif
Array1D ( Subclass of ArrayND ) is a one dimensional array.
Definition: arraynd.h:101
float stretchlimit_
Definition: synthseis.h:95
#define mExpClass(module)
Definition: commondefs.h:160
bool dointernalmultiples_
Definition: synthseis.h:100
Summary for a Seismic object.
Definition: segydirectdef.h:23
StepInterval< float > forcedrefltimes_
Definition: synthseis.h:281
IOPar raysetup_
Definition: synthseis.h:278
const RayModel & result(int id) const
Definition: synthseis.h:257
static const char * sKeyInternal()
Definition: synthseis.h:84
A lock of a type that (hopefully) suits your needs. To use it, you need the Locker class...
Definition: threadlock.h:53
#define mStruct(module)
Definition: commondefs.h:165
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
PreStack gather.
Definition: prestackgather.h:36
static const char * sKeyStretchLimit()
Definition: synthseis.h:87
static float cStdStretchLimit()
Definition: synthseis.h:80
virtual void enableFourierDomain(bool fourier)
Definition: synthseis.h:71
float getMuteLength() const
Definition: synthseis.h:64
void usePar(const IOPar &iop, ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:188
RayTracerRunner * rtr_
Definition: synthseis.h:266
#define od_int64
Definition: plftypes.h:36
Definition: synthseis.h:207
Definition: wavelet.h:25
Definition: synthseis.h:36
od_int64 progress_
Definition: synthseis.h:165
const Wavelet * wavelet_
Definition: synthseis.h:98
SeisTrc & result()
Definition: synthseis.h:131
Definition: uistring.h:89
float surfreflcoeff_
Definition: synthseis.h:102
int convolvesize_
Definition: synthseis.h:158
ObjectSet< SeisTrc > trcs_
Definition: synthseis.h:199
Definition: synthseis.h:51
void setStretchLimit(float n)
Definition: synthseis.h:66
TypeSet< float_complex > freqwavelet_
Definition: synthseis.h:163
od_int64 totalnr_
Definition: synthseis.h:201
Generalization of a task that can be run in parallel.
Definition: paralleltask.h:66
Definition: synthseis.h:170
Set of pointers to objects.
Definition: commontypes.h:32
const ReflectivityModel * refmodel_
Definition: synthseis.h:157
Definition: synthseis.h:111
ObjectSet< RayModel > * rayModels()
Definition: synthseis.h:258
static const char * sKeySurfRefl()
Definition: synthseis.h:85
Generalized set of parameters of the keyword-value type.
Definition: iopar.h:47
void setMuteLength(float n)
Definition: synthseis.h:63
TypeSet< float > offsets_
Definition: synthseis.h:277
static const char * sKeyNMO()
Definition: synthseis.h:83
bool waveletismine_
Definition: synthseis.h:97
const TypeSet< ElasticModel > * aimodels_
Definition: synthseis.h:276
uiString message_
Definition: synthseis.h:275
uiString errmsg_
Definition: synthseis.h:104
od_int64 totalNr() const
Definition: synthseis.h:188
uiString uiMessage() const
will be message() again in 7.x
Definition: synthseis.h:184
const SeisTrc & result() const
Definition: synthseis.h:130
std::complex< float > float_complex
Definition: odcomplex.h:18
bool isfourier_
Definition: synthseis.h:93
od_int64 currentProgress() const
Definition: synthseis.h:128
#define mDefineFactoryInClass(T, funcname)
Definition: factory.h:426
Ray tracer in 1D.
Definition: raytrace1d.h:32
Definition: convolve2d.h:27
uiString uiMessage() const
will be message() again in 7.x
Definition: synthseis.h:251
void fillPar(IOPar &iop, const ODPolygon< T > &poly, const char *inpkey)
Definition: polygon.h:175
void doSampledReflectivity(bool yn)
Definition: synthseis.h:68
ObjectSet< RayModel > * raymodels_
Definition: synthseis.h:279
ObjectSet< const ReflectivityModel > sampledrefmodels_
Definition: synthseis.h:197
bool dosampledreflectivities_
Definition: synthseis.h:101
bool isEmpty() const
Definition: odstring.h:51
static uiHor3DInterpol * create(uiParent *)
uiString errMsg() const
Definition: synthseis.h:74
ReflectivityModel sampledrefmodel_
Definition: synthseis.h:161
Seismic trace.
Definition: seistrc.h:34
BufferString errmsg_
Definition: horizontracker.h:119
const TypeSet< float_complex > & freqReflectivities() const
Definition: synthseis.h:134
Definition: raytracerrunner.h:22
bool raytracingdone_
Definition: synthseis.h:283
TypeSet< float_complex > freqreflectivities_
Definition: synthseis.h:162
set of seismic traces.
Definition: seisbuf.h:31
bool forcerefltimes_
Definition: synthseis.h:282
const TypeSet< ElasticModel > & elasticModels() const
Definition: synthseis.h:261
PtrPolicy
Definition: odmemory.h:22
Threads::Lock lock_
Definition: synthseis.h:202
static const char * sKeyMuteLength()
Definition: synthseis.h:86
Holds the fundamental sampling info: start and interval.
Definition: samplingdata.h:22
SeisTrc & outtrc_
Definition: synthseis.h:159
const ObjectSet< const ReflectivityModel > * models_
Definition: synthseis.h:196
TypeSet< int > trcidxs_
Definition: synthseis.h:200
bool ownraymodels_
Definition: synthseis.h:274
Converts between time, depth and velocity given a model. The velocity model can be either RMO-velocit...
Definition: velocitycalc.h:31
#define m3Dots(txt)
Definition: uistrings.h:548
static const char * sKeyFourier()
Definition: synthseis.h:82
StepInterval< float > outputsampling_
Definition: synthseis.h:99
static float cStdMuteLength()
Definition: synthseis.h:79
RayModel & result(int id)
Definition: synthseis.h:256
ObjectSet< SynthGenerator > synthgens_
Definition: synthseis.h:198
float mutelength_
Definition: synthseis.h:96
bool applynmo_
Definition: synthseis.h:94

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019