NAME

     xyzin - routine to install z information to trace data given
     x,y  locations.   The z data is provided in a 3 column x,y,z
     flat file format.  The trace data need only have x,y data in
     the header.  No assumption of 3D binning etc. is made.


SYNOPSIS

     xyzin [ -Nntap ] [ -Ootap ] [ -Fotap ] [  -xx ]  [  -yy ]  [
     -zz ]  [  -toltol ]  [ -maxtolmaxtol ] [ -z_replacec_zhw ] [
     -ampamp ] [ -numnum ] [ -expexp ] [ -C ]  [  -xhwc_xhw  ]  [
     -yhwc_yhw ] [ -zhwc_zhw ] [ -V ] [ -? -h -help  ]


DESCRIPTION

     xyzin reads a set of x,y,z data into memory, sorts on x  and
     y  for fast search access, then streams through the attached
     USP format dataset to assign each trace a z value  based  on
     x,y location.  The z value for a given trace is interpolated
     from the control data in memory  using  a  nearest  neighbor
     search [ala vi3d].

     xyzin gets both its data and  its  parameters  from  command
     line  arguments.  These arguments specify the input, output,
     x,y,z flat file, column indicators  to  communicate  to  the
     routine  which  column  is x, which is y and which is z, the
     radius of investigation, optional maximum radius of investi-
     gation,  optional z replacement value to use beyond the max-
     imum radius of investigation, the minimum number  of  points
     to  use in the interpolation, a distance weighting exponent,
     a z scalar, a cosine weighting flag  for  the  interpolation
     weighting, mnemonic indicators to communicate to the routine
     the location in the USP trace headers of the associated  x,y
     and z values and a verbose printout flag.

  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.  Be aware that you  may  NOT  pipe
          into  this  routine  if you have flagged  -tdfn  on the
          command line [see below]

     -O otap
          Enter the output filename immediately after typing  -O.
          This output file is not required when piping the output
          to another process.

     -F xyztap
          Enter the x,y,z  flatfile  filename  immediately  after
          typing  -F.   This  in  file  is  required, there is no
          default.

     -x x Enter the column number of the above  flatfile  associ-
          ated with the x coordinate.  The default is column 1.

     -y y Enter the column number of the above  flatfile  associ-
          ated with the y coordinate.  The default is column 2.

     -z z Enter the column number of the above  flatfile  associ-
          ated with the z coordinate.  The default is column 3.

     -tol tol
          Enter the radius of investigation surrounding each out-
          put  location.   This area will be searched for input z
          value locations  and all those found within  this  area
          will  be  distance weighted and used in the calculation
          of the output z value.  There is no  default  for  this
          entry  and  it  is required.  This entry also serves as
          the calculation base for distance weighting.   A  point
          lying on the control point will be assigned a weight of
          unity.  A point lying on a circle of radius  -tol  will
          have  a  weight of zero.  All values within a radius of
          -tol will be summed and the total divided by the sum of
          the  weights.   This process often results in a lower z
          value than anticipated at any given function  location.
          The following entry -amp[] allows compensation for this
          effect.

     -maxtol maxtol
          Enter the maximum radius of  investigation  surrounding
          each  output  location.   The is the maximum value that
          the expanding radius search may attain.  Should no data
          be  found  by  this radius then the output Z value will
          take on the replacement value input on the commandline.
          The default is the above radius of investigation multi-
          plied by 1.e20.

     -z_replace z_replacement
          Enter the z value to be used  when  no  data  is  found
          inside   the  maximum  radius  of  investigation.   The
          default is 0.0 .

     -amp scalar
          Enter any desired scalar with  which  to  multiply  the
          weighted z values by.  The default is unity.

     -num num
          In the event that extrapolation outside areas  of  con-
          trol  is required this entry allows the user to require
          that a certain number  of  nearby  control  points  are
          always  used  in  the  extrapolation  zone.  Should the
          number of points  found within the user defined  search
          radius  be  zero then the radius will be expanded by 25
          percent and the search performed again.   This  process
          will  be  repeated  until -num[] nearest neighbor func-
          tions locations have been  located  within  the  search
          radius.  This parameter has an effect on the smoothness
          of the transition between  the  controlled  and  uncon-
          trolled  zones  in  the  output  z values.  The default
          value is 5.

     -exp exp
          If you wish  to use 1/r**exp type weighting of z values
          within  the radius of investigation [-tol[] above] then
          make an entry here.  If no -exp[]  is  flagged  on  the
          command line then a simple 1/r type weighting will done
          within the radius of investigation.  This is a floating
          point entry so any real exponent is possible.

     -C cos
          Enter the command line option -C to use a  cosine  bell
          weighting  of  z values within the radius of investiga-
          tion [-tol[] above].  The presence of -C on the command
          line shuts off distance weighting.

     -xhw c_xhw
          enter the USP  trace  header  mnemonic  from  which  to
          extract  the  x coordinate when reading the input data.
          The default is [RcPtXC].

     -yhw c_yhw
          enter the USP  trace  header  mnemonic  from  which  to
          extract  the  y coordinate when reading the input data.
          The default is [RcPtYC].

     -zhw c_zhw
          enter the USP trace header mnemonic in which to install
          the computed z coordinate.  The default is [GrpElv].

     -V   Enter the command line argument '-V' to get printout of
          the input x,y,z data.

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


DISCUSSION

     This routine is useful when you have  a  flat  file  control
     dataset  based  solely on x,y coordinates, where x and y are
     any valid index system used with your data, and you wish  to
     install said control to the header structure of your seismic
     dataset.  This routine will allow you to install the surface
     to  your  data without requiring that you prep your data for
     3D processing [such as is required with tim2hed3d].  It also
     makes  no assumption about the relationship between the data
     in the flat file and the incoming USP datastream [such as is
     required  in xyz2head].  Any arbitrary set of x,y,z data may
     be used to control the surface that is interpolated and  fit
     to  the  data.   Each trace is treated independantly.  The x
     and y of the trace is determined and a z value  is  interpo-
     lated  from  the control functions based on the same nearest
     neighbor algorithm used in vi3d.


BUGS

      Unknown


SEE ALSO

     xyz2head(1) xyzin(1) tim2hed3d(1) li_di(1)


AUTHOR

     P.G.A.Garossino [socon 422-3932] for Jan Kommedal AmocoUK


COPYRIGHT

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
































Man(1) output converted with man2html