Go to the list of seismic processes.      Go to SIOSEIS introduction.
                            PROCESS TX2FK

Parameters, alphabetically:
coords    etime     lprint    nprestk   nxpad    
stime     twinlen   weight    xwinlen

Document Date: 5 July 2007
                                        version 2.1    a.j. harding
    November 2006 - Change TWINLEN from time to number of samples.
                  - Change TWINLEN preset to 25 samples.
    July 2007 - Only sort traces by range when nprestk > 2
              - Abort if < 2 traces in tx.
              - Allow up to 32K samples per time trace.

PROCESS TX2FK transforms data from the TX (time-space) domain into the 
F-K (frequency-wavenumber) domain by performing a 2-D FFT.  The input
is a set of normal (t-x) seismic traces and the output is a transformed
set of F-K traces. The transformed output traces are in rectangular
form unless polar form (amplitude and phase) is requested.

The frequencies within each output trace are ordered from -Nyq to 0 to 
Nyq.  Each output trace contains a power of 2 number of samples. The 
traces are ordered in wavenumber from 0 to K (Nyquist). Data in polar 
form are ordered with the modulus followed by the argument.

The sample interval is in hundreds of microhertz in order to prevent 
truncation problems.  e.g. an SEG-Y trace header interval value of 610
is really 610/10,000. or .0610.  See doc/fk.forum for further discussion.

The input traces must be sorted by increasing range (SEG-Y header 
word 10) and must be separated uniformly.  DELTA X must be positive
and must be constant.  The only exception is when "super-gathers"
are to be used (see parameter nprestk).

Any SIOSEIS process may follow TX2FK, but care should be taken that it 
makes sense!  The imaginary part of data in rectangular coordinates may
be omitted from plot by decimating by a factor of 2.

The steps used in the F-K transformation are:
1.)  Each trace is windowed temporally in order to minimize edge effects
     along the time trace.
2.)  The data are transposed so that all the data of constant times are
     adjacent. This sorts the data by x rather than t (or f).
3.)  The 'range' traces are zero padded. Effectively adding dummy traces
     to the end of the dataset. The data must be padded to a power of 2,
     but additional padding may be desirable for migration etc. A user
     minimum number of dead traces is specified by nxpad. The data are 
     also windowed in x if desired.
4.)  The complex FFT is performed, transforming x to k, or from space to
5.)  The data are transposed back to ordering by time.
6.)  The forward FFT is performed, converting time to frequency.  The
     maximum number of samples in time is 8192 real samples.
7.)  The data are converted to polar coordinates if requested.  Data in
     the fk domain may be processed by any other seismic process in 

The run time of TX2FK is governed by the number of traces, including pads,
and the trace length, including pads.  Both dimensions are a power of 2,
so transforming 1500 points takes as long as 2000 points (2048 being the
closest larger power of 2).

The frequency-wavenumber domain is discussed in a paper "A Review of the
Two-Dimensional Transform and Its Use in Seismic Processing" by 
D.W. March and A.D.Bailey in the "First Break", January 1983.

Each parameter list must be terminated with the word END.  The entire set
of TX2FK parameters must be terminated by the word END.

--- --------- ----------

STIME   - The start time of the data for the entire data set.  Any trace
          that has an initial time (delay) greater than STIME will be zero
          padded so that the data starts at STIME .  Any trace that has a
          delay less than stime will be shortened.
          Preset = the delay of the first trace.

ETIME   - The end time of the data for the entire data set. Data in excess
          of ETIME will be omitted from the transformation.
          Preset = the last time of the first trace.

NXPAD   - The number of dummy traces to insert at both ends of the seismic
          line.  PROCESS FKMIGR needs dummy traces in order to prevent 
          "wrap around".
          Preset = 10

