Representations of Celestial Coordinates in FITS a Linear Transformation Matrix
Total Page:16
File Type:pdf, Size:1020Kb
Astronomy & Astrophysics manuscript no. ccs June 13, 2018 (DOI: will be inserted by hand later) Representations of celestial coordinates in FITS Mark R. Calabretta(1) and Eric W. Greisen(2) 1 Australia Telescope National Facility, P.O. Box 76, Epping, NSW 1710, Australia 2 National Radio Astronomy Observatory, P.O. Box O, Socorro, NM, USA 87801-0387 Draft dated 17 Jul 2002 Abstract. In Paper I, Greisen & Calabretta (2002) describe a generalized method for assigning physical coordinates to FITS image pixels. This paper implements this method for all spherical map projections likely to be of interest in astronomy. The new methods encompass existing informal FITS spherical coordinate conventions and translations from them are described. Detailed examples of header interpretation and construction are given. Key words. methods: data analysis – techniques:image processing – astronomical data bases: miscellaneous – astrometry 1. Introduction PIXEL COORDINATES This paper is the second in a series which establishes conven- linear transformation: CRPIXja tions by which world coordinates may be associated with FITS translation, rotation, PCi_ja (Hanisch et al., 2001) image, random groups, and table data. skewness, scale CDELTia Paper I (Greisen & Calabretta, 2002) lays the groundwork by developing general constructs and related FITS header key- PROJECTION PLANE words and the rules for their usage in recording coordinate in- COORDINATES formation. In Paper III, Greisen et al. (2002) apply these meth- spherical CTYPEia ods to spectral coordinates. Paper IV (Calabretta et al., 2002) projection PVi_ma extendsthe formalism to deal with generaldistortions of the co- ordinate grid. This paper, Paper II, addresses the specific prob- NATIVE SPHERICAL lem of describing celestial coordinates in a two-dimensional COORDINATES projection of the sky. As such it generalizes the informal but spherical CRVALia widely used conventions established by Greisen (1983, 1986) coordinate LONPOLEa for the Astronomical Image Processing System, hereinafter re- rotation LATPOLEa arXiv:astro-ph/0207413v1 19 Jul 2002 ferred to as the AIPS convention. CELESTIAL SPHERICAL Paper I describes the computation of world coordinates as COORDINATES a multi-step process. Pixel coordinates are linearly transformed to intermediateworld coordinatesthat in the final step are trans- Fig. 1. Conversion of pixel coordinates to celestial coordinates. The formed into the required world coordinates. intermediate world coordinates of Paper I, Fig. 1 are here interpreted as projection plane coordinates, i.e. Cartesian coordinates in the plane In this paper we associate particular elements of the inter- of projection, and the multiple steps required to produce them have mediate world coordinates with Cartesian coordinates in the been condensed into one. This paper is concerned in particular with plane of the spherical projection. Figure 1, by analogy with the steps enclosed in the dotted box. Fig. 1 of Paper I, focuses on the transformation as it applies to these projection plane coordinates. The final step is here di- vided into two sub-steps, a spherical projection defined in terms The original FITS paper by Wells et al. (1981) intro- of a convenient coordinate system which we refer to as native duced the CRPIX ja1 keyword to define the pixel coordinates spherical coordinates, followed by a spherical rotation of these (r1, r2, r3,...) of a coordinate reference point. Paper I retains native coordinates to the required celestial coordinate system. this but replaces the coordinate rotation keywords CROTAi with 1 The single-character alternate version code “a” on the various Send offprint requests to: M. Calabretta, FITS keywords was introduced in Paper I. It has values blank and e-mail: [email protected] A through Z. 2 Mark R. Calabretta and Eric W. Greisen: Representations of celestial coordinates in FITS a linear transformation matrix. Thus, the transformation of be made to support older FITS-reading programs. Section 7 pixel coordinates (p1, p2, p3,...) to intermediate world coor- discusses the concepts presented here, including worked exam- dinates (x1, x2, x3,...) becomes ples of header interpretation and construction. N xi = si mi j(p j r j) , (1) 2. Basic concepts = − Xj 1 N 2.1. Spherical projection = (simi j)(p j r j) , As indicated in Fig. 1, the first step in transforming (x, y) co- = − Xj 1 ordinates in the plane of projection to celestial coordinates is where N is the numberof axes givenby the NAXIS keyword. As to convert them to native longitude and latitude, (φ, θ). The suggested by the two forms of the equation, the scales si, and equations for the transformation depend on the particular pro- matrix elements mi j may be represented either separately or in jection and this will be specified via the CTYPEia keyword. combination. In the first form si is given by CDELTia and mi j by Paper I defined “4-3” form for such purposes; the rightmost PCi ja; in the second, the product simi j is given by CDi ja. The three-characters are used as an algorithm code that in this pa- two forms may not coexist in one coordinate representation. per will specify the projection. For example, the stereographic Equation (1) establishes that the reference point is the ori- projection will be coded as ‘STG’. Some projections require gin of intermediate world coordinates. We require that the lin- additional parameters that will be specified by the FITS key- ear transformation be constructed so that the plane of projec- words PVi ma for m = 0, 1, 2,..., also introduced in Paper I. / tion is defined by two axes of the xi coordinate space. We will These parameters may be associated with the longitude and or refer to intermediate world coordinates in this plane as pro- latitude coordinate as specified for each projection. However, jection plane coordinates, (x, y), thus with reference point at definition of the three-letter codes for the projections and the (x, y) = (0, 0). Note that this does not necessarily correspond to equations, their inverses and the parameters which define them, any plane defined by the p j axes since the linear transformation form a large part of this work and will be discussed in Sect. 5. matrix may introduce rotation and/or skew. The leftmost four characters of CTYPEia are used to identify Wells et al. (1981) established that all angles in FITS the celestial coordinate system and will be discussed in Sect. 3. were to be measured in degrees and this has been entrenched by the AIPS convention and confirmed in the IAU-endorsed 2.2. Reference point of the projection FITS standard (Hanisch et al., 2001). Paper I introduced the CUNITia keyword to define the units of CRVALia and CDELTia. The last step in the chain of transformations shown in Fig. 1 is Accordingly, we require CUNITia = ‘deg’ for the celes- the spherical rotation from native coordinates, (φ, θ), to celes- tial CRVALia and CDELTia, whether given explicitly or not. tial2 coordinates (α, δ). Since a spherical rotation is completely Consequently, the (x, y) coordinates in the plane of projection specified by three Euler angles it remains only to define them. are measured in degrees. For consistency, we use degree mea- In principle, specifying the celestial coordinates of any par- sure for native and celestial spherical coordinates and for all ticular native coordinate pair provides two of the Euler an- other angular measures in this paper. gles (either directly or indirectly). In the AIPS convention, the For linear coordinate systems Wells et al. (1981) prescribed CRVALia keyword values for the celestial axes3 specify the ce- that world coordinates should be computed simply by adding lestial coordinates of the reference point and this in turn is as- the relative world coordinates, xi, to the coordinate value at sociated with a particular point on the projection. For zenithal the reference point given by CRVALia. Paper I extends this by projections that point is the sphere’s point of tangency to the providing that particular values of CTYPEia may be established plane of projection and this is the pole of the native coordinate by convention to denote non-linear transformations involving system. Thus the AIPS convention links a celestial coordinate predefined functions of the xi parameterized by the CRVALia pair to a native coordinatepair via the referencepoint. Note that keyword values and possibly other parameters. this association via the reference point is purely conventional; In Sects. 2, 3 and 5 of this paper we will define the func- it has benefits which are discussed in Sect. 5 but in principle tions for the transformation from (x, y) coordinates in the plane any other point could have been chosen. of projection to celestial spherical coordinates for all spherical Section 5 presents the projection equations for the transfor- map projections likely to be of use in astronomy. mation of (x, y) to (φ, θ). The native coordinates of the refer- The FITS header keywords discussed within the main body ence point would therefore be those obtained for (x, y) = (0, 0). of this paper apply to the primary image header and image ex- However, it may happen that this point lies outside the bound- tension headers. Image fragments within binary tables exten- ary of the projection, for example as for the ZPN projection of sions defined by Cotton et al. (1995) have additional nomencla- Sect. 5.1.7. Therefore, while this work follows the AIPS ap- ture requirements,a solution for which was proposedin PaperI. proach it must of necessity generalize it. Coordinate descriptions may also be associated with the ran- 2 Usage here of the conventional symbols for right ascension and dom groups data format defined by Greisen & Harten (1981). declination for celestial coordinates is meant only as a mnemonic. It These issues will be expanded upon in Sect. 4. does not preclude other celestial systems.