Posted: Sat Dec 08, 2007 12:48 am Post subject: WCS question
Travis Rector suggested that I send this question to you...
We are trying to understand a particular aspect of WCS header
construction and interpretation. Suppose that you have a very simple
header where only the diagonal elements of CDn_n (or the CDELTn
keywords) are specified, and no rotation of the image is prescribed.
As we understand it, the CDELTn can then be interpreted as degrees-
per-pixel along each axis of the image. (Assuming that we're
"nowhere near" the celestial pole!) If CTYPE1 = 'RA---TAN', then is
the cos(dec) correction supposed to be already included in the CD1_1
value, or is this supposed to be calculated by the FITS reader
software? In other words, what is the standard in this regard?
Also, do you have a feel for whether there are groups out there that
are not following the standard? If there are, then how is the FITS
reader software supposed to determine whether or not to apply the
The quesiton about where the pole is doesn't enter until the tangent plane projection is appliled. So what the scale terms (CD and CDELT) mean is the degrees per pixel at the tangent point defined by CRVALn and CRPIXn. Cos(dec) doesn't enter in this. Normally, and because the TAN project only makes sense when, the tangent point is near the image and often near the center of the field. So the scale terms really mean the scale at the tangent point. Another way to understand this is that the FITS model uses a coordinate expansion about the tangent point. Near the tangent point the coordinate system is linear and then the non-linearities are accounted for as a second step when the projection is applied.
I hope I clarified more than I might have confused. The tangent plane WCS, as defined by the RA--TAN/DEC-TAN values, is generally correctly used and implemented in all FITS reader and writer software.
Posted: Mon Dec 10, 2007 10:01 pm Post subject: Re: WCS question
Yes, that answers my basic question. But here's a follow-up. Suppose that someone has misunderstood this standard, and decided that the cos(dec) correction should be encoded into the CD matrix or CDELT values in the header. They manage to do this somehow by circumventing the normal FITS writing routines, by writing the header themselves or by telling the telescope-control computer to write it into every image. The FITS reader would not expect this, and would incorrectly interpret the physical coordinates of the image?
The reason I ask is that I have some legacy Java code for use with ImageJ, which translates from pixel to celestial coordinates. The code does not follow the standard as you've described it, so the images that have been used with the code have been altered to match (so they don't follow the standard either). I think what I need is information on how the tangent planet projection (or deprojection?) should be applied. Can you point me to a reference?
First, within IRAF you can do some interesting things with HEDIT because the value can be an expression with other values. So if a keyword needs to be multipled by cos of another keyword that can be done fairly painlessly.
As they say, be careful what you wish for. The references you want may be found at:
In particular, paper 1 and paper 2. Paper 1 gives the basic concepts such as that a linear approximation at the reference point defines most of the keywords and then some projection is applied to that. Paper 2 is all the details of celestial coordinates and projections and it is big and full of equations, etc.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum