DOCUMENTATION

SYNOPSIS

PERL PROGRAM NAME:  SUCCWT - Complex continuous wavelet transform of seismic traces	
AUTHOR: Juan Lorenzo (Perl module only)
DATE:   
DESCRIPTION:
Version: 

USE

NOTES

Examples

SEISMIC UNIX NOTES

 SUCCWT - Complex continuous wavelet transform of seismic traces	

 succwt < tdata.su > tfdata.su	[optional parameters]			

 Required Parameters:							
 None									

 Optional Parameters:							
 noct=5	Number of octaves (int)					
 nv=10		Number of voices per octave (int)			
 fmax=Nyq	Highest frequency in transform				
 p=-0.5	Power of scale value normalizing CWT			
		=0 for amp-preserved spec. decomp.			
 c=1/(2*fmax)	Time-domain inverse gaussian damping parameter		
		(bigger c means more wavelet oscillations,		
		default gives minimal oscillations)			
 k=1		Use complex Morlet as wavelet transform kernel		
		=2 use Fourier kernel ... Exp[i 2 pi f t]		
 fs=1		Use dyadic freq sampling (CWT standard, 36honors		
		noct, nv)						
		=2 use linear freq sampling (Fourier standard)		
 df=1		Frequency sample interval in Hz (used only for fs=2)	
			NOTE: not yet implimented (hardwired to df=1) 	
 dt=(from tr.dt)	Sample interval override (in secs, if time data)
 verbose=0	 Run silent, except echo c value. (=1 for more info)	

 Examples:								
 This generates amplitude spec of the CWT impulse response (IR).	
  suspike ntr=1 ix1=1 nt=125 | succwt | suamp | suximage & 		
 Real part of Fourier IR with linear freq sampling:			
 suspike ntr=1 ix1=1 nt=125 | succwt k=2 fs=2 | suamp mode=real | suximage &
 Real part of Fourier IR with dyadic freq sampling: 			
 suspike ntr=1 ix1=1 nt=125 | succwt k=2 | suamp mode=real | suximage &

 Inverse CWT: (within a constant scale factor)				
	... | succwt p=-1 | suamp mode=real | sustack key=cdp > inv.su	

 Notes:								
 1. Total number of scales: nscale = noct*nv				
 2. Each input trace spawns nscale complex output traces		
 3. Lowest frequency in the transform is fmax/( 2^(noct-1/nv) )	
 4. Header field (cdp) used as cwt spectrum counter			
 5. Header field (cdpt) used as scale counter within cwt spectrum	
 6. Header field (gut) holds number of cwt scales `na'			
 7. Header field (unscale) holds CWT scale `a'				

 Header fields set: tracl, cdp, cdpt, unscale, gut			



 Copyright (c) University of Tulsa, 2003-4.
 All rights reserved.			
 Author:	UTulsa: Chris Liner, SEP: Bob Clapp

 todo:
	fix fs=2 case to allow df not equal to 1
 History:36
 6/18/04
	major overhaul by Clapp, including fourier implementation.
	Speedup ~ 41 times	(4100 %)
 2/20/04
	made p=-0.5 default
 2/16/04
	added p option to experiment with CWT normalization
 2/12/04
	replace fb (bandwidth parameter) with c (t-domain gaussian damping const.)
 2/10/04 --- in sync with EAS paper in prep
	changed morlet scaling (c = 1) to preserve time-domain peak amplitude
	changed morlet exp sign to std CWT definition (conjugate) and 
	mathematica result that only gives positive freq gaussian with neg exp
 1/26/04
	added linear frequency sampling option36
 1/23/04
	figured out fb and made it a getpar
	key: Look at real ccwt output and determine fb by number of 
		oscillations desired:	Default gives -+-+-+-
 1/20/04
	beefed up verbose output 
	dimension wavelet to length 2*nt and change correlation call
	... this is done to avoid conv edge effects
 1/19/04
	added fourier wavlet option for comparison with Fourier Transform action
 1/17/04
	complex morlet amp scaling now set to preserve first scale amp with IR 
 1/16/04
	added dt getpar to handle depth input properly
	preserves first tracl so tracl is ok after spice
 11/11/03
	initial version

 Trace header fields set: tracl, cdp, cdpt, unscale, gut

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 c

sub df

sub dt

sub fmax

sub fs

sub k

sub noct

sub nscale

sub ntr

sub nv

sub p

sub verbose

sub get_max_index

max index = number of input variables -1