Subject: Correction of coordinate computation correction

From: egreisen at primate.CV.NRAO.EDU (Eric Greisen)
Date: Wed, 3 Feb 93 10:11:03 EST

A couple of days ago, I put out a message concerning the conversion
of the old coordinate nomenclature into the new (proposed) form.
In particular, I was concerned to point out that there is a formula
for this in the text of Chapter 4 of the NOST FITS Reference Guide
(which directly reflects a draft of the Hanisch/Wells paper on "World
Coordinate Systems") which I believe to be in error.  Unfortunately,
the corrected formulae which I proposed turn out also to have an
error.  I was confused by the complexities of the internal plot code
in AIPS.  The actual formulae used by AIPS (and other packages) are

  CDi_i = Di cos(rho)
  CDj_j = Dj cos(rho)
  CDi_j = -Dj sin(rho)
  CDj_i = Di sin(rho)

where i refers to the longitude-like axis, j the latitude-like axis,
Dn = CDELTn, and rho = CROTAj.  The old formulae for coordinates do
define the sign of rho implicitly, but I can't find it written down
anywhere.  The formulae show that rho is the angle measured from the
+y axis to the +latitude axis (actually direction cosine axis in the
+latitude direction) in the clock sense toward the +x axis.  Thus, the
angle is measured counter-clockwise for left-handed systems (our usual)
and clockwise for right-handed systems.  Fortunately, the CD nomenclature
will eliminate rho and all this confusing sign business.   (Of course,
we will undoubtedly find something else to confuse us instead.)

Eric W. Greisen, Scientist
National Radio Astronomy Observatory
Charlottesville, VA