%N w2wcov %F $MIR/src/subs/cosubs.for
%D Convert an array of coordinates, with validation.
%P nebk
%: coordinates
%B
      subroutine w2wcov (lun, NAXIS, typei, win, typeo, wout, valid)

      logical   valid
      integer   lun, NAXIS
      double precision win(NAXIS), wout(NAXIS)
      character typei(NAXIS)*(*), typeo(NAXIS)*(*)
  ---------------------------------------------------------------------
  Convert an NEBK-style coordinate vector using the CO routines.

  Input
    lun     Handle of open file
    NAXIS   Number of axes to convert
    typei   Array of input coordinate types, Should be from list
               'hms',    'dms',    'arcsec', 'arcmin', 'absdeg',
               'reldeg', 'abspix', 'relpix', 'absghz', 'relghz',
               'abskms', 'relkms', 'absnat', 'relnat', 'none'
    win     Array of coordinates to be converted
               'hms', 'dms' in radians
               '*  deg'     in degrees
               'arcsec'     in arcsec
               'arcmin'     in arcmin
               '*  pix'     in pixels
               '*  ghz'     in GHz
               '*  kms'     in km/s
               '*  nat'     in natural axis coordinates
    typeo   Array of output coordinate types from above list
            requested.
  Output
    wout    Array of converted output coordinates in same units
            as described above.
    valid   True if the coordinate conversion succeeded.
