SYNOPSIS

PERL PROGRAM NAME:

AUTHOR: Juan Lorenzo (Perl module only)

DATE:

DESCRIPTION:

Version:

USE

NOTES

Examples

SYNOPSIS

SEISMIC UNIX NOTES 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		

				=3 to read from output files of suresstat

	sign=1			apply static correction (add tstat values)

				=-1 apply negative of tstat values	

 Options when hdrs=2 and hdrs=3:					

	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 equals 10^scalel*(sdel - selev + sdepth)/swevel	

 	output field gstat equals sstat - sut/1000.				

 	output field tstat equals 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.



 For hdrs=3, statics are read from the output files of suresstat, with 

 the same options as hdrs=2 (but use no=max traces per shot and assume 

 that ns=max shot number and nr=max receiver number).			

 For each shot number (trace header fldr) and each receiver number     

 (trace header tracf) the program will look up the appropriate static  

 correction.  The geometry need not be regular as each trace is treated

 independently.							



 Caveat:  The static shifts are computed with the assumption that the  

 desired datum is sea level (elevation=0). You may need to shift the	

 selev and gelev header values via  suchw.				

 Example: subtracting min(selev,gelev)=25094431			



 suchw < CR290.su key1->selev,gelev key2 -> elev,gelev key3 -> selev,gelev \\ 

            a->-25094431,-25094431 b->1,1 c->0,0 > CR290datum.su		



 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. 



	modified by Thomas Pratt, USGS, Feb, 2000 to read statics from

 	     the output files of suresstat



 Trace header fields accessed:  ns, dt, delrt, gelev, selev,

	sdepth, gdel, sdel, swevel, sut, scalel, fldr, tracf

 Trace header fields modified:  sstat, gstat, tstat

User's notes (Juan Lorenzo) untested

CHANGES and their DATES

Import packages

instantiation of packages

Encapsulated hash of private variables

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 elevation

sub hdrs

sub no

sub nr

sub ns

sub rec_file

sub sign

sub sou_file

sub v0

sub v1

sub get_max_index

max index = number of input variables -1