[fitswcs] I've got this FITS WCS matrix

Malcolm J. Currie mjc at star.rl.ac.uk
Tue Aug 24 18:17:53 EDT 2004


Mark,

> >Like CDELTi and the PC matrix.
>
> The PC matrix need not be a rotation.

That limitation wasn't implied.  It was the splitting into two matrices
I was referring to, where the PC matrix could be a pure rotation.

> Notice that the off-diagonal elements are not equal in absolute value
> as they would have to be for a rotation matrix.  That is not to say that
> this matrix is wrong (it looks plausible to me) only that you cannot
> factorize it as you would like.

Now that I spotted immediately.  I raised this point with the Gemini
people back in April to ask whether or not this was intended.  I don't
think I had a clear answer.  It's fitting to measured data with
inevitable uncertainties, without constraints to a pure rotation.
The values are sufficiently close to allow the pure-rotation
simplification that is adequate for the pipeline's needs.

> It's only because the off-diagonal terms are small compared to the
> diagonal terms that you can get a factorization as a scale * rotation
> that is not obviously wrong.

What this suggests is I should be using the more general PC
transformation, rather than the pure rotation, for Gemini instruments,
with appropriate modification to certain general recipe steps.  The
rotation internal header can stay, but make it undefined in such cases,
then the transformation code can check for a defined rotation, and fall
back to the PC matrix if necessary.  Then I don't have change all the
instrument-specific code now to make NIRI reductions work.

The simple rotation was used because at UKIRT we were satisfied with
an AIPS model years before Paper II was finalised.  For some older
instruments, the pipeline in fact writes AIPS WCS headers, not the
Telescope Control System at the summit.

> The question of how any given matrix would best be approximated as a
> scale * rotation is a separate and more complicated issue.  (In this
> instance the best rotation angle is very close to zero.)

It's interesting that DS9 generates c.180.

Malcolm Currie
Starlink Project




More information about the fitswcs mailing list