NAME
genfu - apply input filter or its inverse to seismic data
SYNOPSIS
genfu [ -Nntap ] [ -Ootap ] [ -Ffname ] [ -APfname ] [ -nsns
] [ -nene ] [ -rsirs ] [ -reire ] [ -mdmode ] [ -lglagc ] [
-imimut ] [ -ipiper ] [ -isiws ] [ -ieiwe ] [ -ififflg ] [
-weweit ] [ -dfdelf1 ] [ -f1f1 ] [ -syisym ] [ -phiph ] [
-nfnpt ] [ -thcinv ] [ -W ] [ -PO ] [ -MD ] [ -S ] [ -I ] [
-pwprew ] [ -V ] [ -G ] [ -? ]
DESCRIPTION
genfu - there are three modes available - 0,1 and 2. ALL
OPTIONS HAVE NOT BEEN TESTED. REPORT PROBLEMS TO ZPRG03 OR
ZMCK01 AT TRCVM.
Mode 0: The filter impulse response is input from specified
ASCII file. genfu computes the transfer function of the
input filter operator and convolves the response with the
input data. This mode allows the filter or its inverse to
be applied to the input seismic data. This mode also allows
a phase only application and also a minimum delay applica-
tion.
Mode 1, 2: The filter amplitude and phase spectra are input
at a constant frequency interval in these modes. genfu
designs a filter operator in Mode 1 and an inverse operator
in Mode 2. The given amplitude and phase spectra are
linearly interpolated to spectra of length 256 at frequency
spacing equal to
Nyquist Frequency of Input Data
-------------------------------
256
The amplitude and phase values outside the input spectrum
are considered zeros. To get a correct interpolated phase
spectrum, the input phase values must be continuous. In
cases where they show discontinuity, they must be unwrapped.
For example, an input phase array of 340 and 10 can be input
as 340 and 370.
A Fast Fourier Transform (FFT) is used to convert the ampli-
tude and phase spectra into an impulse response. In Mode 1,
the filter response calculation is straightforward. In Mode
2, genfu replaces those amplitude values that are less than
a specified threshold value with the threshold value. This
prevents extremely large amplitude values from being com-
puted when taking the inverse of the input amplitude spec-
trum. Next, the calculation of phase spectrum is done by
mapping the interpolated phase values into + or - 180-degree
range and negating. Phase spectrum is negated here since
the objective of a dephasing filter is to remove a known
phase distortion from the data. By convolving such a filter
with the input data, the purpose is being served as in fre-
quency domain convolution operation, the phase components
are added (see Pereira, 1971 for more details). Finally,
the filter response is computed by applying an inverse FFT
on the frequency spectra. The application of this filter to
input data may result in a time shift. This can be avoided
by specifying a desired lag (see Woodcock, 1979 for more
details) to use the convolution process.
(The above description is verbatim from description of Modes
0,1 and 2 of SIS GENF in the SIS Reference Manual. There
are illustrations pertaining to Mode 2 in that reference
that may be helpful.)
genfu gets both its data and its parameters from command
line arguments. These arguments specify the input and out-
put files, mode, optional parameters and verbose printout,
if desired.
Command line arguments
-N ntap
Enter the input data set name or file immediately after
typing -N unless the input is from a pipe in which case
the -N entry must be omitted. This input file should
include the complete path name if the file resides in a
different directory. Example -N/b/vsp/dummy tells the
program to look for file 'dummy' in directory '/b/vsp'.
Note: Input may be format 1 or 3. If format 1, output
will be format 3.
-O otap
Enter the output data set name or file immediately
after typing -O. This output file is not required when
piping the output to another process. The output data
set also requires the full path name (see above).
-F fname
Enter the input data set name or file immediately after
typing -F. This ASCII files contains either the
impulse response (Mode 0) or the amplitude spectrum
(Modes 1 or 2). For Mode 0 there may be one or more
values per line. If there are more than one value per
line, there must be at least one space (blank) between
each value. A maximum of 500 filter points is allowed.
(A zero value must be either 0 or 0.0, not 00 or 000.)
For Mode 1 and 2 the input is the same as in SIS GENF,
that is, the old 2GENF and 3GENF type card images (at
least one of each) must exist in the file. A maximum
of 22 "cards" allowed for each type (256 values - the
22nd card, four values.)
For the amplitude values, 2GENF must be in cc 1-5.
Values reside sequentially in five column fields (e.g.
6-10, 11-15, 16-20, ...,61-65). Decimal values may be
entered. A maximum of 256 values are allowed and they
must be in at a constant frequency interval. The last
card used need not be completely filled. All of the
other cards must be completely filled. On all cards
entries after cc 66 are ignored.
Phase values are to be in degrees, reside in the 3GENF
cards and be in the same format as the 2GENF amplitude
values. The same limits apply.
-AP fname
For mode 1 0r 2: enter the input data set name or file
immediately after typing -AP. This is an alternate
format to the -F[] format below for modes 1 or 2.
Amplitude and phase pairs are entered, one per line up
to 256 lines. Pairs are separated by blanks.
-ns ns
Enter the start processing trace number. The default
is the first trace of the record. Traces before this
value will be passed unfiltered.
-ne ne
Enter the end processing trace number. The default is
the last trace of the record. Traces after this value
will be passed unfiltered.
-rs irs
Enter start processing record number. Default value is
the first record. Records before this value will be
passed unfiltered.
-re ire
Enter end processing record number. Default value is
last record. Records after this value will be passed
unfiltered.
-md mode
genfu mode - 0, 1 or 2: 0 = apply impulse response, or
its inverse, or phase only, or minimum delay; 1 =
design and apply filter given its amplitude & phase; 2
= design and apply inverse given amplitude & phase of
mode 1
-im imut
Restore early mute flag - 0 or 1. 0, the default, means
yes.
-lg lagc
Positive or negative lag (or filter delay), in ms, to
use with filter operator application. (default = 0)
-ip iper
Scaling percent of 2047. (default = 15)
-is iws
The window start time for scaling. (default = 0)
-ie iwe
The window end time (ms). The default is 0 which means
that no scaling will be performed.
-if ifflg
Integrate/differentiate flag
0 = no (normal and default)
1 = integrate output
2 = differentiate output
-we weit
Ross-weighting exponent. (default = 0.0)
-f1 f1
(This parameter only used by Mode 1 or 2.) Starting
frequency for the first amplitude and phase values.
(default = 0.0)
-df delf1
(This parameter only used by Mode 1 or 2.) Frequency
interval for amplitude and phase input values. (No
default)
-sy isym
(This parameter only used by Mode 1 or 2.) Filter non-
symmetrical. 0 = No (default), 1 = Yes.
-nf npt
(This parameter only used by Mode 1 or 2.) Desired
number points in filter.(default=500/isi, isi = sample
rate (ms))
-th cinv
(This parameter only used by Mode 2.) Threshold percent
for filter inversion. (default = 5.0)
-W Enter the command line argument '-W' to apply a cosine
bell taper to the wavelet. The bell will be centered
on the point of maximum envelope. If this point lies
less than 10% of the total wavelet length from either
end no window will be applied. If applied the center
10% of the total wavelet length will be undisturbed.
-PO Enter the command line argument '-PO' to apply only the
phase of the wavelet (or its inverse). This is the
recommended option for inverse calculations rather than
trying to whiten the output spectra by dividing out the
wavelet spectrum. It might be better to do the whiten-
ing after phase-only inversion.
-MD Enter the command line argument '-MD' to apply the
minimum delay version of the wavelet.
-S Enter the command line argument '-S' to use the double
least squares method of computing the minimum delay
wavelet done in the time domain using shaping filters.
Otherwise the hilbert method will be used: the minimum
phase spectrum is the hilbert transform of the ampli-
tude spectrum.
-I Enter the command line argument '-I' to apply inverse
of impulse response (mode=0)
-pw prew
Mode 0 inverse: % prewhitening. Default = 5. Essen-
tially portions of the amplitude spectrum with values
less than the maximum amplitude times this fraction do
not participate in the inverse.
-G Enter the command line argument '-G' to get printer
graphs.
The graphs are written to three separate files. The
filenames is GENFU.nnnnn.a. (It is the same name as
the printer filename, but with ".a" appended - where
"nnnnn" is the parent process id and "a" is defined
below. Since the width of the graphs is > 80 charac-
ters, the files may be printed on the local laser
printer with the following unix command and parameters:
enscript -r -fCourier-Bold8 GENFU.nnnnn.g
The graphs are:
1. Impulse response of filter - GENFU.nnnnn.I
2. Amplitude spectra of filter - GENFU.nnnnn.A
3. Phase spectra of filter - GENFU.nnnnn.P
-V Enter the command line argument '-V' to get additional
printout.
-? Enter the command line argument '- to get online
help. The program terminates after the help screen is
printed.
BUGS
All options have not been tested. Problems found when using
mode 0 and 1 have been corrected. Those particular problems
occurred using the defaults for lagc, imut, iper, iws, iwe,
weit, and iph. Mode 2 has not been tested. See note at
beginning of man page.
COPYRIGHT
copyright 2001, Amoco Production Company
All Rights Reserved
an affiliate of BP America Inc.
Man(1) output converted with
man2html