SUOP2 - do a binary operation on two data sets
suop2 data1 data2 op=diff >stdout
Required parameters:
none
Optional parameter:
op=diff difference of two panels of seismic data
=sum sum of two panels of seismic data
=prod product of two panels of seismic data
=quo quotient of two panels of seismic data
=ptdiff differences of a panel and single trace
=ptsum sum of a panel and single trace
=ptprod product of a panel and single trace
=ptquo quotient of a panel and single trace
Note1: Output = data1 "op" data2 with the header of data1
Note2: For convenience and backward compatibility, this
program may be called without an op code as:
For: panel "op" panel operations:
susum file1 file2 == suop2 file1 file2 op=sum
sudiff file1 file2 == suop2 file1 file2 op=diff
suprod file1 file2 == suop2 file1 file2 op=prod
suquo file1 file2 == suop2 file1 file2 op=quo
For: panel "op" trace operations:
suptsum file1 file2 == suop2 file1 file2 op=ptsum
suptdiff file1 file2 == suop2 file1 file2 op=ptdiff
suptprod file1 file2 == suop2 file1 file2 op=ptprod
suptquo file1 file2 == suop2 file1 file2 op=ptquo
Note3: If an explicit op code is used it must FOLLOW the
filenames.
Note4: With op=quo and op=ptquo, divide by 0 is trapped and 0 is returned.
Note5: Weighted operations can be specified by setting weighting
coefficients for the two datasets:
w1=1.0
w2=1.0
For operations on non-SU binary files use: farith
Credits:
SEP: Shuki Ronen
CWP: Jack K. Cohen
CWP: John Stockwell, 1995, added panel op trace options.
Notes:
If efficiency becomes important consider inverting main loop
and repeating operation code within the branches of the switch.