-
-
Notifications
You must be signed in to change notification settings - Fork 0
doc‐3.0.0‐dev‐vfsacrsnh_lib.h
This is the header with macro definitions and prototypes of the functions implemented in 'vfsacrsnh_lib.c'.
The vfsa uses macro definition to establish the parameters search window for RN, RNIP and BETA. These windows are defined with MIN, MAX values and APERTURE for each parameter in the following macros.
- BETA search window:
#define Beta_MAX 1 // Beta maximum value
#define Beta_MIN -1 // Beta minimun value
#define BETA_APERTURE Beta_MAX-Beta_MIN
- RNIP search window:
#define Rnip_MAX 4 // RNIP maximum value
#define Rnip_MIN 0 // RNIP minimum value
#define RNIP_APERTURE Rnip_MAX-Rnip_MIN
- RN search window:
#define Rn_MAX 5 // RN maximum value
#define Rn_MIN 0 // RN minimum value
#define RN_APERTURE Rn_MAX-Rn_MIN
The stacking window (number of samples to stack) in h and m is defined with the following macros:
#define hMAX 50 // Max of samples to stack in half-offset
#define mMAX 50 // Max of samples to stack in CMP
And the number of iterations in VFSA algorithm is defined in ITMAX macro:
#define ITMAX 5000 // Maximum number of iterations in VFSA
The signal function is also defined using pre-processor macros to avoid function calls. In math, the signal function returns the signal of a real number. Returns 1 if s is a positive number or zero, and -1 otherwise.
#define signal(s) ((s<0)?(-1.):(1.))
/*< Signal function >*/
- getRandomNumberBetween0and1 returns a random number between 0 and 1 to be used in the VFSA parameters disturbance and in the Metropolis criteria.
float getRandomNumberBetween0and1();
/*< Function to get a random number between 0 and 1 >*/
- getVfsaIterationTemperature returns a temperature value for each VFSA iteration. VFSA is based on a cooling schedule of a solid in a heat bath, this function simulates the temperature of each state during the annealing.
float getVfsaIterationTemperature( int iteration /* Number of the current iteration */,
float dampingFactor /* C0, the VFSA damping factor */,
float initialTemperature /* T0, the VFSA Initial temperature */);
/*< Temperature function for VFSA algorithm >*/
- disturbParameters disturbs the parameter vector of the previous VFSA iteration for a given temperature.
void disturbParameters( float temperature /* Temperature of the current iteration */,
float* disturbedParameter /* disturbed parameters vector */,
float* parameter /* parameters vector */);
/*< Disturb parameters from the previous VFSA iteration
Note: It receives a parameter vector and distubs it accordingly to
VFSA algorithm disturb parameters step.
>*/
- nonHyperbolicCRSapp calculate the non-hyperbolic CRS traveltime surface.
void nonHyperbolicCRSapp( float t[2*mMAX+1][hMAX] /* non-hyperbolic CRS traveltime surface */,
float m0 /* Central CMP of the approximation */,
float dm, /* CMP sampling */
float om /* CMP axis origin */,
float dh /* half-offset sampling */,
float oh /* half-offset axis origin */,
float t0 /* Normal ray traveltime */,
float v0 /* Near surface velocity */,
float RN /* RN, CRS parameter */,
float RNIP /* RNIP, CRS parameter */,
float BETA /* BETA, CRS parameter */);
/*< Returns the Non hyperbolic CRS approximation surface (FOMEL; KAZINNIK, 2013) >*/
- semblance calculate semblance between the non-hyperbolic CRS surface and the reflection data.
float semblance(float m0 /* Central CMP of the approximation */,
float dm /* CMP sampling */,
float om /* CMP axis origin */,
float oh /* half-offset axis origin */,
float dh /* half-offset axis sampling */,
float dt /* time sampling */,
int nt /* number of time samples */,
float t0 /* Normal ray traveltime */,
float v0 /* Near surface velocity */,
float RN /* RN, CRS parameter */,
float RNIP /* RNIP, CRS parameter */,
float BETA /* BETA, CRS parameter */,
float*** t /* reflection data cube A(m,h,t) */);
/*< Calculate semblance between the Non Hyperbolic CRS approximation surface and reflection data >*/
Rodolfo Dirack - @dirack – rodolfo_profissional@hotmail.com
All rights reserved - Distributed above GPL3 license. See LICENSE
to more information.