In previous versions of CCDPACK a different method was used for registration, which relied only on object matching and stored coordinate mapping information in TRANSFORM (SUN/61) structures in the CCDPACK extension of the images. If you are used to this way of doing things do not despair! In the first place, the object matching methods appear to work just the same as before (i.e. a CCDPACK script which used to perform registration, resampling and combination should still do so), although the routines are now storing coordinate system information in a different way. Furthermore, all the programs retain their ability to read transformation information written as TRANSFORM structures, for backward compatibility with files which have already been partially processed by CCDPACK.
The applications FINDOFF, REGISTER, TRANLIST, and TRANNDF write and (by default) read coordinate system information using coordinate systems attached to images, but retain options which allow them to read the old TRANSFORM structures on request.
All the things which can be done using TRANSFORM structures however can be as well or better done with attached coordinate systems, and the ability of CCDPACK programs to read TRANSFORM structures may be withdrawn altogether in a future release.
If the old method of handling coordinate transformations is used they are stored in HDS – SUN/92 – objects known as ‘transform structures’. These objects are produced by the TRANSFORM – SUN/61 – package and contain a full description (in an algebraic form which may be examined using the HDSTRACE – SUN/102 – utility, or more concisely by the KAPPA application TRANTRACE) of the transformation. Usually transform structures are written into the CCDPACK part of the extension of the image to which they apply (under the item TRANSFORM) and can be accessed without any further action. Note that if you are using a foreign format of some kind then CCDPACK arranges to store this information in amongst the general header items (as it does for all other extension information it relies on) and you should check these if required (none of the methods described here will actually work for foreign data types).
An example trace of a transform structure is shown next:
Note that a full transform is defined with a forward and an inverse mapping (these are produced
automatically by CCDPACK when using linear transforms). All transformations (and positions) are
stored in double precision. The number of variables is two for the forward and inverse functions (
YY). Finally the transformation is classified so that future applications know its properties and
may take action to speed up or stop processing if a required property is not apparent (CCDPACK
produces classifications for linear transformations).
As explained in §8.2.5, when a position list is associated with an image which has suitable coordinate systems attached to it, explicit transformation of positions in the list is usually not necessary, since the CCDPACK programs which use the lists will transform them into the Current coordinate system automatically.
When dealing with the old TRANSFORM-based methods however this can be required, and it may occasionally be wanted when using the new coordinate system methods, for instance for examination of image coordinates by a human or a program other than a CCDPACK one, or if position lists are still needed for some reason after the image is resampled. In these cases, the coordinates of each point in a position list can be transformed using the routine:
TRANLIST can use transformations expressed in four different forms:
The first method uses the usual format for passing transformation information between CCDPACK applications and the second uses the format which served that purpose in previous versions of CCDPACK. The third uses the coefficients of a linear transform and the fourth allows you to transform a list using the algebraic expressions which are understood by the TRANSFORM package (SUN/61).
Transforming positions using transform structures is usually straight-forward, provided you’ve registered your data and entered this information into the images using REGISTER, or have added coordinate systems or TRANSFORM structures in some other way.
Transforming positions selected from one dataset (say using the IDICURS application) to a reference coordinate system (or vice-versa), is fairly straight-forward given registered datasets. It is also possible to transform to the coordinates of another dataset. The sequence of commands for this operation goes like:
image.approxand associated with the image.
img.accwhich is now associated with the image.
The final command is more complex as the mapping to be used is not associated with the image with which the position list to be transformed is associated, so it is necessary to give the location of the WCS component where the coordinate system information can be found. This exemplifies why storing the transformations in a standard way that all the CCDPACK applications know about is such a good idea.
Using linear coefficients is a quick way of applying offsets, scales and rotations to data. The linear transform form is:
TR(1-6) correspond to the coefficients you give to TRANLIST. The identity transformation is
[0,1,0,0,0,1] which corresponds to the coefficients
an offset in X and Y would be
[TR(1),1,0,TR(4),0,1]. Scaling uses the
TR(2,3,5, & 6) coefficients.
Rotation uses the coefficients:
is the angle to rotate (counter-clockwise). So a rotation of 45 degrees counter-clockwise about
General transformations are expressed in a ‘Fortran-like’ form and may use the functions
LOG10 and many others which are listed in SUN/61 appendix A. An
example of using this capability is to transform positions by a parameterised pin-cushion
This also shows how to use sub-expressions to reduce complex formulae to more manageable levels (
y are offset and scaled to some arbitrary level and now masquerade as
fy). This also allows
quick modifications since only the values of the parameters need to be changed on re-runs. Note that a
coordinate system representing a pincushion distortion could be added instead to an image using
WCSEDIT (described in §8.3).