NAME

     xyz2sis  - module to convert between Zycor  [x,y,z]  gridded
     data,     GeoQuest     Grid     Data     Card    data,    or
     flat2[tr,rec,samp,amplitude]  data  and  USP  format.   Also
     writes  various  types  of  flat  files from USP format with
     optional header mnemonic reporting for up to 4 trace  header
     variables.


SYNOPSIS

     xyz2sis [ -Nntap ] [ -Ootap ] [ -sist ] [ -eiend ] [ -nsnstr
     ]  [ -nenetr ] [ -rsnrst ] [ -renred ] [ -nullnull ] [ -amp-
     namp ] [ -G ] [ -R ] [ -Rswap ] [  -flat  ]  [  -flat1  ]  [
     -flat2 ] [ -hw1 ] [ -hw2 ] [ -hw3 ] [ -hw4 ] [ -V ] [ -? ]


DESCRIPTION

     xyz2sis converts between data in either Zycor [x,y,z]  Grid,
     QeoQuest  Grid  Data Card, or flat2 [tr,rec,samp,value] data
     and USP formats. Also converts from USP to several flat file
     formats  with  or  without  up to 4 user defined header word
     values. Null values in the Zycor, GeoQuest, or  flat2  files
     may be replaced by a hard zero or a user defined replacement
     value.

     Zycor [x,y,z] data assumptions:

     Data is assumed to lay on a rectangular grid sampled between
     Xmin  and  Xmax every dX and between Ymin and Ymax every dY.
     In the conversion whichever of  the  first  two  indices  is
     changing  fastest  becomes  samples,  the  other  coordinate
     becomes traces and the Z coordinate is the value of the time
     series   at  that  location.   Henceforth  the  samples  are
     increasing in X while the traces are increasing in Y.  The Y
     co-ordinate for a given trace is strored in the trace header
     entry SrPtYC.  Information regarding the  corner  points  as
     determined  from the input data is loaded to the line header
     for use on converting back to [x,y,z] format.  The following
     header mapping is done:

      Minimum X Co-ordinate    :   TmMsSl
      Maximum X Co-ordinate    :   TmSlIn
      Minimum Y Co-ordinate    :   TmMsFS
      Maximum Y Co-ordinate    :   NTrLnS
      X Bin Size               :   ILClIn
      Y Bin Size               :   CLClIn

     When executed with -R on the command line xyz2sis  uses  the
     above information to recreate the [x,y,z] dataset. When exe-
     cuted with  -Rswap  on the command  line  xyz2sis  uses  the
     above information to recreate the [y,x,z] dataset.

     GeoQuest Grid Data Card assumptions:

     That the data file follows the January 1994 format  descrip-
     tion  for  GeoQuest  Grid  Data  Card Format.  The following
     header mapping is done

      Minimum X Co-ordinate    :   TmMsSl
      Maximum X Co-ordinate    :   TmSlIn
      Minimum Y Co-ordinate    :   TmMsFS
      Maximum Y Co-ordinate    :   NTrLnS
      X Bin Size               :   ILClIn
      Y Bin Size               :   CLClIn
      zunits                   :   MnUHTm
      xyunits                  :   MxUHTm
      Xorigin                  :   NmSpMi
      Yorigin                  :   MutVel
      Azimuth                  :   AERcPr as an integer
      key                      :   Crew01
      TransposeFlag            :   EqpCod


     Flat2 Data assumptions:

     The data file consists of a header record, which defines the
     size  of the output USP dataset, followed by [tr, rec, samp,
     amplitude]  data  records.   Data  is  read  until  EOF   is
     detected.  An example of the header record follows:

             1 777 1 414 1 482 10
     which translates to the following:

             1    = dummy
             777  = number of traces/record in output USP dataset
             1    = dummy
             414  = number of records in output USP dataset
             1    = dummy
             482  = number of samples/trace in output USP dataset
             10   = sample interval of output USP dataset

     An example of a data record follows:

             147.000000 1.000000 170 131.000000
     which translates to the following:

             147.000000 = trace number
             1.000000   = record number
             170        = sample number
             131.000000 = amplitude value

     The sample number in the data record represents  the  sample
     counted  from  the end of the USP trace.  In the above exam-
     ple, input sample 170 assigns a value of 131.000000 to  sam-
     ple  number  313  for  record 1, trace 147 of the output USP
     dataset.  The unset amplitude values are filled  with  zero,
     or optionally whatever the user inputs with the -amp option.



     xyz2sis gets both its data and its parameters  from  command
     line  arguments.  These arguments specify the input and out-
     put datasets, the start and end times, traces  and  records,
     the reverse flag, the reverse swap flag, the GeoQuest format
     flag, the flat2 input format flag, the flat or flat1  output
     format  flags,  the  null  replacement  value,   up  to four
     optional header word mnemonics for use with the flat  output
     option and verbose printout, if desired.

  Command line arguments
     -N ntap
          Enter the input data set name or file immediately after
          typing  -N.    The  input may be a pipe only if it is a
          USP dataset being used with -R  on  the  command  line.
          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'.

     -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 [NOTE: it  is  NOT
          possible  to  pipe  out when converting from Zycor Grid
          format to USP].  The output data set also requires  the
          full path name (see above).

     -s ist
          Enter the start time [ms].  The default is  the  begin-
          ning of the trace.  This option is only meaningful when
          using USP input format and -R on the command line.

     -e iend
          Enter the end time [ms].  The default is the end of the
          trace.    This option is only meaningful when using USP
          input format and -R on the command line.

     -ns nstr
          Enter the start trace number.  The default is the first
          trace  of  the  record.  This option is only meaningful
          when using USP input format and -R on the command line.

     -ne netr
          Enter the end trace number. The  default  is  the  last
          trace  of  the  record.  This option is only meaningful
          when using USP input format and -R on the command line.


     -rs nrst
          Enter start record number.  Default value is the  first
          record.  This  option is only meaningful when using USP
          input format and -R on the command line.

     -re nred
          Enter end record number.  Default value is last record.
          This  option  is  only  meaningful when using USP input
          format and -R on the command line.

     -null null
          Enter the input amplitude to be considered  as  a  Null
          Value.   The  routine  will  transfer  a  user  defined
          replacement amplitude for any input amplitude equal  to
          this  value.   Default  is 0.99999e+3 if input is Zycor
          data and -1.0e30 if input is GeoQuest data.

     -amp namp
          Enter an amplitude to be inserted in the place  of  all
          Null  Values  defined  by -null above. The default is a
          hard zero.
          For the -flat2 option, enter the amplitude to  be  used
          to  fill the output trace, before inserting the samples
          specified in the flat2 file.  The default is zero.

     -G   Enter the command line argument '-G' to  indicate  that
          the  conversion  should  be  between GeoQuest Grid Data
          Card and USP formats.  If not specified the  conversion
          will  be  assumed to be between Zycor Grid Data and USP
          formats, unless the -flat2 option is  specified,  which
          defines      the      conversion     to     be     from
          [tr,rec,samp,amplitude] file data to USP format.

     -R   Enter the command line argument '-R'  to  convert  from
          USP format to one of the output [x,y,z] formats.

     -Rswap
          Enter the command line argument '-R'  to  convert  from
          USP format to [y,x,z] format.  This option is valid for
          Zycor Grid Data output format only.  It is used if  the
          x and y indices have been flipped during processing.

     -flat
          Enter the command line argument '-flat' to convert from
          USP  format  to  a  flat file format of sample * sample
          interval and amplitudes.  This option can be used  with
          up  to  4  user  defined trace header words to create a
          flat  file  of  values   (hw1,hw2,hw3,hw4,sample*sample
          interval, amplitudes).

     -flat1
          Enter the command line  argument  '-flat1'  to  convert
          from  USP format to a flat file format of trace, sample
          * sample interval and amplitudes.  No additional header
          word  options are allowed here and the trace and sample
          values above are sequential.

     -hw1,-hw2,-hw3,-hw4
          User defined trace header word values (up to 4)  to  be
          printed  in  flat  file.  Enter on the command line the
          sequenced key followed by  the  appropriate  code  (see
          section  for scan). e.g. suppose we want to write, Rec-
          Num, TrcNum, DstSgn, Time, Amplitude, the command  line
          entry  would  be  -flat  -hw1  RecNum  -hw2 TrcNum -hw3
          DstSgn.  Should any of your chosen  header  entries  be
          floating  point values the entire header report will be
          in floating point [f15.3] format.  Default  (no  header
          words defined) is time and amplitude only.

     -flat2
          Enter the command line argument '-flat2' to convert the
          input  flat  file  [tr, rec, samp, amp] values to a USP
          datset.  The only parameter that is used by this option
          is -amp, which specifies a value with which to fill the
          output trace amplitudes not defined in the input  file.
          If  -amp  is  not specified, the fill value defaults to
          zero.

     -V   Enter the command line argument '-V' to get  additional
          printout.

     -? -h -help
          Enter the command line argument '-?', '-h'  or  '-help'
          to  get  online help.  The program terminates after the
          help screen is printed.


BUGS

     Unknown


SEE ALSO

     sis_xy(1) xyz2head(1) recshift(1)


AUTHOR

     P.G.A. Garossino [APR 1993; x3932; zpgg07@trc.amoco.com]





COPYRIGHT

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



Man(1) output converted with man2html