SUSTATIC - Elevation static corrections, apply corrections from headers or from a source and receiver statics file

     sustatic <stdin >stdout  [optional parameters]             

 Required parameters:                                      
      none                                           
 Optional Parameters:                                      
      v0=v1 or user-defined   or from header, weathering velocity
      v1=user-defined         or from header, subweathering velocity   
      hdrs=0                  =1 to read statics from headers          
                        =2 to read statics from files      
      sign=1                  =-1 to subtract statics from traces(up shift)
 Options when hdrs=2:                                      
      sou_file=         input file for source statics (ms)
      rec_file=         input file for receiver statics (ms)     
      ns=240                  number of souces             
      nr=335                  number of receivers                
      no=96                   number of offsets            

 Notes:                                              
 For hdrs=1, statics calculation is not performed, statics correction 
 is applied to the data by reading statics (in ms) from the header.    

 For hdrs=0, field statics are calculated, and                   
      input field sut is assumed measured in ms.                 
      output field sstat = 10^scalel*(sdel - selev + sdepth)/swevel    
      output field gstat = sstat - sut/1000.                     
      output field tstat = sstat + gstat + 10^scalel*(selev - gelev)/wevel

 For hdrs=2, statics are surface consistently obtained from the  
 statics files. The geometry should be regular.            
 The source- and receiver-statics files should be unformated C binary  
 floats and contain the statics (in ms) as a function of surface location.


 Credits:
      CWP: Jamie Burns

      CWP: Modified by Mohammed Alfaraj, 11/10/1992, for reading
           statics from headers and including sign (+-) option

      CWP: Modified by Timo Tjan, 29 June 1995, to include input of
           source and receiver statics from files.

 Trace header fields accessed:  ns, dt, delrt, gelev, selev,
      sdepth, gdel, sdel, swevel, sut, scalel
 Trace header fields modified:  sstat, gstat, tstat