NOAO conducted an internal review of the FITS WCS proposal over the period December 2000 through June 2001. The purpose of this review was to do in-depth studies of the applicability of FITS WCS to certain areas of high priority to NOAO and O/IR astronomy, and then provide feedback to the community regarding further refinement of the WCS proposal. The areas of application we studied internally included the representation of coordinates for spectroscopic data (of all dimensions), application of FITS WCS to astrometric calibration of wide field cameras such as the NOAO Mosaic, and a test-case evaluating integration of FITS WCS into IRAF.

In particular the investigation of spectral WCS was a major effort resulting not only in an updated proposal for representing spectral WCS, but identification of important issues requiring further minor changes to Paper I, and by implication paper II. Although further changes or additions are recommended, we feel that these are not only well worthwhile, but are minor and are upwards compatible with the current draft standard. This document summarizes the recommended changes without going into detail on why we feel they are necessary. Further elaboration is given in the documents linked to below.

Our proposed changes address the following specific concerns:

- Coupling of axes such as the dependence of wavelength with celestial position in long slit spectra and Fabry-Perot data.
- Provision of a general functional distortion model applicable to all world coordinate functions rather than building such support into each individual world coordinate or coupled function (needed for spectra but also a benefit to the celestial projections; this also provides a generalized mechanism to replace the pixel regularization matrix).
- Encapsulation of all information required to describe an instance of a World Coordinate system (WCS) function.
- Provision for WCS dimensionalities which may differ from the number of image pixel axes.

The first point addresses the open question in "Representation of spectral coordinates in FITS" (WCS-III) concerning spatial dependences on spectral data. However, it is more general than just spectral coordinate systems.

The second point addresses a limitation of the current WCS proposal that when classes of world coordinate are defined they are entirely self-contained. This means that any instrumental or other distortions that are not part of the ideal transformation must be explicitly defined for each and every world coordinate class.

The third point provides a mechanism to fully encapsulate WCS function classes, allowing information private to a function class or instance to be managed by the general WCS formulation (code built to paper I) without requiring knowledge of each possible type of world function.

The fourth point addresses situations such as occur in most spectroscopic instruments based on a dispersed light recorded onto a 2D detector. The coordinate system is inherently three-dimensional (celestial position and energy) while the recorded pixel raster is inherently two-dimensional. The proposal adds an alternative convention to defining dummy pixel axes of length 1; dummy pixel axes of length one are however still permitted.

- The world function term of the current WCS transformation model is further broken down into two parts: a general distortion-coupling function term (DCF), and the analytic world function term. The DCF, if defined, is applied after the initial linear transformation (CD matrix etc.). The DCF is an empirical function which is independent of the world function. This is similar to the existing proposal for a pixel regularization matrix, and to the polynomial correction defined by TAN, but more general than either. It obsoletes both of these special-case representations while providing a general model-independent distortion term which can be applied to any world function (e.g., all celestial projections, not just TAN, can be combined with optional empirical distortion terms, ranging from simple multidimensional polynomials to a full pixel regularization matrix).
- If a DCF is employed, the existence, class, and set of coupled
axes for the DCF are defined by the CTYPE keyword, as is currently done
for the world function type (TAN etc.). For example, the set of keywords

CTYPE1s = 'RA---TAN-PLY' CTYPE2s = 'DEC--TAN-PLY' CTYPE3s = 'VELO-WAV-PLY'

