%N xyzprfwr %F $MIR/src/subs/xyzio.c
%D Write a profile to a dataset
%P bpw
%: image-i/o
%B
      subroutine xyzprfwr( tno, profilenr, profile, mask, ndata )
      integer    tno
      integer    profilenr
      real       profile(*)
      logical    mask(*)
      integer    ndata

This routine provides a (little) faster version for calls to xyzs2c and
xyzwrite for the case that the calling program provides profiles. It
should be used after a call to xyzsetup was used to set up 1-dimensional
subcubes. The calling program can then loop over all profiles (from 1 to
vircubesize(naxis)/vircubesize(1)). xyzprfwr takes care of writing the
datacube. Using this routine instead of xyzs2c and xyzwrite reduces the
overhead by 10% (for 256-long profiles) to 30% (for 64-long profiles).

    Input:
      tno           image file handle
      profilenr     profile nr to be read from virtual cube
      profile       contains the profile to be written
      mask          FALSE values indicate undefined pixels
      ndata         number of elements to write                               
