DOCUMENTATION
SYNOPSIS
PROGRAM NAME: sustack
AUTHOR: Juan Lorenzo (Perl module only)
DATE: July 31, 2013
DESCRIPTION horizontal summation across
a file based on a header word
Version 0.0.1
USE
SUNIX NOTES
SUSTACK - stack adjacent traces having the same key header word
sustack <stdin >stdout [Optional parameters]
Required parameters:
none
Optional parameters:
key=cdp header key word to stack on
normpow=1.0 each sample is divided by the
normpow'th number of non-zero values
stacked (normpow=0 selects no division)
repeat=0 =1 repeats the stack trace nrepeat times
nrepeat=10 repeats stack trace nrepeat times in
output file
verbose=0 verbose = 1 echos information
Notes:
------
The offset field is set to zero on the output traces, unless
the user is stacking with key=offset. In that case, the value
of the offset field is left unchanged.
Sushw can be used afterwards if this is not acceptable.
For VSP users:
The stack trace appears ten times in the output file when
setting repeat=1 and nrepeat=10. Corridor stacking can be
achieved by properly muting the upgoing data with SUMUTE
before stacking.
Credits:
SEP: Einar Kjartansson
CWP: Jack K. Cohen, Dave Hale
CENPET: Werner M. Heigl - added repeat trace functionality
Note:
The "valxxx" subroutines are in su/lib/valpkge.c. In particular,
"valcmp" shares the annoying attribute of "strcmp" that
if (valcmp(type, val, valnew) {
...
}
will be performed when val and valnew are different.
Trace header fields accessed: ns
Trace header fields modified: nhs, tracl, offset
Examples
Usage 1: To stack an array of trace
Example: $sustack ->clear(); $sustack->headerword('cdp'); $sustack[1] = $sustack->Step();
SEISMIC UNIX NOTES
SUSTACK - stack adjacent traces having the same key header word
sustack <stdin >stdout [Optional parameters]
Required parameters:
none
Optional parameters:
key=cdp header key word to stack on
normpow=1.0 each sample is divided by the
normpow'th number of non-zero values
stacked (normpow=0 selects no division)
repeat=0 =1 repeats the stack trace nrepeat times
nrepeat=10 repeats stack trace nrepeat times in
output file
verbose=0 verbose = 1 echos information
Notes:
------
The offset field is set to zero on the output traces, unless
the user is stacking with key=offset. In that case, the value
of the offset field is left unchanged.
Sushw can be used afterwards if this is not acceptable.
For VSP users:
The stack trace appears ten times in the output file when
setting repeat=1 and nrepeat=10. Corridor stacking can be
achieved by properly muting the upgoing data with SUMUTE
before stacking.
Credits:
SEP: Einar Kjartansson
CWP: Jack K. Cohen, Dave Hale
CENPET: Werner M. Heigl - added repeat trace functionality
Note:
The "valxxx" subroutines are in su/lib/valpkge.c. In particular,
"valcmp" shares the annoying attribute of "strcmp" that
if (valcmp(type, val, valnew) {
...
}
will be performed when val and valnew are different.
Trace header fields accessed: ns
Trace header fields modified: nhs, tracl, offset
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 headerword
key or headerword (legacy)
sub header_word
key or header_word
sub key
key or header_word
sub normpow
sub nrepeat
sub repeat
sub verbose
sub get_max_index
max index = number of input variables -1