UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Typedefs | Functions
S2Corr Namespace Reference

Typedefs

typedef std::vector< Trace::AmplTDVector
 
typedef std::vector< DVectorDMatrix
 

Functions

template<template< class > class Functor>
bool traceBaseOp (Trace &tr, const DVector &bases)
 
bool traceWeightSum (const Trace &tr1, const Trace &tr2, Trace::AmplT &koeff)
 
bool traceAmplKoeffs (const Trace &tr1, const Trace &tr2, DVector &koeffs)
 
bool polycorPrepare (const WaveField &field, DMatrix &C)
 
bool polycorPrepare (const WaveField &field, const Trace &tr, DVector &C)
 
bool polycorPrepare (const WaveField &field, const Trace &trs, size_t wsize, Trace &trr)
 
bool tracesIntercorr (const Trace &tr1, const Trace &tr2, DVector &corr)
 
bool tracesIntercorr (const Trace &tr1, const Trace &tr2, size_t wsize, Trace &tr)
 
bool GetDispersion (const Trace &trs, float &disp)
 
template<typename FFT_T >
bool tracesCCF (FFT_T &fft, const Trace &tr1, const Trace &tr2, Trace &ccf, bool norma)
 
template<typename FFT_T >
bool traceACF (FFT_T &fft, const Trace &tr, Trace &acf, bool norma)
 
template<typename FFT_T >
bool SpectrWidth (FFT_T &fft, const Trace &tr, float &sw_val)
 
bool diff (Trace &trace)
 
bool fieldEnergy (const WaveField &field, DMatrix &E)
 
bool fieldEnergy (const WaveField &field, size_t wsize, WaveField &E)
 
bool traceEnergy (const Trace &tr, DVector &e)
 
bool traceEnergy (const Trace &tr, size_t wsize, Trace &e)
 
bool intercorr (size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &r)
 
bool traceAutocorr (const Trace &tr_in, size_t base, Trace &tr_out)
 
bool autocorr (size_t n, const Trace::AmplT *x, std::vector< Trace::AmplT > &y, size_t acf_size=0)
 
bool energy (size_t n, const Trace::AmplT *x, Trace::AmplT &e, bool norm_flag=false)
 
bool sim (size_t n, const Trace::AmplT *x, const Trace::AmplT *y, Trace::AmplT &s)
 
bool modsum (size_t n, const Trace::AmplT *x, Trace::AmplT &e)
 

Detailed Description

Correlation methods

Typedef Documentation

typedef std::vector<DVector> S2Corr::DMatrix

Matrix of amplitudes

typedef std::vector<Trace::AmplT> S2Corr::DVector

Array of amplitudes

Function Documentation

bool S2Corr::diff ( Trace trace)

Differentiate provided trace.

bool S2Corr::energy ( size_t  n,
const Trace::AmplT x,
Trace::AmplT e,
bool  norm_flag = false 
)

Calculate energy for provided signal, return false on error.

Parameters
nNumber of samples (>0)
xAmplitudes array
eResulted energy value
norm_flagNormalize energy by number of samples flag.
bool S2Corr::fieldEnergy ( const WaveField field,
DMatrix &  E 
)

Fill energy matrix E for provided field. Matrix E should be initialized and its dimension has to be MxN, where M is a number of bases where energy values is calculated and N is a number of traces in the field. Return false on any error.

bool S2Corr::GetDispersion ( const Trace trs,
float &  disp 
)

Method calcs dispersion of trace

bool S2Corr::intercorr ( size_t  n,
const Trace::AmplT x,
const Trace::AmplT y,
Trace::AmplT r 
)

Calculate intercorrelation between two signals, x and y Return false on error

Parameters
nNumber of samples (>0)
xFirst signal amplitudes
ySecond signal amplitudes
rResulted correlation value
bool S2Corr::modsum ( size_t  n,
const Trace::AmplT x,
Trace::AmplT e 
)
Parameters
nNumber of samples (>0)
xAmplitudes array
eResulted energy value
bool S2Corr::polycorPrepare ( const WaveField field,
DMatrix &  C 
)

Fill intercorrelation sums matrix C for provided field. C has to be predefined with size MxN, where M - number of elementary bases in trace and N - number of traces in the field. The i-th row of C contains the sums of intercorrelations between i-th trace and all the others traces in the field. Return false on any error.

bool S2Corr::polycorPrepare ( const WaveField field,
const Trace tr,
DVector &  C 
)

Calculate the sums of intercorrelations betwen tr and all traces in the field on elementary correlation bases. The result is vector C which will be filled by summed values. C has to be predefined and its dimension defines a number of elementary bases (less or equal than number of samples in traces). Return false on any error.

bool S2Corr::polycorPrepare ( const WaveField field,
const Trace trs,
size_t  wsize,
Trace trr 
)

Calculate the sums of intercorrelations betwen tr and all traces in the field on elementary correlation bases using slide window with size wsize. Return false on any error.

bool S2Corr::sim ( size_t  n,
const Trace::AmplT x,
const Trace::AmplT y,
Trace::AmplT s 
)

Calculate similarity for two signals, Sum'x(i)y(i)' Return false on error

Parameters
nNumber of samples (>0)
xFirst signal amplitudes
ySecond signal amplitudes
sResulted correlation value
template<typename FFT_T >
bool S2Corr::traceACF ( FFT_T &  fft,
const Trace tr,
Trace acf,
bool  norma 
)

Auto correlation of trace. FFT procedure is provided. acf parameter has to be predefined with lenghts of tr. Returns false on error. Flag of norma calculation

Parameters
fftFFT object
trThe input trace
acfResult
bool S2Corr::traceAmplKoeffs ( const Trace tr1,
const Trace tr2,
DVector &  koeffs 
)

Calculates amplitude coefficients for tr1 where tr2 is a weights. Return false on any error.

template<template< class > class Functor>
bool S2Corr::traceBaseOp ( Trace tr,
const DVector &  bases 
)

Multiply trace samples on corresponded bases. Number of weights bases be > 0 and < than trace lenght. Return false on any error.

bool S2Corr::traceEnergy ( const Trace tr,
DVector &  e 
)

Provide energy vector e for trace tr. Vector e should be initialized and its size defines number of bases where energy is calculated. Return false if number of bases (size of e) > than samplse on input trace or when any error occured.

template<typename FFT_T >
bool S2Corr::tracesCCF ( FFT_T &  fft,
const Trace tr1,
const Trace tr2,
Trace ccf,
bool  norma 
)

Cross correlation between two traces with the same lenghts. FFT procedure is provided. ccf parameter has to be predefined with lenghts of tr1 or tr2. Returns false on error. Flag of norma calculation

Parameters
fftFFT object
tr1The first trace
tr2The second trace
ccfResult
bool S2Corr::tracesIntercorr ( const Trace tr1,
const Trace tr2,
DVector &  corr 
)

Fill corr vector of intercorrelations for traces tr1 and tr2. corr has to be predefined and its size defines a number of correlation bases in trace. Traces length have to be the same. Number of bases is to be <= than number of samples in traces. Return false on any error.

bool S2Corr::tracesIntercorr ( const Trace tr1,
const Trace tr2,
size_t  wsize,
Trace tr 
)

Fill correlation between two traces using sliding window with number of samples equal to wsize. Return false on any error.

bool S2Corr::traceWeightSum ( const Trace tr1,
const Trace tr2,
Trace::AmplT koeff 
)

Calculates weight sum coefficient for trace tr1, where weights are the samples from tr2, size of tr1 should be equal to size of tr2. Return false on any error.