TWINDOW - The type of window to apply before computing the temporal fft.
        = HAMM, Hamming
        = HANN, Hanning
        = GAUS, Gaussian
        = BART, Bartlett (triangular)
        = RECT, rectangular (box car - no window)
        = BLAC, Blackman
        = EBLA, exact  Blackman
        = BLHA, Blackman-Harris
         Preset=HANN  e.g. window rect

TWINLEN - The window length, in samples.  A window length of zero causes
          the entire time domain trace to be windowed.  A non zero length
          indicates that winlen data will be modified at both ends of 
          each trace.
          Preset = 25  e.g. winlen 50

XWINDOW - Same as twindow but it windows the data by range.
          Preset = RECT ( No windowing of ranges )

XWINLEN - The window length in number of traces. A window length of zero
          causes the entire set of ranges to be windowed. A non-zero 
          length causes that number of traces to be tapered at the
          binning and end.
          Preset = 10

COORDS - The coordinates of the output trace.
       = RECT, Rectangular coordinates.  The output trace will be complex.
         The trace values will consist of real and imaginary pairs.  The
         frequency dimension runs from 0 to Nyquist (pi) then the
         negative frequencies back to 0, as output from the FFT.  The 
         number of samples in the output frequency trace is a power of
         two.  The k dimension is also ordered as it comes directly out
         of the FFT, 0 to Nyquist followed by the most negative k.
       = POLAR, Polar coordinates.  The first half of the output trace
         will be the amplitude spectrum and the second half of the trace
         will be the phase spectrum, each ordered 0 to Nyquist back to 0.
         The k dimension is reordered so that the first trace is the
         negative Nyquist, then increasing to 0, then increasing to the
         positive Nyquist.  The total number of traces output is a power
         of two plus 1.
       = POLARU, "user friendly" polar coordinates. This produces output
         data as a series of wavenumber traces running from -Nyq -> +Nyq
         and only positive frequencies in polar form (magnitude followed
         by phase).  This format is useful if it is desired to look at
         the FK data using for example a contouring program.  The data are
         not used internally in this form but is converted on input/output
         from SIOSEIS.
         Preset = RECT   e.g.  coords POLAR

OHDRPATH - If processes TX2FK and FK2TX are called in the same job then
         the original TX headers will be used as the trace headers of the
         the processed TX data. This will preserve all RP/Shot numbering
         as well as GMT information. However, if these two processes are
         done in separate jobs then the user may specify a permanent disk
         file to hold the original TX headers. This filename can then be
         given to FK2TX when the inverse transform is done.

PATH1 & PATH2 -  Before TX2FK transforms the input traces it accumulates
         them them in a scratch datafile.  The size of this file is the
         number of input traces prior to padding in range * the sample
         length of each trace (etime - stime) prior to padding in time.
         The size of the data after transformation is equal to the number
         of traces * trace length after padding of each to the nearest
         power of 2. This is stored in a second scratch dataset after 
         which the first scratch file is deleted. If there is a FK2TX in
         the procs list then it will use this second scratch file as its
         first scratch file.  The default location of these files is 
         implementation dependent and may be of insufficient size. The 
         PATH parameters allow the user to specify the location of the
         two scratch files.

PATH1  - The location of the first scratch file.

PATH2  - The location of the 2nd scratch file. Since this is the same as
         the first scratch file used by FK2TX (if present) it should be
         given only here or in FK2TX. If contradictory definitions are
         given the first on processed will be used.

NPRESTK - The number of rps to use in each fk transformation.  Each rp is
         terminated with a -1 in SEG-Y trace header word 51.  Processes
         SORT and GATHER set this "end-of-sort" flag.  Shot data may set
         this flag with process INPUT or DISKIN parameter NTRGAT.  The data
         are sorted by increasing range prior to transforming x to k. 
         Process fk2tx will automatically "unsort" the data into the 
         original order when nprestk is greather than 1.

END    - Terminates each parameter list.

Copyright (C) the Regents of the University of California
All Rights Reserved
Go to the list of seismic processes.      Go to SIOSEIS introduction.