DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME:  SUADDHEAD - put headers on bare traces and set the tracl and ns fields
AUTHOR: Juan Lorenzo (Perl module only)
DATE: June 7 2013 
REQUIRES:  Seismic Unix modules (CSM)
DESCRIPTION suaddhead 
Version 0.0.1

USE

NOTES

Examples

SEISMIC UNIX NOTES

 SUADDHEAD - put headers on bare traces and set the tracl and ns fields

 suaddhead <stdin >stdout ns= ftn=0					

 Required parameter:							
 	ns=the number of samples per trace				

 Optional parameter:							
ifdef SU_LINE_HEADER
	head=           file to read headers in				
                       not supplied --  will generate headers 		
                       given        --  will read in headers and attach
                                        floating point arrays to form 	
                                        traces 			", 
                       (head can be created via sustrip program)	
endif
 	ftn=0		Fortran flag					
 			0 = data written unformatted from C		
 			1 = data written unformatted from Fortran	
       tsort=3         trace sorting code:				
                                1 = as recorded (no sorting)		
                                2 = CDP ensemble			
                                3 = single fold continuous profile	
                                4 = horizontally stacked		", 
       ntrpr=1         number of data traces per record		
                       if tsort=2, this is the number of traces per cdp", 

 Trace header fields set: ns, tracl					
 Use sushw/suchw to set other needed fields.				

 Caution: An incorrect ns field will munge subsequent processing.	
 Note:    n1 and nt are acceptable aliases for ns.			

 Example:								
 suaddhead ns=1024 <bare_traces | sushw key=dt a=4000 >segy_traces	

 This command line adds headers with ns=1024 samples.  The second part	
 of the pipe sets the trace header field dt to 4 ms.	See also the	
 selfdocs of related programs  sustrip and supaste.			
 See:   sudoc supaste							
 Related Programs:  supaste, sustrip 					
=head2 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 ftn

sub head

sub number_samples

sub ns

sub ntrpr

sub tsort

sub get_max_index

max index = number of input variables -1