NAME

     mapreplace - Use maps to select values to replace in a 3D volume.


SYNTAX

     mapreplace [ -N filename -O filename
                  -map1 upper_map -map2 lower_map
                  -z1 constant_upper_map -z2 constant_lower_map
                  -v0 bias -k slope -z0 z_origin -dz delta_z
                  -emask emask -h -V]



DESCRIPTION

     mapreplace replaces samples in a 3D volume that  lie  on  or
     between  the  input  maps with a user-defined function. Maps
     used in mapreplace are USP format files and must be conform-
     able with the input volume, i.e.

            NumSmp(map1) == NumSmp(map2) == NumTrc(volume)
       and  NumTrc(map1) == NumTrc(map2) == NumRec(volume)

     mapreplace will notify users if  these  conditions  are  not
     met.

     -map1 describes the upper map surface  and  -map2  describes
     the  lower  map surface. Maps are optional. Constant values,
     -z1 and -z2 can be used in place of  USP  format  map  files
     and, in the absence of maps and constant z values, the first
     sample is used for the upper surface and the last sample  is
     used for the lower surface.

     Maps can contain an embedded mask  (-emask)  that  describes
     areas where map surfaces are undefined. Where the upper sur-
     face is masked, the input volume is passed unchanged.  Where
     the  upper  surface  is  defined  and  the  lower surface is
     masked, samples from the upper surface to  the  end  of  the
     trace are replaced.

     User overrides -z0 and -dz (for the z origin  and  delta  z)
     enable  proper map registration if values in the line header
     are not set or are improperly set.

     In  this  release,  the  function  used  for  samples  being
     replaced  is restricted to a single V(z). More general func-
     tions can be easily implemented as needed.


OPTIONS

     -N filename [default: stdin]
          Enter the name of the input file immediately after typ-
          ing  -N.   This  file  should include the relative path
          name if the file resides in a different directory.

     -O filename [default: stdout]
          Enter the output dataset name or file immediately after
          typing  -O.  This file should include the relative path
          name if the file resides in a different directory.

     -map1 upper_map [default: map1=First Sample]
          Enter the name of a USP file that describes  the  upper
          map  surface. The input volume will be altered from the
          samples at this level down to the level of -map2.

     -map2 lower_map [default: map2=Last Sample]
          Enter the name of the USP file that describes the lower
          map  surface.  The  input  volume  will be altered from
          -map1 down to the samples at this level.

     -v0 bias [default: bias=3000.0]
          Enter intercept of a  V(z) = v0 +  k*z   function  that
          will replace the values in the input volume.

     -k slope [default: slope=0.0]
          Enter slope of a  V(z) = v0 + k*z  function  that  will
          replace the values in the input volume.

     -z0 z_origin [default: z_origin=0.0]
          Enter the origin of the z axis to register the  V(z)  =
          v0 + k*z  function.

     -dz delta_z [default: delta_z=1e-3*Dz1000]
          Enter the z axis sample interval to register the   V(z)
          = v0 + k*z  function.

     -z1 constant_upper_map [default: z1=First Sample]
          Enter a constant value to be used as the upper map sur-
          face.

     -z2 constant_lower_map [default: z2=Last Sample]
          Enter a constant value to be used as the lower map sur-
          face.

     -emask emask [default: emask=-1e+37]
          Enter the value of map samples  where  the  surface  is
          undefined.

     -V   Print verbose information during processing.

     -h or -?
          Print online help to the terminal.



EXAMPLE

         mapreplace -N vel_in.usp -O vel_out.usp \
                    -map1 tos_map.usp -map2 bos_map.usp \
                    -v0 4478 -emask -99999

     This  will  replace  values  of  vel_in.usp  between  levels
     described  by  tos_map.usp  and  bos_map.usp with a constant
     value, 4478.0. Where tos_map.usp has  a  value  of  -99999.0
     (i.e.    masked),   vel_in.usp   passes   unchanged.   Where
     tos_map.usp is not masked but bos_map.usp is,  the  constant
     value 4478 is used from tos_map.usp to the end of the trace.



SEE ALSO

     lmascii2usp(1),   mapfill(1),   mapextract(1),   replace(1),
     vfill3d(1)


AUTHORS


BUGS

     None known


AUTHORS

     M.J. O'Brien - Allied Geophysics Inc.




COPYRIGHTS

     Copyright  2001,  Allied  Geophysics,   Inc.    All   Rights
     Reserved.

     Portions of this application are also protected as follows:

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























Man(1) output converted with man2html