Representations of Celestial Coordinates in FITS
Total Page:16
File Type:pdf, Size:1020Kb
A&A 395, 1077–1122 (2002) Astronomy DOI: 10.1051/0004-6361:20021327 & c ESO 2002 Astrophysics Representations of celestial coordinates in FITS M. R. Calabretta1 and E. W. Greisen2 1 Australia Telescope National Facility, PO Box 76, Epping, NSW 1710, Australia 2 National Radio Astronomy Observatory, PO Box O, Socorro, NM 87801-0387, USA Received 24 July 2002 / Accepted 9 September 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 p COORDINATES j This paper is the second in a series which establishes conven- linear transformation: CRPIXja r j tions by which world coordinates may be associated with FITS translation, rotation, PCi_ja mij (Hanisch et al. 2001) image, random groups, and table data. skewness, scale CDELTia si Paper I (Greisen & Calabretta 2002) lays the groundwork by developing general constructs and related FITS header key- PROJECTION PLANE x words and the rules for their usage in recording coordinate in- COORDINATES ( ,y) formation. In Paper III, Greisen et al. (2002) apply these meth- spherical CTYPEia (φ0,θ0) ods to spectral coordinates. Paper IV (Calabretta et al. 2002) projection PVi_ma Table 13 extends the formalism to deal with general distortions 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) 0 0 coordinate LONPOLEa φp LATPOLEa for the Astronomical Image Processing System, hereinafter re- rotation θp 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 intermediate world coordinates that 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. For later reference, the math- Fig. 1 of Paper I, focuses on the transformation as it applies ematical symbols associated with each step are shown in the box at to these projection plane coordinates. The final step is here di- right (see also Tables 1 and 13). vided into two sub-steps, a spherical projection defined in terms of a convenient coordinate system which we refer to as native spherical coordinates, followed by a spherical rotation of these The original FITS paper by Wells et al. (1981) intro- 1 native coordinates to the required celestial coordinate system. duced the CRPIX ja keyword to define the pixel coordinates (r1, r2, r3,...)ofacoordinate reference point. Paper I retains 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. Article published by EDP Sciences and available at http://www.aanda.org or http://dx.doi.org/10.1051/0004-6361:20021327 1078 M. R. Calabretta and E. W. Greisen: Representations of celestial coordinates in FITS this but replaces the coordinate rotation keywords CROTAi with Section 6 considers the translation of older AIPS conven- a linear transformation matrix. Thus, the transformation of tion FITS headers to the new system and provisions that may pixel coordinates (p1, p2, p3,...)tointermediate world coor- be made to support older FITS-reading programs. Section 7 dinates (x1, x2, x3,...) becomes discusses the concepts presented here, including worked exam- ples of header interpretation and construction. N xi = si mij(p j r j), (1) − 2. Basic concepts Xj=1 N 2.1. Spherical projection = (simij)(p j r j), − Xj=1 As indicated in Fig. 1, the first step in transforming (x,y) coor- dinates in the plane of projection to celestial coordinates is to where N is the number of axes given by the NAXIS keyword. As convert them to native longitude and latitude, (φ, θ). The equa- suggested by the two forms of the equation, the scales si,and tions for the transformation depend on the particular projection matrix elements mij may be represented either separately or in and this will be specified via the CTYPEia keyword. Paper I combination. In the first form si is given by CDELTia and mij by defined “4–3” form for such purposes; the rightmost three- PCi ja; in the second, the product simij is given by CDi ja.The characters are used as an algorithm code that in this paper will two forms may not coexist in one coordinate representation. specify the projection. For example, the stereographic projec- Equation (1) establishes that the reference point is the ori- tion will be coded as STG. Some projections require additional gin of intermediate world coordinates. We require that the lin- parameters that will be specified by the FITS keywords PVi ma ear transformation be constructed so that the plane of projec- for m = 0, 1, 2,..., also introduced in Paper I. These parame- tion is defined by two axes of the xi coordinate space. We will ters may be associated with the longitude and/or latitude co- refer to intermediate world coordinates in this plane as pro- ordinate as specified for each projection. However, definition jection plane coordinates,(x,y), thus with reference point at of the three-letter codes for the projections and the equations, (x,y) = (0, 0). Note that this does not necessarily correspond to their inverses and the parameters which define them, form a any plane defined by the p j axes since the linear transformation large part of this work and will be discussed in Sect. 5. The matrix may introduce rotation and/or skew. leftmost four characters of CTYPEia are used to identify the ce- Wells et al. (1981) established that all angles in FITS lestial 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 FITS standard (Hanisch et al. 2001). Paper I introduced the 2.2. Reference point of the projection 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 coordinate pair via the reference point. 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.