%N cnvlinig %F $MIR/src/subs/cnvl.for
%D Construct a Gaussian beam for a convolution operation.
%P mrc
%: convolution, fft
%B
      subroutine CnvlIniG (handle, n1, n2, ref1, ref2,
     *                 bmaj, bmin, bpa, cdelt1, cdelt2)

      ptrdiff handle
      integer n1, n2, ref1, ref2
      real    bmaj, bmin, bpa
      double precision cdelt1, cdelt2

  This routine constructs the Fourier transform of a Gaussian beam
  pattern intended for use in convolution operations.  It computes the
  result directly, without doing an FFT, using the fact that the
  Fourier transform of a Gaussian is another Gaussian.  When the FWHM
  of the Gaussian convolution function is much less than the image cell
  spacing, it is important to do it this way rather than via CnvlIniA
  for which the beam may not be adequately sampled.  The result is
  stored in memory for which a handle is returned.

  Input:
    n1,n2      Size of the beam.  Need not be powers of two.
    ref1,ref2  Central pixel of the beam.
    bmaj,bmin  Gaussian major and minor FWHM (radian).
    bpa        Gaussian position angle (deg).
    cdelt1     Map cell spacing (radian).
    cdelt2     Map cell spacing (radian).
  Output:
    handle     Handle to the transformed Gaussian.
