TPV World Coordinate System

The TPV World Coordinate System is a non-standard convention following the rules of the WCS standard. It builds on the standard TAN projection by adding a general polynomial distortion correction. The description here covers the application of the distortion function and assumes the reader understands the FITS WCS rules including applying the linear transformation to intermediate coordinates and applying a tangent plane projection to the distortion corrected intermediate coordinates. The reference for the FITS WCS standard for undistorted celestial coordinate systems is Representations of celestial coordinates in FITS Calabretta, M. R., and Greisen, E. W., Astronomy & Astrophysics, 395, 1077-1122, 2002. (PDF, HTML). Reprints are available from the author's web site in PDF format.

Historically this WCS derives from an earlier proposal by Calabretta and Greisen in a draft for the celestial coordinates paper. In that proposal the TAN projection would be extended with the optional distortion polynomial. It would be up to the code to identify the presence of the PV keywords and apply the distortion. Since the final standard does not provide for a distortion to the tangent plan projection, the proposal is recast by simply defining a new WCS identifier and publishing it as the convention given here.

Evaluation Steps

The TPV projection is evaluated as follows.

  1. Compute the first order standard coordinates xi and eta from the linear part of the solution stored in CRPIX and the CD matrix.
             xi = CD1_1 * (x - CRPIX1) + CD1_2 * (y - CRPIX2)
            eta = CD2_1 * (x - CRPIX1) + CD2_2 * (y - CRPIX2)
    
  2. Apply the distortion transformation using the coefficients in the PV keywords as described below.
            xi' = f_xi (xi, eta)
           eta' = f_eta (xi, eta)
    
  3. Apply the tangent plane projection to xi' and eta' as described in Calabretta and Greisen . The reference tangent point given by the CRVAL values lead to the final RA and DEC in degrees. Note that the units of xi, eta, f_xi, and f_eta are also degrees.

Distortion Functions

The distortion functions shown as f_xi and f_eta above are defined as follows where the variable r is sqrt(xi^2+eta^2). In this convention there are only odd powers of r.
     xi' = PV1_0 + PV1_1 * xi + PV1_2 * eta + PV1_3 * r +
           PV1_4 * xi^2 + PV1_5 * xi * eta + PV1_6 * eta^2 +
           PV1_7 * xi^3 + PV1_8 * xi^2 * eta + PV1_9 * xi * eta^2 + PV1_10 * eta^3 + PV1_11 * r^3 +
           PV1_12 * xi^4 + PV1_13 * xi^3 * eta + PV1_14 * xi^2 * eta^2 + PV1_15 * xi * eta^3 + PV1_16 * eta^4 +
	   PV1_17 * xi^5 + PV1_18 * xi^4 * eta + PV1_19 * xi^3 * eta^2 +
	   PV1_20 * xi^2 * eta^3 + PV1_21 * xi * eta^4 + PV1_22 * eta^5 + PV1_23 * r^5 +
           PV1_24 * xi^6 + PV1_25 * xi^5 * eta + PV1_26 * xi^4 * eta^2 + PV1_27 * xi^3 * eta^3 +
	   PV1_28 * xi^2 * eta^4 + PV1_29 * xi * eta^5 + PV1_30 * eta^6
           PV1_31 * xi^7 + PV1_32 * xi^6 * eta + PV1_33 * xi^5 * eta^2 + PV1_34 * xi^4 * eta^3 +
	   PV1_35 * xi^3 * eta^4 + PV1_36 * xi^2 * eta^5 + PV1_37 * xi * eta^6 + PV1_38 * eta^7 + PV1_39 * r^7
    eta' = PV2_0 + PV2_1 * eta + PV2_2 * xi + PV2_3 * r +
           PV2_4 * eta^2 + PV2_5 * eta * xi + PV2_6 * xi^2 +
           PV2_7 * eta^3 + PV2_8 * eta^2 * xi + PV2_9 * eta * xi^2 + PV2_10 * xi^3 + PV2_11 * r^3 +
           PV2_12 * eta^4 + PV2_13 * eta^3 * xi + PV2_14 * eta^2 * xi^2 + PV2_15 * eta * xi^3 + PV2_16 * xi^4 +
	   PV2_17 * eta^5 + PV2_18 * eta^4 * xi + PV2_19 * eta^3 * xi^2 +
	   PV2_20 * eta^2 * xi^3 + PV2_21 * eta * xi^4 + PV2_22 * xi^5 + PV2_23 * r^5 +
           PV2_24 * eta^6 + PV2_25 * eta^5 * xi + PV2_26 * eta^4 * xi^2 + PV2_27 * eta^3 * xi^3 +
	   PV2_28 * eta^2 * xi^4 + PV2_29 * eta * xi^5 + PV2_30 * xi^6
           PV2_31 * eta^7 + PV2_32 * eta^6 * xi + PV2_33 * eta^5 * xi^2 + PV2_34 * eta^4 * xi^3 +
	   PV2_35 * eta^3 * xi^4 + PV2_36 * eta^2 * xi^5 + PV2_37 * eta * xi^6 + PV2_38 * xi^7 + PV2_39 * r^7

Note that missing PV keywords default to 0 except for PV1_1 and PV2_1 which default to 1. With these defaults if there are no PV keywords the transformation is the identity and the TPV WCS is equivalent to the standard TAN projection. Also the defaults mean that the provider need only include the coefficients to the order desired. Similarly, the function may use only terms in powers of r which then mimics the standard ZPN projection.

This convention only defines coefficients up to 39 corresponding to a maximum polynomial order of 7.

To implement the inverse transformation requires inverting the distortion functions. But using a standard iterative numerical inversion based on the first derivative of the functions is not difficult. The derivatives of these functions are straightforward to express and evaluate.