%N xyzopen %F $MIR/src/subs/xyzio.c
%D Open an image file.
%P bpw
%: image-i/o
%B
      subroutine xyzopen( tno, name, status, naxis, axlen )
      integer       tno
      character*(*) name
      character*(*) status
      integer       naxis
      integer       axlen(naxis)

This opens an image file. For an old file, the number of axes is returned in
naxis and the size of each axis in axlen. For a new file, this information is
used to define the dataset.
    Input:
        name        The name of the file to be opened
        status      Either 'old' or 'new'
    Output:
        tno         The image-file handle
    Input or Output:
        naxis       For 'old' datasets: in input dimension of array axlen, on
                    output dimension of datacube; for 'new' datasets: dimension
                    of new dataset
        axlen       The length of the axes, output for 'old' datasets, 'input'
                    for 'new' datasets                                        
