%N cnvlinia %F $MIR/src/subs/cnvl.for
%D Transform the "beam", ready for a convolution operation.
%P rjs
%: convolution, fft
%B
      subroutine CnvlIniA(handle,array,n1,n2,ic,jc,param,flags)

      ptrdiff handle
      integer n1,n2,ic,jc
      character flags*(*)
      real param,array(n1,n2)

  This routine readys a beam pattern for a series of convolution
  operations.  In particular, it performs an FFT on the beam, and
  stores the result in memory.  It returns a handle which points to the
  structure containing the needed information.

  Input:
    array      Array containing the beam.
    n1,n2      Size of the beam. Need not be powers of two.
    ic,jc      Central pixel of the beam.
    param      A real parameter value. Its use is determined by the
               "flags" argument.
    flags      Extra processing flags, each character indicating
               another processing option.  Possible values are:
                 's'   Assume beam is symmetric.
                 'p'   Param is the value of a Prussian hat to add to
                       the beam.
                 'd'   Perform deconvolution (rather than convolution).
                       Param is the nominal error in the beam.
                 'e'   Double the size of the beam (through zero
                       padding) to avoid various edge effects.
  Output:
    handle     Handle to the transformed beam.
