Subject: WCS problems on Optical Telescopes.

From: Peter Bunclark <psb at ast.cam.ac.uk>
Date: Thu, 18 Sep 1997 15:32:31 +0100

WCS on Optical Telescopes.

WCS failed to mature into a standard at ADASS'97, and it seemed to me
that despite optimism over the progress made, the consensus churned rather
than converged.

Since we're obviously not going to reach even a sub-optimal consensus in
the short term, I feel we should discuss some of the issues that came out
of discussion at ADASS.

1. the WCS draft proposal seems to consider all wavelengths except optical,
   or at least it is causing considerable difficulties applying it to optical
   imagery.

2. I was a little surprised to realize that at least a few people are expecting
   WCS to support high-accuracy astrometry, as opposed to arcsecond-type
   stuff for object id and map-presentation.  There isn't enough power
   in the suggested transformations to do that.

3. Probably the worst case of everything is the Schmidt plate.  To do
   `real' astrometry, for example to configure a fibre spectrograph, you
   must fit the distortions with a `rubber-mat' for example, which APM software
   does.  Polynomials won't do because there are bends and wobbles on one
   side of the plate that are often uncorrelated with those on the other side;
   you need an unacceptably high-order polynomial to follow that kind of stuff;
   splines would be better.
   Much Schmidt-telescope imagery is now taken on film.  You can get nearly
   as good results as glass, but your mapping function has to hack it.
   Our friends at ST tell us they have to use the correction matrix under
   the WCS proposal to do this kind of stuff;  but it is clearly quite
   inelegant to use a transformation which was designed to regularize the image
   at the 0.1 pixel level to adjust it by 1-2 arcsec (15mu sampling is
   approx 1 pix per arcsec) which should be done in the projection stage.

4. The PC matrix wants you to put 1's on the diagonal and zeros elsewhere.
   This is hard to arrange for a ccd, and furthermore most optical 
   instruments are mounted on rotators, and so can move to arbitrary angles
   from exposure to exposure;  hence the PC matrix will have to have
   arbitrary values in the real world.  Also, with long-slit spectroscopy
   one will want the spatial axis to be at an arbitrary PA.

