%N corrfun %F $MIR/src/subs/grid.for
%D Generate the gridding convolution correction function.
%: gridding, interpolation
%B
        subroutine corrfun(func,phi,n,width,alpha)

        implicit none
        integer n
        character func*(*)
        integer width
        real phi(n),alpha

  Calculate the gridding correction function.

  Inputs:
    func       Gridding function used. Currently this can only be
               'spheroidal'.
    n          Width of image.
    width      Width of gridding function used.
    alpha      An extra parameter specifying the gridding function.

  Output:
    phi        Gridding correction function.

  References:
    F.R. Schwab "Optimal gridding of visibility data in radio interferometry",
      Indirect Imaging, J.A. Roberts, ed., Cambridge Univ. Press, 1984.
