1.2.0
CCC
 
seismic.cpp File Reference
#include "geoslib_old_f.h"
#include "geoslib_enum.h"
#include "Enum/EJustify.hpp"
#include "Basic/Law.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "Model/Model.hpp"
#include "Basic/File.hpp"
#include "Basic/Utilities.hpp"
#include "Basic/String.hpp"
#include "Basic/OptDbg.hpp"
#include <math.h>

Classes

struct  ST_Seismic_Neigh
 

Functions

int seismic_z2t_grid (int verbose, DbGrid *db_z, int iatt_v, int *nx, double *x0, double *dx)
 
int seismic_t2z_grid (int verbose, DbGrid *db_t, int iatt_v, int *nx, double *x0, double *dx)
 
int seismic_z2t_convert (DbGrid *db_z, int iatt_v, DbGrid *db_t)
 
int seismic_t2z_convert (DbGrid *db_t, int iatt_v, DbGrid *db_z)
 
int seismic_operate (DbGrid *db, int oper)
 
int seismic_convolve (DbGrid *db, int flag_operate, int flag_contrast, int type, int ntw, int option, int tindex, double fpeak, double period, double amplitude, double distort, double val_before, double val_middle, double val_after, double *wavelet)
 
int seismic_estimate_XZ (DbGrid *db, Model *model, int nbench, int nv2max, int flag_ks, int flag_std, int flag_sort, int flag_stat)
 
int seismic_simulate_XZ (DbGrid *db, Model *model, int nbench, int nv2max, int nbsimu, int seed, int flag_ks, int flag_sort, int flag_stat)
 

Function Documentation

int seismic_convolve ( DbGrid db,
int  flag_operate,
int  flag_contrast,
int  type,
int  ntw,
int  option,
int  tindex,
double  fpeak,
double  period,
double  amplitude,
double  distort,
double  val_before,
double  val_middle,
double  val_after,
double *  wavelet 
)

Convolve with a given wavelet

Returns
Array containing the discretized wavelet, allocated here
Parameters
[in]dbDb structure
[in]flag_operate1 to perform the convolution; 0 otherwise
[in]flag_contrast1 to perform contrast; 0 otherwise
[in]typeType of the wavelet (ENUM_WAVELETS)
[in]ntwhalf-length of the wavelet excluding center (samples)
[in]optionoption used to perform the convolution
  • -1 : erode the edge (on ntw pixels)
  • 0 : truncate the wavelet on the edge
  • +1 : extend the trace with padding before convolution
  • +2 : extend the trace with the last informed values
[in]tindextime index to locate the spike (Spike)
[in]fpeakpeak frequency of the Ricker wavelet
[in]periodwavelet period (s) (Ricker)
[in]amplitudewavelet amplitude (Ricker)
[in]distortwavelet distortion factor (Ricker)
[in]val_beforeReplacement value for undefined element before first defined sample
[in]val_middleReplacement value for undefined element between defined samples
[in]val_afterReplacement value for undefined element after last defined sample
[in]waveletWavelet defined as input (Dimension: 2*ntw+1)
int seismic_estimate_XZ ( DbGrid db,
Model model,
int  nbench,
int  nv2max,
int  flag_ks,
int  flag_std,
int  flag_sort,
int  flag_stat 
)

Perform a bivariate estimation on a grid

Returns
Error return code
Parameters
[in,out]dbGrid Db structure
[in]modelModel structure
[in]nbenchVertical Radius of the neighborhood (center excluded)
[in]nv2maxMaximum number of traces of second variable on each side of the target trace
[in]flag_ks1 for a Simple Kriging; otherwise Ordinary Kriging
[in]flag_std1 for the calculation of the St. Dev.
[in]flag_sort1 if the traces to be treated are sorted by increasing distance to trace where first variable is defined
[in]flag_stat1 for producing final statistics
int seismic_operate ( DbGrid db,
int  oper 
)

Do unary arithmetic operation on traces

Returns
Error return code
Parameters
[in]dbDb structure
[in]operOperator flag (ENUM_SEISMICS)
Remarks
Operations inv, slog and slog10 are "punctuated", meaning that if,
the input contains 0 values, 0 values are returned.
int seismic_simulate_XZ ( DbGrid db,
Model model,
int  nbench,
int  nv2max,
int  nbsimu,
int  seed,
int  flag_ks,
int  flag_sort,
int  flag_stat 
)

Perform a bivariate cosimulation on a grid

Returns
Error return code
Parameters
[in,out]dbGrid Db structure
[in]modelModel structure
[in]nbenchVertical Radius of the neighborhood (center excluded)
[in]nv2maxMaximum number of traces of second variable on each side of the target trace
[in]nbsimuNumber of simulations
[in]seedSeed for the random number generator
[in]flag_ks1 for a Simple Kriging; otherwise Ordinary Kriging
[in]flag_sort1 if the traces to be treated are sorted by increasing distance to trace where first variable is defined
[in]flag_stat1 for producing final statistics
int seismic_t2z_convert ( DbGrid db_t,
int  iatt_v,
DbGrid db_z 
)

Resample from time to depth

Returns
Error return code
Parameters
[in]db_tTime Grid structure
[in]iatt_vAddress of the Velocity variable (in Time grid)
[out]db_zDepth Grid structure
Remarks
Linear interpolation and constant extrapolation is used to
determine interval velocities at times not specified.
int seismic_t2z_grid ( int  verbose,
DbGrid db_t,
int  iatt_v,
int *  nx,
double *  x0,
double *  dx 
)

Define the Depth Grid characteristics from the Time Grid

Returns
Error return code
Parameters
[in]verboseVerbose flag
[in]db_tTime Grid structure
[in]iatt_vAttribute address of the Velocity (in Time grid)
[out]nxNumber of grid nodes along each direction
[out]x0Origin of the grid along each direction
[out]dxMesh of the grid along each direction
int seismic_z2t_convert ( DbGrid db_z,
int  iatt_v,
DbGrid db_t 
)

Resample from depth to time

Returns
Error return code
Parameters
[in]db_zDepth Grid structure
[in]iatt_vAddress of the Velocity variable (in Depth grid)
[out]db_tTime Grid structure
Remarks
Linear interpolation and constant extrapolation is used to
determine interval velocities at times not specified.
int seismic_z2t_grid ( int  verbose,
DbGrid db_z,
int  iatt_v,
int *  nx,
double *  x0,
double *  dx 
)

Define the Time Grid characteristics from the Depth Grid

Returns
Error return code
Parameters
[in]verboseVerbose flag
[in]db_zDepth Grid structure
[in]iatt_vAttribute address of the Velocity (int Depth Grid)
[out]nxNumber of grid nodes along each direction
[out]x0Origin of the grid along each direction
[out]dxMesh of the grid along each direction