WCS questions
Mark Calabretta
mcalabre at atnf.csiro.au
Mon Dec 9 07:03:44 EST 1996
On Fri 1996/12/06 04:24:02 GMT, Stephen Walton wrote
in a message to: fitsbits at fits.cv.nrao.edu
>How much violence would it do to the WCS draft to have a new CTYPE
>pair, perhaps "PLAT----" and "PLON----" (Planetary latitude and
>longitude), for which the units of (x, y) would be normalized distance
>from object center rather than degrees? I'd prefer SLAT and SLON for
>"solar," of course, but these seem to have been reserved for other
>purposes :-) .
You should be able to organize it so that the intermediate result obtained
by applying the PC matrix (but not the CDELTn) give the required (x',y').
The CDELTn would then scale these to (x,y) in "degrees" as required by WCS.
This could be made a defining characteristic of PLON/PLAT CTYPEs without
needing to alter the current proposal. While WCSLIB does not provide the
intermediate (x',y') directly it should be a simple matter to apply the
linear transformation routines (linfwd(), and linrev()) to that end.
>A related comment, and the reason this is cross-posted, is which matrix
>to use, the PC matrix or the CD matrix. I ask because IRAF, at the
>moment, has the most complete and easy-to-use WCS implementation of
>which I'm aware, including automatic update of the WCS when images are
>magnified, rotated, or subsections copied, but is based on the CD
>matrix. This convenience within IRAF, and the recent WCS-based image
>matching tasks there, are, in my opinion, one of the major reasons for
>adopting a WCS convention. But I want to remain compatible with other
>software such as IDL, FITSIO, WCSLIB, and so on.
This is all historical. The CDELTn have to be retained for backwards
compatibility with the widely used de facto AIPS WCS convention dating to the
early 1980s. The original WCS document by Hanish and Wells proposed the CD
matrix which would override the CDELTn if both were specified together.
However, we were persuaded that the linear transformation matrix should be
used in conjunction with the CDELTn. Since much STScI data had already been
written with the CD convention we had to introduce a new name for the matrix
elements, hence PC. This way we provided the means for IRAF to support both
conventions for input (but hopefully only write PC headers).
>It is also quite unclear from the WCS specification "how much" of the
>coordinate transformation should be in the PC matrix, and how much in
>the CDELT values. It seems as if the idea is that an image rotation,
>for example, would only require changing the PC matrix, but this
>should be made more precise in some manner.
We couldn't get rid of the CDELTn because of backwards compatibility, as
explained. To make the best of it, I view the PC matrix as providing
dimensionless matrix elements which apply rotation and skew to the pixel
coordinates producing transformed pixel coordinates, and the CDELTn as
imparting a dimension to the result. However, we do not require any
interpretation, the only requirement is that coefficients be chosen such that
the specified algorithm produce correct results.
Mark Calabretta
ATNF
More information about the fitsbits
mailing list