%N cocompar %F $MIR/src/subs/co.for
%D Compare two coordinate systems
%P rjs
%: coordinates
%B
      logical function coCompar(lu1,lu2,match)

      integer lu1,lu2
      character match*(*)
  ---------------------------------------------------------------------
  Compare two coordinate systems, returning .true. if they are alike,
  and .false. otherwise.  The "match" argument determines the tests
  performed.

  Input:
    lu1,lu2    Handles of the two coordinate systems to be compared.
    match      This determines the tests to be applied.  Tolerances
               are 0.01%, except for match='approx' (see below).
               Possible values are:

                 Value         Description
                 -----         -----------
                 'exact'       Check that ctype, crval, crpix, and
                               cdelt are identical.
                 'projection'  Check that ctype and crval are the same,
                               i.e. whether the coordinate systems have
                               the same projection and reference value.
                 'offset'      Check ctype, crval, and cdelt, i.e.
                               whether the coordinate systems are
                               identical to within a shift of the
                               pixel coordinates.
                 'approx'      Check whether the two coordinate systems
                               are approximately the same - less than
                               0.1 pixel difference at the reference
                               pixel of the first system, cdelts that
                               agree to within 1%, and compatible
                               ctypes.
                 'align'       crpixs are the same.

  Output:
    coCompar   True if the two coordinate systems are alike, and false
               otherwise.
