2 Basic Concepts and Terminology

 2.1 Transformations
 2.2 Mappings
 2.3 Transformation Functions

2.1 Transformations

The TRANSFORM facility stores the information which it requires for conversion between different coordinate systems in HDS structures called transformations. They have an HDS type of TRN_TRANSFORM1 and the purpose of each of these structures is to describe the relationship which exists between two different coordinate systems. The two systems in question are termed the input and output coordinate systems and the HDS transformation structure serves to “link” them together as a pair. In this role, the transformation may be regarded simply as a “black box”, thus:

PICT

Positions (or points) in each coordinate system will be specified by appropriate sets of coordinates, and the purpose of the transformation is to define an “association” between corresponding points in each system. Thus, given the coordinates of a point in one system, the coordinates of the associated point in the other system may be derived by using the information stored in the transformation structure.

2.1.1 Transformation variables.

The inter-conversion of coordinates in this way between two different 2-dimensional systems (e.g. between Equatorial and Galactic sky coordinates) is a familiar concept. In general, however, there is no need for the two coordinate systems to be 2-dimensional, nor even for both of them to have the same dimensionality. To cater for this general case, each transformation has a set of input and output variables associated with it. They are represented here by (x1, xm) and (y1, yn) respectively, where the numbers of input and output variables (m and n) may be any positive integer – not necessarily equal. These variables are akin to the “dummy arguments” used in Fortran subroutines and are the means by which coordinate values are passed to and from the transformation; they may be visualised as a set of input and output ports attached to it, as follows:

m input values x1 x2 x m
Forward
PICT
Inverse
y1 y2 y n n output values

Any coordinate values supplied to the ports (i.e. variables) at either end of the transformation may be converted into a corresponding set of “transformed” coordinates (using the information within the transformation), to be delivered through the ports (i.e. variables) at the opposite end.

As with subroutine arguments, the names assigned to the input/output variables have no absolute significance outside the transformation itself, and coordinate values must be supplied in the correct order (typically within a data array, for instance) in order to “match up” with the appropriate transformation variables. In practice, of course, when describing a transformation, it is convenient to retain meaningful names for its variables; these may then be referred to using the usual notation as (α, δ) or (x, y, z), etc., so that the expected order is clear.

2.2 Mappings

The most important part of any transformation is a pair of “numerical recipes” which provide a description of the precise numerical steps which must be carried out in order to perform coordinate conversion in each direction. These “recipes” are termed the forward and inverse mappings.2 It will frequently be possible to define both of these, so that coordinate conversion may be performed in either direction. However, this may not always be possible (or desirable), so a transformation may also exist even if only one of its two possible mappings is defined. In this case, coordinate conversion will only be possible in one direction.

As will be seen later, it is often convenient to extract the mappings from a transformation and to process them as separate entities.

2.2.1 Notation

A general transformation with m input variables and n output variables, in which both the forward and inverse mappings are defined, is denoted here by [m n]. The double-ended arrow ‘ ’ indicates that coordinate conversion is possible in either direction. Similarly, the notation [m n] and [m n] is used to represent transformations where only the forward or inverse mapping (respectively) is defined, so that coordinate conversion can be performed only in the direction indicated. This notation may also be used to describe individual transformations by including a list of their input and output variables. Thus, a transformation which relates a Cartesian coordinate system to a Polar system might be denoted by [(x, y) (r, θ)].

To distinguish transformations from mappings, the notation for the latter uses braces ‘{…}’ rather than square brackets, so that a mapping which describes how to convert a set of m input values into a set of n output values would be denoted by {m n}. In this case, the arrow may only point to the right because a single mapping, once separated from its parent transformation, can only perform coordinate conversion in one direction. This is always regarded as its “forward” direction.

2.3 Transformation Functions

In principle, the value of each of a transformation’s output variables may depend on the values supplied to all of its input variables. Consequently, a general transformation’s forward mapping may only be specified in full by giving a complete set of transformation functions which define the precise form of this dependence for each of the output variables. The same consideration also applies to the inverse mapping. Thus, in general, a transformation’s two mappings may be decomposed into a set of nforward transformation functions (denoted F1, Fn) and a set of minverse transformation functions (denoted I1, Im) which act upon the input and output variables, as follows:

Forward  y1 =F1(x1, x2, xm) y2 =F2(x1, x2, xm) yn =Fn(x1, x2, xm) Inverse  x1 =I1(y1, y2, yn) x2 =I2(y1, y2, yn) xm =Im(y1, y2, yn) (1)
Example 1. Drawing graphs.

A simple illustration of mappings, transformation functions and the notation used to describe them may be taken from the [2 2] transformation commonly used to relate “data” coordinates (xd, yd) to “graph paper” coordinates (xp, yp) when drawing a graph. If the graph is linear, then the transformation’s two mappings might typically be defined by the following transformation functions:

Forward mapping  xp =Sx(xd x0) yp =Sy(yd y0) Inverse mapping  xd =(xp/Sx) + x0 yd =(yp/Sy) + y0 (2)

where x0 and y0 are zero points on the two axes, and Sx and Sy are scale factors. In this example, (xd, yd) have been treated as input variables, while (xp, yp) are output variables. This particular choice is arbitrary, although a convention would have to be adopted before writing software which used such a transformation.

Using the notation outlined above, this simple transformation would be denoted by:

(xd, yd) (xp, yp)

i.e. with the input variables appearing on the left. The forward mapping would then be denoted by:

(xd, yd) (xp, yp)

and the inverse mapping by:

(xp, yp) (xd, yd)

1Full internal details of all the HDS structures used by the TRANSFORM facility are given in Appendix C.

2Note that the term mapping is used here with its usual mathematical meaning, whereas the (mathematically synonymous) term transformation is reserved to represent a more complex structure which may contain both a forward and inverse mapping, as well as possible ancillary information. The two terms should not be confused.