would define a celestial tangent plane projection over axes 1 and 2 combined with a polynomial distortion term over the same axes*plus*axis 3, with a spectral wavelength term also defined on axis 3. Note that the DCF and world functions may couple different axes as in this example; this is why we can't just integrate the DCF term into the world function. If multiple instances of a DCF occur within the same WCS then an instance character is applied to uniquely identify each instance, e.g., "PLY*a*", "PLY*b*", and so on. - The properties or parameters of a DCF instance are defined by two
new keywords, a set of DV
*l_ns*keywords for numeric-valued DCF parameters, and a set of DS*l_ns*keywords for string-valued DCF parameters. Here,*l*is the axis number,*n*is the coefficient or parameter number, and*s*is the multiple WCS character. The semantics of any DV or DS parameters are entirely defined by the DCF function class and are opaque to high level (paper-I) oriented code. An implementation should merely pass these keywords through to the DCF function for evaluation. - For reasons of symmetry with the above-defined DCF parameters, to
fully encapsulate world functions, and to allow maximum flexibility for
representing future world functions, a set PS
*l_ns*of string-valued parameters are added to the existing set of PV*l_ns*keywords for passing string-valued data to world functions. The naming convention is as for the DV/DS parameters above (which are in turn patterned after the existing PV*l_ns*keywords). The semantics of any PV or PS parameters are entirely defined by the world function class and are opaque to high level (paper-I) oriented code. An implementation should merely pass these keywords through to the world function for evaluation. - It is possible for the logical dimension of a WCS to be different
from the number of physical pixel axes in an image. This can happen, for
example, as a result of
*dimensional reduction*when a section of a higher dimensioned image is extracted to form a new image. In such a case, evaluation of the WCS may still require evaluation of the original higher dimensional WCS function, while the actual image may have a length of 1 in one axis with a constant valued WCS function value defined for the degenerate axis. To deal with this condition we propose that the WCS dimension be given by the highest value of the axis in any CTYPE keyword, and that this value be permitted to be greater than the value of NAXIS (a WCSDIM keyword could also be added to make this distinction more apparent, but this is not necessary). Note that this feature still permits the use of degenerate axes, as is common within the radio community.

Although our concern here is primarily with the general WCS framework as specified by Paper I, by implication, Paper II (celestial coordinate systems) should also be modified to replace (or deprecate) the polynomial distortion correction in the TAN function, replacing it with the standard TAN function plus a DCF term.

In the case of a polynomial DCF (DCF class PLY), the polynomial would
be stored as a set of simple polynomial coefficients for interchange
purposes. However a string-valued DS*l_ns* keyword could be used to
identify the actual type of polynomial (Chebyshev, Legendre, etc.)
originally used to fit the data. This would allow applications using the
WCS to restore (if desired) the original polynomial fit even though the
polynomial might be stored in the WCS as a simple polynomial.

The concept of the (currently rarely used) pixel regularization matrix
can be replaced by a discussion of the use of the DCF to point to a
separate FITS extension containing this matrix, stored as an image
extension. A new DCF function class can be defined for this case. One
or more DS*l_ns* keywords would be used to point to the FITS extension
or image to be used.

In general the DCF can be any class of function, either defined as a stand-alone DCF or by a world function. Examples are a simple multidimensional polynomial (PLY), a one-dimensional spline, a fully sampled discrete function (as for a fully sampled wave-vs-flux 1D spectrum), or a 2D pixel regularization matrix. The class of DCF is defined by CTYPE.

Where possible (i.e., where dimensionality and space permits), the parameters for a DCF should be stored in DV+DS header keywords. If a numeric 1 or 2D array is needed this can be pointed to using DS keywords. If possible the array should be stored in the same FITS extension as the WCS. This would be the case, for example, for a 1 or 2D spectrum using either a polynomial or spline dispersion, or a 1D spectrum using a fully sampled wave+flux array. If the DCF vector is too large to be stored in DV header keywords, a binary table representation can be used, using DS keywords to point to the table row or column (other table rows or columns would be used for the flux vector and so on).

To fully encapsulate a DCF or world function term and avoid having the set of all possible WCS keywords depend upon detailed knowledge of all possible present and future DCF or world functions, all parameters or other information needed to define a given function instance should be passed via the DV+DS or PV+PS keywords rather than by defining new global WCS keywords. The only exceptions to this currently are the LONPOLE and LATPOL keywords used by the celestial projections.

Since the DCF term is (in general) independent of the world-function used, it could be described either in a separate paper, in Paper I, or in the description of a world function (e.g. Paper II or III). In particular the N-dimensional polynomial, spline, sampled, and pixel regularization matrix representations are generally applicable to any world function and could be described in a separate WCS paper.

A key point here is that, for the purposes of representing the DCF term
in Paper I, *all we need do is define the formal representation of the
DCF term in terms of the mathematical model and the CTYPE, DV, and DS
keywords*. All of the above-mentioned cases can be defined outside
Paper-I as applications of the basic WCS representation to different types
of data. Simple WCS can omit the DCF term entirely.

The documents "Functional Corrections and Axes Coupling in FITS WCS" , "Proposal for FITS WCS Dimensionality" and "Spectral WCS Conventions" provide additional detail regarding the above proposals. A record of the discussions leading to the development of the proposals presented above will be found here .

Doug Tody, Frank Valdes, Lindsey Davis

June 30, 2001