[fitswcs] comments and questions about ongoing WCS discussions

Perry Greenfield perry at stsci.edu
Thu Aug 13 17:54:30 EDT 1998


I've had a chance to review the recent discussions regarding the
WCS proposal and have a few resulting questions and comments.
I am not nearly as expert in these matters as most on this mailing
list so I apologize if this leads me to misunderstand some of the
issues raised.

With regard to the CD matrix vs. PC matrix/CDELTn issue: understandably,
use of the CD matrix convention is easier for us, but I'd like to make
a comment about which is more understandable to he human reader. While
it is true that the PC matrix/CDELTn is closer to a representation that
is in principle more easy visualized as corresponding to simple 
transformation operations, it has one very serious drawback which has
been amply illustrated by the past discussion. Because there are multiple
ways of breaking down a simple linear transformation (each with reasonable
adherents), there have arisen numerous conventions about how to apply
simple transformations (offsets, scaling and rotations). This fact makes
it likely that such transformations parameters may be misunderstood or
misapplied by some fraction of users attempting to interpret the parameters,
either directly or through software. The great advantage of the CD matrix
is that it is easier to explain how it should be applied to the
data to get the correct answer than the the other approach. In my
opinion, this advantage far outweighs the ability to understand how it
may be interpreted as a combination of simpler transformation operations
(and indeed, different users may not want to interpret the transformation
matrix the same way).

I think Don's argument about many transformations being derived from fitting
and therefore not naturally split into simpler transformations is an
important one.

In short, I strongly support the CD matrix representation (and the option 
of alternate CD matrices).

As to whether the proposals satisfy the needs of existing and planned HST
instruments I cannot be definitive because I have lost track of what
proposals are on the table for handling instrumental and optical distortions.

If I may superficially recount (and probably incorrectly) what I have seen 
float by in discussions:

1) An original proposal for a correction grid to be applied using bilinear
interpolation. This has problem in that it appears to require associating
image extensions and this raises some messy issues.

2) Various forms for high order polynomial corrections with different schemes
for indexing the coefficients. Unclear to me is whether some of these
proposals would support multiple functional forms (e.g., simple polynomials,
Chebyshev, or splines) or whether we would have to settle on only one.

3) Combinations of lower order polynomials with existing, standard projections
(e.g., TAN with 3rd order) or radial terms.

I must admit I am unclear about which ones are still "on the table" or off,
and about the associated details. These details matter to us quite a bit.
I would like some clarification on what seems to be the current proposal 
(or proposals) in this regard.

At this point it may be useful to briefly describe the problems faced
by HST instruments (this is by no means comprehensive; it is only 
intended to give a flavor of what we do now and what we would need
in FITS WCS).

In general, no distortion information is handled within any wcs-type 
system.  Distortion information is generally stored outside of the
science image and special tasks are run to either resample the data or
to provide coordinate mappings (e.g., sky coordinates corresponding to
pixel coordinates). Some instruments (STIS, FOC, and probably ACS) use
a brute force method. The distortion model is provided by distortion
images using no subsampling (similar to the originally proposed pixel
regularization images). These distortion images have usually been used 
to resample the data though they can be used in other ways.  WFPC has a
3rd order polynomial model and a task is provided to map pixel coordinates
into sky coordinates (and another to do the inverse). The distortion model
for the FOC is not well fit by polynomials (even of order 10) and is instead
generated by a spline model. Offhand, I am not familiar with the MAMA
distortion characteristics for STIS but I am sure that it is much better
behaved than the FOC. The distortion characteristics for ACS have not been
studied enough to have confidence in what would be suitable enough to model
it (and there is little hope of that happening soon enough for the purposes
of the FITS WCS discussion). But again, we expect it would be modeled
well enough with a polynomial of suitably high enough order (but perhaps
more than third order).

If these distortions could be represented by the FITS WCS convention, I'm
sure we would make use of it. For FOC, I doubt anything short of a spline
model or finely sampled pixel regularization image would suffice. I'm unsure
if splines are necessary for the STIS MAMA detectors. Polynomials should
suffice for the others (order 9 or less).

Of course, I can't be more definite about what we would find acceptable
until I understand which proposals are being considered and what the
full details are. When I know these, then I will have some of
the people in the group look at them carefully to see that the could
be used with the existing instruments.

A few comments on what has been proposed in the past:

Surprisingly, bilinear interpolation for a coarse pixel regularization
image may not be sufficient for some applications. We tried that for FOC
and were surprised to see that the effect on the appearance of images 
geometrically corrected using bilinear interpolation on a coarse grid lead
to quite apparent discontinuities in apparent brightness when flux conserving
geometric corrections were used. Basically the Jacobian is discontinuous
on the grid and this was very apparent when applying the distortion correction
to flat fields.

If high order polynomials are allowed, I would argue that provisions for
using something other than simple polynomials be made. Yes, simple 
polynomials are easy for users to interpret, but they are numerical
nightmares from the computational point of view.

If the coefficients discussed by Don in his original proposal are to be
used for splines, some provision must be made for specifying the spline
knots.

If splines were part of the WCS, I am confident they would obviate any need
for using pixel regularization images for our existing or anticipated
instruments (well, with one exception: It is possible that CCD's may have
pixel offsets arising form manufacture that could be modeled and that would
require a fully sampled pixel regularization image)

One further comment regards how WCS is used for vector columns in binary
tables. Bob Hanisch tells me that the WCS information is to be stored
in columns of the same table. If so, that addresses the case where
the WCS information changes from one row to the next, but I note that
the G&C draft consistently refers to keywords when describing naming
conventions for WCS parameters in such tables which leads me to believe
that it is describing header keywords in which case different rows must all 
share the same WCS parameters. If so, it will not be usable for some data
(STIS for example). 




More information about the fitswcs mailing list