DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME: SUXMAX - X-windows graph of the MAX, min, or absolute max value on AUTHOR: Juan Lorenzo (Perl module only) DATE: DESCRIPTION: Version:

USE

NOTES

Examples

SEISMIC UNIX NOTES

 SUXMAX - X-windows graph of the MAX, min, or absolute max value on	
	each trace of a SEGY (SU) data set				

   suxmax <stdin [optional parameters]					

 Optional parameters: 							
 mode=max		max value					
 			=min min value					
 			=abs absolute max value				

 n2=tr.ntr or number of traces in the data set (ntr is an alias for n2)

 d1=tr.d1 or tr.dt/10^6	sampling interval in the fast dimension	
   =.004 for seismic 		(if not set)				
   =1.0 for nonseismic		(if not set)				

 d2=tr.d2			sampling interval in the slow dimension	
   =1.0 			(if not set)				

 f1=tr.f1 or tr.delrt/10^3 or 0.0  first sample in the fast dimension	

 f2=tr.f2 or tr.tracr or tr.tracl  first sample in the slow dimension	
   =1.0 for seismic		    (if not set)			
   =d2 for nonseismic		    (if not set)			

 verbose=0              =1 to print some useful information		

 tmpdir=	 	if non-empty, use the value as a directory path	
		 	prefix for storing temporary files; else if the	
	         	the CWP_TMPDIR environment variable is set use	
	         	its value for the path; else use tmpfile()	

 Note that for seismic time domain data, the "fast dimension" is	
 time and the "slow dimension" is usually trace number or range.	
 Also note that "foreign" data tapes may have something unexpected	
 in the d2,f2 fields, use segyclean to clear these if you can afford	
 the processing time or use d2= f2= to over-ride the header values if	
 not.									

 See the sumax selfdoc for additional parameter.			
 See the xgraph selfdoc for the remaining parameters.			


 Credits:

	CWP: John Stockwell, based on Jack Cohen's SU JACKet 

 Notes:
	When the number of traces isn't known, we need to count
	the traces for xgraph.  You can make this value "known"
	either by getparring n2 or by having the ntr field set
	in the trace header.  A getparred value takes precedence
	over the value in the trace header.

	When we do have to count the traces, we use the "tmpfile"
	routine because on many machines it is implemented
	as a memory area instead of a disk file.
	
	 SUMAX - get trace by trace local/global maxima, minima, or absolute maximum

 sumax <stdin >stdout [optional parameters] 			

 Required parameters:						
	none								

 Optional parameters: 						
	output=ascii 		write ascii data to outpar		
				=binary for binary floats to stdout	
				=segy for SEGY traces to stdout		

	mode=maxmin		output both minima and maxima		
				=max maxima only			
				=min minima only			
				=abs absolute maxima only      		
				=rms RMS 		      		
				=thd search first max above threshold	

	threshamp=0		threshold amplitude value		
	threshtime=0		tmin to start search for threshold 	

	verbose=0 		writes global quantities to outpar	
				=1 trace number, values, sample location
				=2 key1 & key2 instead of trace number  
	key1=fldr		key for verbose=2                       
	key2=ep			key for verbose=2                       

	outpar=/dev/tty		output parameter file; contains output	
					from verbose			

 Examples: 								
 For global max and min values:  sumax < segy_data			
 For local and global max and min values:  sumax < segy_data verbose=1	
 To plot values specified by mode:					
    sumax < segy_data output=binary mode=modeval | xgraph n=npairs	
 To plot seismic data with the only values nonzero being those specified
 by mode=modeval:							
    sumax < segy_data output=segy mode=modeval | suxwigb		

 Note:	while traces are counted from 1, sample values are counted from 0.
	Also, if multiple min, max, or abs max values exist on a trace,	
       only the first one is captured.					

 See also: suxmax, supsmax						

 Credits:
	CWP : John Stockwell (total rewrite)
	Geocon : Garry Perratt (all ASCII output changed from 0.000000e+00 to 0.000000e+00)
	                       (added mode=rms).
      ESCI: Reginald Beardsley (added header key option)
	based on an original program by:
	SEP: Shuki Ronen
	CWP: Jack K. Cohen
      IFM-GEOMAR: Gerald Klein (added threshold option) 

 Trace header fields accessed: ns dt & user specified keys

Additional User's notes:

Shares many of the properties of xgraph e.g., style. Use may try to add other options from xgraph. At present I include "style": style=seismic $ normal (axis 1 horizontal, axis 2 vertical) or seismic (axis 1 vertical, axis 2 horizontal)

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 d1

sub d2

sub f1

sub f2

sub height

sub mode

sub n2

sub orientation

subs style orientation

 whether the time axis is vertical (seismic stlye)
 or the time axis is horizontal (normal style)

sub style

subs style orientation

 whether the time axis is vertical (seismic stlye)
 or the time axis is horizontal (normal style)

sub tmpdir

sub verbose

sub width

sub get_max_index

max index = number of input variables -1