What is your primary IRAF system?2720 votes | 19 comments
TNX World Coordinate System
TNX World Coordinate System
The TNX World Coordinate System is a non-standard system for evaluating
celestial coordinates from the image pixel coordinates. It follows the
the FITS conventions for undistorted tangent plane projections but adds
a non-linear distortion term to the evaluation. This discussion concentrates
on the non-linear extension and assumes the reader understands the FITS
WCS conventions including applying a tangent plane projection. The
reference for the FITS WCS standard for undistorted celestial coordinates
systems is
Representations of celestial coordinates in FITS Calabretta, M. R., and
Greisen, E. W.,
Astronomy & Astrophysics, 395, 1077-1122, 2002. (PDF,
HTML).
(These links to the publisher's web site are currently available by
subscription only. Reprints are available from the author's web site in PDF
format.)
The TNX World Coordinate System projection has a FITS keyword representation
as illustrated in figure 1.
The WCSASTRM keyword is just for documentation. The WCSDIM keyword will
always be 2. That this is a TNX projection is indicated by the CTYPE
keywords. These keywords also indicate that the first image axis corresponds
to RA and the second to DEC.
The TNX projection is evaluated as follows.
Compute the first order standard coordinates xi and eta from the linear
part of the solution stored in CRPIX and the CD matrix.
Add the non-linear part of the projection using the coefficients
in the WAT keywords as described below.
xi' = xi + lngcor (xi, eta)
eta' = eta + latcor (xi, eta)
Apply the standard tangent plane projection to xi' amd eta' using the CRVAL
values as the tangent point to get the RA and DEC in degrees. Note that
the units of xi, eta, lngcor, and latcor are also degrees.
The non-linear functions lngcor(xi,eta) and latcor(xi,eta) are polynomial
functions with coefficients stored as FITS keywords under the indexed
WATj_nnn keywords. The j refers to the image axis and the nnn give a
sequence number. The cards for a particular image axis are sorted by
the sequence number and then concatenated together into one long string.
Take care not to add spaces between the concatenated strings since the
coefficients may be split across strings.
The long string for each image axis is composed of a set of keyword/value
pairs where the value is quoted if it contains whitespace. Figure 2 shows
the how the WAT keywords in figure 1 would be decomposed into parameters
and coefficients.
Figure 2: Decomposing the WAT keywords from figure 1
The list of coefficients are interpreted as follows.
The first number is the function type encoded as 1=chebyshev,
2=legendre, 3=polynomial. The example has a function of type 3 which is
the simple polynomial.
The next two numbers represent the "order" of the function in xi and eta.
The order is the one less than the highest polynomial power. The powers
are represented below by m and n such at m = 0 to xiorder-1 and
n = 0 to etaorder-1. In the example the orders are 4 which means
cubic polynomials (m=0 to 3 and n=0 to 3).
The next (fourth) number specifies the type of cross-terms encoded as
0=no cross-terms, 1=full cross-terms, 2=half-cross terms. The cross-terms
are terms of xi^m*eta^n where m and n are non-zero. Full cross-terms mean
that both m and n will go to the their maximum values independently while
half-cross terms mean that m + n will only go to the maximum of xiorder-1
and etaorder-1.
The next 4 numbers describe the region of validity of the fits in
xi and eta space, e.g. ximin, ximax, etamin, etamax. They are used
to compute normalized values for xi and eta used in the chebyshev and
legendre polynomial functions:
The remaining terms are the coefficients of the polynomial terms.
The functions are evaluated by summing polynomial terms Pmn(xi,eta)
multiplied by the coefficients Cmn as
lngcor(xi,eta) = sum (Cmn * Pmn(xi,eta))
latcor(xi,eta) = sum (Cmn * Pmn(xi,eta))
Representing the coeffients as Cmn for the polynomials Pmn, where
m and n are the powers of xi and eta, they are ordered as
In the example with the half cross-terms and orders of 4 the ten
coefficients would be C00, C10, C20, C30, C01, C11, C21, C02, C12, and C03.
The polynomials Pmn are defined below. The chebyshev and legendre
polynomials are define iteratively as functions of the normalized
coordinates defined earlier.