In this example, we have a set of mutually overlapping images which already contain approximately correct SKY coordinates, attached by the observing system. We would like to fine-tune this alignment by matching image features.
We begin by setting SKY as the Current coordinate system for all the images (they may be in this state anyway but it doesn't hurt to make sure):
Since the SKY (now Current) coordinates are approximately right, they take account of any rotations of the telescope between exposures, so that the images are effectively related by a simple offset, which means the automated object matching programs can be used. Additionally, since we know the offset is small, we can tell FINDOFF (by setting the RESTRICT parameter) to look for matching objects only in the regions which ought to overlap, which makes it faster and less prone to finding a false match.% wcsedit in='data*' mode=current frame=sky
The REGISTER program adds a new pixel-like coordinate system labelled CCD_REG to all the images. We can now resample all the images into these coordinates, which aligns them pixel-for-pixel, and combine them into a mosaic.% findobj in='data*' outlist='*.obj' % findoff inlist='data*' outlist='*.off' restrict=true % register inlist='data*'
Finally, we set the Current coordinate system of the mosaic to SKY, so that when it is displayed RA and Dec coordinates will be shown.% tranndf in='data*' out='*-r' % makemos in='data*-r' out=mosaic
% wcsedit in=mosaic mode=current frame=sky
CCDPACK