next previous
Up: Representations of celestial coordinates


Subsections

   
Appendix B: Mathematical methods

B.1 Coordinate rotation with matrices

The coordinate rotations represented in Eqs. (2) or (5) may be represented by a matrix multiplication of a vector of direction cosines. The matrix and its inverse (which is simply the transpose) may be precomputed and applied repetitively to a variety of coordinates, improving performance. Thus, we have

\begin{displaymath}\left( \begin{array}{c} l \\ m \\ n \end{array} \right) =
\l...
... l^{\prime} \\ m^{\prime} \\ n^{\prime}
\end{array} \right) ,
\end{displaymath} (B.1)

where

\begin{eqnarray*}(l',m',n') & = & (\cos\delta\cos\alpha,\cos\delta\sin\alpha, \s...
...m p} \cos\delta_{\rm p} , \\
r_{33} & = & \sin\delta_{\rm p} .
\end{eqnarray*}


The inverse equation is

\begin{displaymath}\left( \begin{array}{c} l^{\prime} \\ m^{\prime} \\ n^{\prime...
...ht)
\left( \begin{array}{c} l \\ m \\ n \end{array} \right) .
\end{displaymath} (B.2)

B.2 Iterative solution

Iterative methods are required for the inversion of several of the projections described in this paper. One, Mollweide's, even requires solution of a transcendental equation for the forward equations. However, these do not give rise to any particular difficulties.

On the other hand, it sometimes happens that one pixel and one celestial coordinate element is known and it is required to find the others; this typically arises when plotting graticules on image displays. Although analytical solutions exist for a few special cases, iterative methods must be used in the general case. If, say, p2 and $\alpha$ are known, one would compute pixel coordinate as a function of $\delta$ and determine the value which gave p2. The unknown pixel coordinate elements would be obtained in the process.

This prescription glosses over many complications, however. All bounded projections may give rise to discontinuities in the graph of p2 versus $\delta$ (to continue the above example), for example where the meridian through $\alpha$ crosses the $\phi = \pm180\hbox{$^\circ$ }$ boundary in cylindrical, conic and other projections. Even worse, if the meridian traverses a pole represented as a finite line segment then p2 may become multivalued at a particular value of $\delta$. The derivative $\partial p_2/\partial\delta$will also usually be discontinuous at the point of discontinuity, and it should be remembered that some projections such as the quad-cubes may also have discontinuous derivatives at points within their boundaries.

We will not attempt to resolve these difficulties here but simply note that WCSLIB (Calabretta, 1995) implements a solution.


next previous
Up: Representations of celestial coordinates

Copyright ESO 2002