README for RAYT2DAN          Debashish Sarkar   2003

This code depends on the CWP/SU (Seismic Unix) package,
available free from the Center for Wave Phenomena at:
www.cwp.mines.edu/cwpcodes

The demo also depends on the proprietary codes: rayt2dan and surelanan
These codes are available to sponsors of the CWP Consortium project.

The program VELPERTAN computes updates of medium 
parameters by minimizing the variance of the
migrated depths of events in image gathers.

To install VELPERTAN

Edit the Makefile to reflect the needs of your system and
type:

make

Demo for VELPERTAN

The demo shows an application of the code on a
factorized v(x,z) medium with linear gradients in
vertical velocity. To run the demo, type:

Synlv          to create the test dataset
Rayt2dan.sh    to perform the ray tracing for the migration
Sukdmig2d.sh   to perform the migration
Surelanan.sh   to begin the residual moveout analysis

to determine the residual moveout at different cdp 
locations. Then use 

Velpertan.sh      to compute parameter updates. 


To minimize the residual moveout
and to obtain perturbation in the parameters.
You should see something like this:

d_VP0=0.000000e+00 d_kz=2.578647e-01 d_kx=7.929953e-02 d_epsilon=3.494340e-01 d_delta=1.202125e-02

The procedure would follow by adding each of these values to
the corresponding value in the input to rayt2dan in the shell
script Rayt2dan.sh. 

The values of d_VP0, d_kz, d_kx, d_epsilon, d_delta are added
to the parameters that are input into unif2 in the portion
of the Rayt2dan.sh script reproduced here:

...
 # Create parameter files for raytracing.
 # Make VP0
 # note: add computed d_VP0 to V00 here
 # add computed d_kx to dvdx, and add d_kz to dvdz here.
 unif2 < test >VP0  ninf=$ninf  npmax=$npmax \
        nz=$nz dz=$dz fz=$fz nx=$nx dx=$dx fx=$fx \
        v00=2000 dvdz=0.3 dvdx=0.1
 smooth2 < VP0 r1=$r1 r2=$r2 n1=$nz n2=$nx > VP0sm

 # Make epsilon
 # note: add the computed value of d_epsilon to v00 here
 unif2 < test >epsilon ninf=$ninf npmax=$npmax \
        nz=$nz dz=$dz fz=$fz nx=$nx dx=$dx fx=$fx \
        v00=0.0
 smooth2 < epsilon r1=$r1 r2=$r2 n1=$nz n2=$nx > epsilonsm

 # Make delta
 # note: add the computed value of d_delta to v00 here
 unif2 < test >delta  ninf=$ninf  npmax=$npmax \
        nz=$nz dz=$dz fz=$fz nx=$nx dx=$dx fx=$fx \
        v00=0.0
 smooth2 < delta r1=$r1 r2=$r2 n1=$nz n2=$nx > deltasm
....


The user would then repeat the procedure beginning
by running Rayt2dan.sh, Sukdmig2d.sh, Surelanan.sh, and Velpertan.sh, until
the user is satisfied that the migrated image gathers are flat.

For this particular demo, three iterations of this procedure should
completely flatten the migrated image gathers.

John Stockwell	 | jstockwe@mines.edu
Center for Wave Phenomena (The Home of Seismic Un*x)
Colorado School of Mines
Golden, CO 80401 | http://www.cwp.mines.edu/cwpcodes
voice: (303) 273-3049

Our book:
Norman Bleistein, Jack K. Cohen, John W. Stockwell Jr., [2001],
Mathematics of multidimensional seismic imaging, migration, and inversion,
(Interdisciplinary Applied Mathematics, V. 13.), Springer-Verlag, New York.

