NAME

     flatten  - put iso-time  pick  times  from  xsd  into  trace
     headers


SYNOPSIS

     flatten [ -Nntap ] [ -Ootap ] [ -Ppicks ] [ -siisi ]  [  -Rw
     or  -rwrecwrd ] [ -Tw or -tw trcwrd ] [ -Hw or -hwhdrwrd ] [
     -ttflat ] [ -sfscl ] [ -rec ] [ -trace ] [ -stat ] [ -I ]  [
     -A ] [ -V ] [ -? ]


DESCRIPTION

     flatten reads event picks from an xsd pick file  and  either
     (A) computes the required trace-by-trace statics to iso-time
     the event (using either an absolute datum time or a floating
     datum  determined  by  the minimum and maximum times in each
     pick segment), or (B) takes the pick times  themselves,  and
     writes  them as statics into the trace headers.  These stat-
     ics can be applied by sending the output to rest.

     There are three options:  (1) any designated segment (it can
     cross  record boundaries) can be read from the pick file and
     applied to the entire input data, (2) a  pick  segment  that
     corresponds  to  a  record  boundary can be applied to every
     record in the data set or just a  single  record,  (3)  each
     segment  of  the  pick file will be associated with an input
     control record and applied with intermediate  records  being
     interpolated  both  in  trace start/end and in pick time. In
     any event picks should be made on data in  which  RecNum  in
     the  headers represents the sequential record number. If the
     data has some other RecNum then run the input  data  through
     editt ... -U to renumber the RecNum's.

     Data lying outside the boundaries of pick segments  will  be
     passed  without  any value being written into their headers.
     Users should make their picks on the data  to  be  input  to
     flatten  so  that  the  trace  RecNum & TrcNum header values
     correspond directly to the record and trace numbers  in  the
     pick  file  segments.  Failure  to do this could result in a
     completely  messed  up  data/pick  file  association.  Users
     should  be  very wary of picking on editted portions of data
     then applying these picks to the full data set.

     Pick segments themselves need not be in order but the  picks
     in  each  segment  must  be  in ascending trace order (small
     TrcNum velues to larger TrcNum values).

     flatten deals with picks within records as  well  as  across
     records.   recshift  is  a  similar  program that deals with
     records as single objects, i.e. one  time  pick  per  record
     applying to every trace within the record.


     flatten gets processing  controls  from  the  command  line.
     These  include  the input and output data sets, the xsd pick
     file name, the trace header word where the  computed  static
     is to go, and the verbose flag.

     The -rec option is used to indicat that the input is 1-Trace
     Records  and  the -trace option is used to indicate 1-Record
     Traces.

     Note: currently the xsd pick file numbers records and traces
     sequentially  (does  not get them from the headers).  There-
     fore one should use editt with a -U  flag  to  renumber  the
     data sequentially.

  Command line arguments
     -N ntap
          Enter the full path (if not in current  working  direc-
          tory)  of  the  file  containing  the data set.  If not
          specified, input is expected to be standard input.   If
          standard  input is not specified and there is no input,
          e.g., program run in background, expect a  termination.
          (default standard input )

     -O otap
          Enter the full path (if not in current  working  direc-
          tory)  of the output file.  If not specified, output is
          expected to be standard output.  (default standard out-
          put )

     -P picks
          Enter the full path (if not in current  working  direc-
          tory)  of  the  file containing event picks.  Generally
          picks were made using xsd with the  auto  pick  option.
          The  picks will be written to a named file on the local
          workstation.  This file must be ftp'd to the your work-
          ing  directory  on the Cray.  If a number of pick files
          are needed or a pick file is  being  reused  (first  by
          removing  it on the local directory, then hitting clear
          picks on the xsd panel) it might be expedient to have a
          separate shelltool open just for ftp.

     -si isi
          Sample interval override (ms)  (default = use value  in
          xsd pick file)

     -Rw or -rw recwrd
          Header word mnemonic to  use  from  input  data.   This
          should correspond to what appears in the xsd pick file.
          Default = RecNum

     -Tw or -tw trcwrd
          Header word mnemonic to  use  from  input  data.   This
          should correspond to what appears in the xsd pick file.
          Default = TrcNum

     -Hw or -hw hdrwrd
          Trace header word mnemonic in  which  static  is  found
          (default = StaCor )

          NOTE: If the mnemonic refers to a float or  fake  float
          word,  the  static  is read as a floating point number.
          If the mnemonic refers to a short or long integer word,
          the static is read as an integer number.

     -t tflat
          Enter the time to flatten in ms.  If no time  is  given
          the  average  of the minimum and maximum pick times for
          each event will be chosen as the flattening or iso time
          (i.e. a floating time datum).

     -sf scl
          Enter the scale factor  to  apply  to  the  pick  times
          before they go into the headers.  default = 1.0

     -rec If included on command line  flatten  will  assume  the
          input is 1-Trace Records (a stacked data set).

     -trace
          If included on command line  flatten  will  assume  the
          input is 1-Record Traces (a stacked data set).

     -stat
          If included on command line flatten will read  the  xsd
          pick  file  and  stuff the picks into the chosen header
          word without removing tflat  or  removing  the  maximum
          pick  value from the current value, i.e. puts the abso-
          lute pick value into header.

     -I   Must be included on command line if one segment  is  to
          be  used  for a certain record or contiguous records or
          contiguous parts of records (if  the  picks  span  more
          than a single record).

     -A   Must be included on command line if one segment  is  to
          be used for every record in the data set.

     -V   Verbose mode. List command line  and  lineheader  input
          parameters.

     -?   Query mode.   With  this  flag,  flatten  will  give  a
          description  of the command line arguments and stop the
          program.



BUGS

     Always pick on the full data set to be input to the  program
     never  a  subset,  i.e.  a subset derived from an editt run.
     There is no provision in the code to try to adjust the  pick
     file  to  start from a record other than the first record on
     the input data.


SEE ALSO

     rest, recshift


AUTHOR

     P. R. Gutowski, Amoco TRC, Modified by James M. Gridley, USP
     Team,  Amoco (March 1996) Rewritten by James M. Gridley with
     Gridding algorithm from  P.  R.  Gutowski,  USP  Team  (May,
     1996).


COPYRIGHT

     copyright 2001, Amoco Production Company
               All Rights Reserved
          an affiliate of BP America Inc.

































Man(1) output converted with man2html