To combine registration information from different sources, you can use the routine
It is not always possible to register a group of images in a single step, using one kind of procedure. For instance you might have a large group of images with an approximate SKY coordinate system inserted by the observing system, of which some but not all overlap with each other. In this case we would like to register the overlapping ones using the object-matching techniques described in section , but fall back to the tolerably accurate SKY coordinates to align the rest of the images. WCSREG can do just this. You give it a number of images, and a list of coordinate systems it can use to make the connections, and if it's possible to align them all using only these coordinate systems it will do so, adding a new coordinate system labelled `CCD_WCSREG' to them all. In the above example you would write something like
Where there is a choice between coordinate systems to use for alignment, ones given earlier in the DOMAINS list are preferred. The square brackets around the named domains are required here because it is an array of strings.% wcsreg in='image*' domains='[ccd_reg,sky]'
The new coordinate system added is a copy of (and so has the same units as) the PIXEL coordinate system of the reference image, which is normally the first one listed. Because of this, if you have a set of images which are already aligned, but in an unsuitable coordinate system, you can align them in a pixel-sized coordinate system using WCSREG. Giving a null (`!') value for the list of domains will automatically use the current attached coordinates of the reference image for alignment, so that running
will ensure the group of already registered images regdat* keeps its existing alignment, but in a coordinate system in which a unit is pixel-sized. This can be a useful trick prior to resampling, since the resampling program TRANNDF will resample so that a pixel of the output image is one unit square; for this reason resampling directly into a SKY coordinate system, in which a unit is one radian, is bound to give a useless result.% wcsreg in='regdat*' domains='!'
In many cases it will be possible to align a set of images in one step without worrying about these sorts of procedure. For the more complicated cases where coordinate information of varying levels of accuracy and completeness is available from several different sources however, WCSREG, in conjunction with the other programs described in this section, provides powerful facilities for making use of this information. Some examples of them at work can be found in the examples section.