%N cogeom %F $MIR/src/subs/co.for
%D Compute linear coefficients to convert geometries.
%P rjs
%: coordinates
%B
      subroutine coGeom(lu,in,x1,ucoeff,vcoeff,wcoeff)

      integer   lu
      character in*(*)
      double precision x1(*), ucoeff(3), vcoeff(3), wcoeff(3)
  ---------------------------------------------------------------------
  Compute matrix elements for transforming (u,v,w) coordinates to the
  specified field centre, for mosaicing, etc.

  Input:
    lu         Handle of the coordinate object.
    in         As with coCvt
    x1         As with coCvt
  Output:
    ucoeff,vcoeff Coefficients used to convert (u,v) from one geometry
               to another.  In particular:
                 u(corrected) = ucoeff(1)*u(raw) + ucoeff(2)*v(raw) +
                                  ucoeff(3)*w(raw)
                 v(corrected) = vcoeff(1)*u(raw) + vcoeff(2)*v(raw) +
                                  vcoeff(3)*w(raw)
                 w(corrected) = wcoeff(1)*u(raw) + wcoeff(2)*v(raw) +
                                  wcoeff(3)*w(raw)
