[fitswcs] Detector distortion correction representations in FITS

Mark Calabretta Mark.Calabretta at atnf.csiro.au
Wed Feb 2 01:43:40 EST 2000


On Tue 2000/02/01 10:47:52 CDT, Doug Mink wrote
in a message to: Mark Calabretta <Mark.Calabretta at atnf.csiro.au>
and copied to: Richard Hook <rhook at eso.org>, fitswcs at nrao.edu,
     sparks at stsci.edu, clampin at stsci.edu, koekemoer at stsci.edu,
     rfosbury at eso.org, jwalsh at eso.org, apasqual at eso.org

>I would like.  Couldn't the software which knows about this standard simply
>ignore the CD matrix and pre-poly reversal thereof if a pre-poly matrix
>and/or post-poly matrix is present, start by applying the polynomial directly
>on the pixels, and then apply the post-poly matrix?

This is basically what I was saying towards the end of my previous email.
You could have a new projection (say "XYZ") which conceptually defines a
pre-poly matrix which is the inverse of CD and a post-poly equal to CD (so
you don't have to specify either matrix explicitly).  Naturally in the
implementation you don't bother multiplying by CD or the pre-poly matrix!

The thing I didn't like conceptually about this scheme is that XYZ
requires information from parts of the algorithm chain about which it
rightly should know nothing.  To be concrete, I was thinking that to
implement XYZ in WCSLIB the upper level routines, wcsfwd() and wcsrev(),
would have to know about XYZ and do things specifically for it.  This is
at variance with the current well-partitioned design where only the lower
level routines know about any projections.  (To be sure, wcsfwd() and
wcsrev() know how to translate NCP into SIN, and how to stack and unstack
quad-cube projections, but that's a different issue.)  I think it would
be bad for the upper level routines to have to know anything about the
implementation of particular projections.

In practice, I think the extra computational load of a pre-, and post-poly
matrix really would be trivial.  Explicit specification of the pre-, and
post-poly matrices also potentially adds extra flexibility since they
don't have to be related to the CD matrix.  I tend to think this is the
best solution.

Cheers, Mark





More information about the fitswcs mailing list