%N fxyopen %F $MIR/src/subs/fitsio.for
%D Open a FITS image file.
%P rjs
%: fits
%B
      subroutine fxyopen(lu,name,status,naxis,nsize)

      integer lu,naxis,nsize(naxis)
      character name*(*),status*(*)
  ---------------------------------------------------------------------
  Open a FITS image file and ready it for use.

  Inputs:
    name       Name of the map to be opened.
    status     Either 'old' or 'new', depending whether an old image
               is being read, or a new image is being written.
    naxis      Dimension of nsize.

  Input/Output:
    The following are input if creating a new image (i.e.
    status='new'), or output when reading an old image.

    nsize      An array containing dimension information. For an old
               file, this is filled with the values of NAXIS1,
               NAXIS2, ...  If there are fewer than NAXIS dimensions,
               then it is filled with ones.

  Output:
    lu         File descriptor of the image opened.
