DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME:  SUVELAN - compute stacking velocity semblance for cdp gathers	
	     

AUTHOR: Juan Lorenzo (Perl module only)

DATE:   Dec 1 2013, Nov. 2, 2018, Chang Liu

DESCRIPTION:

Version: 

USE

NOTES

Distances (and velocities) need to be scaled by the user
a scaling factor is needed to match 
scalel found in data headers
suvelan DOES not take scaleco or scalel into consdieration
automatically

Examples

SEISMIC UNIX NOTES

 SUVELAN - compute stacking velocity semblance for cdp gathers		     

 suvelan <stdin >stdout [optional parameters]				     

 Optional Parameters:							     
 nv=50                   number of velocities				     
 dv=50.0                 velocity sampling interval			     
 fv=1500.0               first velocity				     
 anis1=0.0               quartic term, numerator of an extended quartic term
 anis2=0.0               in denominator of an extended quartic term         
 smute=1.5               samples with NMO stretch exceeding smute are zeroed
 dtratio=5               ratio of output to input time sampling intervals   
 nsmooth=dtratio*2+1     length of semblance num and den smoothing window   
 verbose=0               =1 for diagnostic print on stderr		     
 pwr=1.0                 semblance value to the power      		     

 Notes:								     
 Velocity analysis is usually a two-dimensional screen for optimal values of
 the vertical two-way traveltime and stacking velocity. But if the travel-  
 time curve is no longer close to a hyperbola, the quartic term of the      
 traveltime series should be considered. In its easiest form (with anis2=0) 
 the optimizion of all parameters requires a three-dimensional screen. This 
 is done by a repetition of the conventional two-dimensional screen with a  
 though the function is no more a polynomial. When screening for optimal    
 values the theoretical dependencies between these paramters can be taken   
 into account. The traveltime function is defined by                        

                1            anis1                                          
 t^2 = t_0^2 + --- x^2 + ------------- x^4                                  
               v^2       1 + anis2 x^2                                      

 The coefficients anis1, anis2 are assumed to be small, that means the non- 
 hyperbolicity is assumed to be small. Triplications cannot be handled.     

 Semblance is defined by the following quotient:			     

                 n-1                 					     
               [ sum q(t,j) ]^2      					     
                 j=0                 					     
       s(t) = ------------------     					     
                 n-1                 					     
               n sum [q(t,j)]^2      					     
                 j=0                 					     

 where n is the number of non-zero samples after muting.		     
 Smoothing (nsmooth) is applied separately to the numerator and denominator 
 before computing this semblance quotient.				     

 Then, the semblance is set to the power of the parameter pwr. With pwr > 1 
 the difference between semblance values is stretched in the upper half of  
 the range of semblance values [0,1], but compressed in the lower half of   
 it; thus, the few large semblance values are enhanced. With pwr < 1 the    
 many small values are enhanced, thus more discernible against background   
 noise. Of course, always at the expense of the respective other feature.   

 Input traces should be sorted by cdp - suvelan outputs a group of	     
 semblance traces every time cdp changes.  Therefore, the output will	     
 be useful only if cdp gathers are input.				     

 Credits:
	CWP, Colorado School of Mines:
           Dave Hale (everything except ...)
           Bjoern Rommel (... the quartic term)
      SINTEF, IKU Petroleumsforskning
           Bjoern Rommel (... the power-of-semblance function)

 Trace header fields accessed:  ns, dt, delrt, offset, cdp
 Trace header fields modified:  ns, dt, offset, cdp

CHANGES and their DATES

sub Step

collects switches and assembles bash instructions by adding the program name

sub note

collects switches and assembles bash instructions by adding the program name

sub clear

sub anis1

sub anis2

sub dtratio

sub dv

defines the size of the velocity steps 
to use in the semblance analysis

sub first_velocity

defines the first velocity value to use in the semblance analysis

sub fv

defines the first velocity value to use in the semblance analysis

sub nsmooth

sub number_of_velocities

sets the number of velocities

sub nv

sets the number of velocities

sub pwr

sub smute

sub velocity_incrementdv

defines the size of the velocity steps 
to use in the semblance analysis

sub verbose

sub get_max_index

max index = number of input variables -1