5. There is an engineering issue with optical telescopes.  The geometry
   of the detectors can change on shortish timescales, eg when you
   incorporate bigger and better chips; however, the geometry of the
   detector can be measured, and hence represented parametrically, to
   extremely high accuracy.  On the other hand, the mapping of the focal 
   plane to celestial coordinates will stay fixed for the lifetime of
   the telescope which is usually many decades, but can be somewhat
   imprecise;  even worse is the zero-point if that is determined at the
   time of observation from the telescope encoders (of course it can
   be tweaked to higher accuracy offline).
	It would be illuminating to include a discussion of errors in the
   WCS document; ideally a solution could be found which separates out
   high-precision factors from those with observational error.
	The point of this is that I would like to separate the complete
   transformation of pixels to celestial coordinates into two stages:
   (1) transform pixels on the chip/plate to `engineering units', ie 
   Cartesian meters at the focal-plane.  You can imagine inscribing a
   pair of axes on the instrument mounting-plate to which these coordinates
   correspond.  For a synthesis map this step could have unit scaling. Then
   step (2) is to transform linear measure in the focal plane to celestial
   coordinates.
	I believe a side-effect is to satisfy many people's requirements 
   for multiple-WCS's in headers; for example, this would give the physical
   relationship between the members of a CCD mosaic to high accuracy, and
   would help greatly in stitching together mosaic images;  whereas the
   transformation to celestial coordinates, which contains higher-order
   errors, is common to all the chips in the mosaic.  When you do an
   instrument change, half the transformation remains valid, and the other
   well-defined section is specific to the alternate instrument.

6. I feel it would be more elegant to include a mapping which adds radial-
   distortion onto a classical tangent plane, even though arc+radial
   probably gives about the same result.

7. Can you imagine a WCS that describes the coordinates on an objective-
   prism plate?

Peter.

---

From: Doug Mink <dmink at cfa.harvard.edu>
Date: Mon, 22 Sep 1997 15:37:51 -0400

Peter Bunclark wrote:
> that despite optimism over the progress made, the consensus churned
> rather than converged.
...

> 6. I feel it would be more elegant to include a mapping which adds
> radial distortion onto a classical tangent plane, even though
> arc+radial probably gives about the same result.
...

I have a program, IMWCS (http://tdc-www.harvard.edu/software/wcstools),
which automatically fits a plane-tangent WCS to a FITS image, usually
an optical telescope image.  It has worked fine on single chip CCD
images, but the vagaries of CCD mosaic astrometry are causing me to
add a polynomial.  I proposed to Don Wells and Eric Griesen that a
tangent plane plus polynomial projection be added to Mark Calabretta's
WCSLIB, and they said go ahead and propose it.  I am going to add it to
my own software first, to make sure it works, then more formally propose
it to the keepers of the WCS (of which I am sort of a member).  Lindsay
Davis at NOAO is using a TAN plus polynomial projection to do astrometry
with the NOAO mosaic and agrees that this is a good idea.  I propose a
TPN projection similar to the ARC plus polynomial (ZPN?) projection in
the Calabretta library.  I think that there could be consensus in the
optical community about the importance of such a projection, and would
like to hear from others who might be interested, especially those who
weren't at ADASS.
-Doug Mink
 Telesecope Data Center
 Harvard-Smithsonian Center for Astrophysics
 Cambridge Massachusetts USA

---

From: dwells at nrao.edu (Don Wells)
Date: 26 Sep 1997 21:13:53 GMT

"PB" == Peter Bunclark <psb at ast.cam.ac.uk> writes:
PB> 2. I was a little surprised to realize that at least a few people
                are expecting 
PB>    WCS to support high-accuracy astrometry, as opposed to arcsecond-type
PB>    stuff for object id and map-presentation.  There isn't enough power
PB>    in the suggested transformations to do that.

If your optics conform to gnomonic projection, the six-term transformation
plus TAN is equivalent to the "standard coordinates" solution of classical
astrometry.  Over moderate field widths the off-diagonal linear terms are
even sufficient to absorb the skew due to refraction.  If your optics are a
big reflector with prime focus corrector lens, the ZPN projection is
sufficient to represent the geometry with quite good accuracy, probably to a
fraction of an arcsecond, if the center of symmetry is adjusted in the
regression to minimize the residuals.  Of course, ZPN is a modified ARC
projection, not a modified TAN, but the terms of the difference between TAN
and ARC (x^3/3 + 2x^5/15 + 17x^7/315 +...) can be added to the radial
distortion coefficients and the sums expressed as the PROJPi keywords of
ZPN.  (I do support the request by Doug Mink and you that radial polynomial
terms be added to the TAN projection as well as the ARC projection.) If your
optics need additional "rubber-sheet" distortion terms, the pixel
regularization map specified in Appendix A of the draft document will be
completely sufficient for astrometry to any precision supported by your
reference stars. The current draft specifies that the map will be expressed
as a numerical array for each axis, but discussions at Sonthofen led to the
decision that we will instead express it as a polynomical expansion; the two
notations are mathematically equivalent.

In summary, there is indeed enough power in the proposed WCS notations, even
in the September 1996 draft version, to support representation of the
geometry of optical imagery to arbitrary precision.

PB>    ..  Polynomials won't do because there are bends and wobbles on one
PB>    side of the plate that are often uncorrelated with those on the
        other side; 

The proposed pixel regularization map (Appendix A) is exactly what is needed
for such cases; it can be asymmetric.

PB>    you need an unacceptably high-order polynomial to follow that
                kind of stuff; 
PB>    splines would be better.

A Chebyshev polynomial is a sufficient representation of the pixel
regularization map; the number of terms needed is essentially the same as
the number of spline coefficients that would be needed for the same
precision of representation. The Chebyshev expansion, which is orthogonal
and has the equi-ripple property, can be converted to the equivalent
conventional polynomial for interchange. I expect that the alternative FITS
keyword notation which I mentioned in the BoF at Sonthofen will support up
to 9999 polynomial coefficients per axis.

PB> 4. The PC matrix wants you to put 1's on the diagonal and zeros elsewhere.
PB>    This is hard to arrange for a ccd, and furthermore most optical 
PB>    instruments are mounted on rotators, and so can move to arbitrary angles
PB>    from exposure to exposure;  ..

The PC matrix and the equivalent CDxxxxxx notations supported by IRAF and
ST-SDAS support both rotation and skew. There is no problem.

PB>    .., with long-slit spectroscopy
PB>    one will want the spatial axis to be at an arbitrary PA..

There are three world coordinate axes in long-slit spectroscopy:
CTYPE1='RA---TAN', CTYPE2='DEC--TAN', CTYPE3='LAMBDA' (or some other
spectroscopic projection).  The proposed notation enables the celestial axes
to be rotated to arbitrary PA. The proper dimensionality of a long-slit
spectrogram is NAXIS=3, not NAXIS=2.  Such a piece of data is exactly
equivalent to one plane (a 2-d slice) extracted from a 3-d spectral line
cube produced by a radio synthesis interferometer or scanning Fabry-Perot
spectrometer.

PB> 	.. I would like to separate the complete
PB>    transformation of pixels to celestial coordinates into two stages:
PB>    (1) transform pixels on the chip/plate to `engineering units', ie 
PB>    Cartesian meters at the focal-plane..
PB>    step (2) is to transform linear measure in the focal plane to celestial
PB>    coordinates.

You are, of course, always free to represent the geometry of your particular
instrument in this fashion and then to concatenate the multiple
transformations into the canonical notation for interchange. In addition,
the proposed multiple-WCS notation (see below) will enable you to export the
alternative notations to systems which interoperate with yours for these
transformations.  I advocate that we choose the minimum sufficient set of
keywords which will accomplish our basic interoperability goal.

PB> 	I believe a side-effect is to satisfy many people's requirements 
PB>    for multiple-WCS's in headers; ..

I recommend that we specify that complete alternative WCS representations
can be conveyed in headers by appending alphabetic subscripts A-Z to the WCS
keywords. Implementors who have no reason to support multiple WCS solutions
can ignore such subscripted keywords.  It appears that the only price we
will pay for this convention is that the number of axes will be restricted
to 99.

PB> 7. Can you imagine a WCS that describes the coordinates on an objective-
PB>    prism plate?

The transformation is ambiguous: two or more sources can produce overlapping
spectra, so that it is not always possible to assign the flux in a
particular pixel to a unique place on the sky. Of course, if such an image
is reduced, probably with the aid of source coordinates determined from
conventional direct imagery, the individual spectra can be extracted with a
consistent dispersion scale, and can be represented as a set of conventional
long-slit spectra, perhaps a set of IMAGE extensions in a FITS file, each
with a WCS solution in its header.
--
  Donald C. Wells         Associate Scientist         dwells at nrao.edu
                    http://fits.cv.nrao.edu/~dwells
  National Radio Astronomy Observatory                +1-804-296-0277
  520 Edgemont Road,   Charlottesville, Virginia       22903-2475 USA