NAME

     dwt2d  - discrete wavelet transform two  dimensional.   Per-
     forms  a  forward or reverse 2 dimensional wavelet transform
     to any level using one of a selection of wavelet basis func-
     tions.


SYNOPSIS

     dwt2d [ -Nntap ] [ -Ootap ]  [  -rsnrst  ]  [  -renred  ]  [
     -nsnstr  ]  [  -nenetr  ]  [  -sist ] [ -eiend ] [ -wnum ] [
     -llevel ] [ -peak ] [ -R ] [ -V ] [ -?  or  -h or  -help]


DESCRIPTION

     dwt2d : This routine  implements  the  2D  descrete  wavelet
     transform as found in Numerical Recipies, Press  et.al.  2nd
     Edition, pp.  589,590,595.   It  allows  for  a  forward  or
     reverse  transform  using  one  of  the wavelet basis listed
     below.

     dwt2d gets both its data and  its  parameters  from  command
     line  arguments.  These arguments specify the input, output,
     the start and end traces, start and end records, the wavelet
     basis,  the  transform  level,  wavelet  or  wavelet support
     centering, the reverse transform flag and verbose  printout,
     if desired.

  Command line arguments
     -N ntap  [default: stdin]
          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.  Example -N/b/vsp/dummy tells  the
          program to look for file 'dummy' in directory '/b/vsp'.

     -O otap  [default: stdout]
          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. The  output  data
          set also requires the full path name (see above).

     -rs nrst  [default: 1]
          Enter start record number.

     -re nred  [default: last record]
          Enter end record number.

     -ns nstr  [default: 1]
          Enter the start trace number.

     -ne netr  [default: last trace of record]
          Enter the end trace number.

     -s nstr  [default: 0]
          Enter a window start time if  desired.  Data  prior  to
          this time will not be transformed.

     -e netr  [default: end of trace]
          Enter a window end time if desired.  Samples after this
          time will not be transformed.

     -w num  [default: 4]
          Enter a wavelet basis to use  in  the  transform.   The
          following are valid choices at present:

             4 --> Daubechies 4
            12 --> Daubechies 12
            20 --> Daubechies 20
            14 --> Battle-Lemarie 1
            24 --> Battle-Lemarie 3
            29 --> Battle-Lemarie 5
            39 --> Meyer

          If you come up with some coefficents [or the  means  to
          calculate them] for your favorite basis we will be glad
          to add them to the above list of choices.

     -l level  [default: 1]
          Enter the number of levels that you wish the  transform
          to be carried out over.

     -peak
          Enter the command line argument '-peak' if you wish  to
          center  the  wavelet.   The  default  is  to center the
          wavelet support.

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

     -? 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

     Many of you may not have considered the use  of  wavelet  or
     wavelet  packet  transforms in your seismic data processing.
     We played with them in 1993 as part of  a  data  compression
     project  and  discovered that there are a couple of applica-
     tions where such processes are  appropirate  [data  compres-
     sion, anti-aliasing] and some where they definitely are not.
     The difficulties associated with aliasing due to the overlap
     of mirror filter bandwidths prevents any practical filtering
     in the wavelet domain from being realizable.  That is not to
     say  that  some  good  may not come from such transformation
     filtering in the future.

     It is interesting to view your data in  the  wavelet  domain
     [especially  time slice data] as the individual quadrants of
     the transform enhance  quite  different  signal  attributes.
     The output from  a 1st level transform looks like

      .............................................
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .       A            .         V            .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .............................................
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .       H            .         D            .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .                    .                      .
      .............................................

           A --> your data from twice as far away
           H --> horizontal emphasis quadrant
           V --> vertical emphasis quadrant
           D --> diagonal emphasis quadrant

     The  A  quadrant is basically a low  pass  version  of  your
     input  dataset  at  half  the number of samples and half the
     number of traces.  It is as if you were looking at your data
     from twice as far away.  The  H V  and  D  quadrants are the
     differences between the  A  representation of your data  and
     the  input  to that level of the transform.  In the  H  qua-
     drant, difference information constrained  within  a  deter-
     ministic  angular range of the horizonal is present.  The  V
     quadrant emphasises the vertical differences  while  the   D
     quadrant enhances diagonal difference information.  There is
     overlap between these quadrants both with respect to angular
     and temporal frequency content which is why filtering in one
     of these  quadrants  followed  by  a  reverse  transform  is
     fraught with problems.  There is considerable trend and edge
     information in these data representations though  which  may
     prove useful for data attribute analysis.

     The field of attribute analysis using wavelet transforms  is
     young  enough that we felt we would release this routine for
     you to play with.  Maybe one of you will take the  time  and
     discover  some  as  of  yet  unknown way to make use of this
     transform or perhaps even solve  the  aliasing  problem  and
     become famous in the field.


BUGS

     Unknown.


AUTHOR

     [P.G.A. Garossino: ATTC: 3932 -- October 1993]



COPYRIGHT

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
































Man(1) output converted with man2html