CCDPACK provides the routine
To examine the coordinate systems attached to an image, you can use WCSEDIT with the parameter MODE set to SHOW; for example:
This shows that there are five coordinate systems in the image and that number 4, labelled `SKY' is the Current one. Note that the first three coordinate systems attached to an image are always GRID, PIXEL and AXIS. SKY is not always present but if it is, it should always represent a celestial coordinate system. GRID and PIXEL always have units the same size as that of a pixel (the difference is that GRID is guaranteed to start at (1,1)).% wcsedit obs1 show WCSEDIT ======= 1 NDF accessed using parameter IN Index Cur Domain Title ----- --- ------ ----- obs1: 1 GRID Data grid indices; first pixel at (1,1) 2 PIXEL Pixel coordinates; first pixel at (0.5,0.5) 3 AXIS Axis coordinates; first pixel at (0.5,0.5) 4 * SKY FK5 equatorial coordinates; mean equinox... 5 CCD_REG Alignment by REGISTER
For the other modes (add, remove, current and set) of WCSEDIT you need to specify a given coordinate system, the `target', for WCSEDIT to work with. This is given using the FRAME parameter, and you can use one of the following formats:
To change the coordinate system to be used as the Current one therefore, simply write something like:
or just% wcsedit in='image*' mode=current frame=pixel
which will set the Current coordinate system of all the image files indicated to pixel coordinates. Since the PIXEL coordinates are in some sense the native ones, if you set Current to PIXEL in this way the images will behave in most respects as if they had no attached coordinate systems at all.% wcsedit 'image*' current pixel
Syntax for removing coordinate systems is much the same:
will remove the fourth (as listed by wcsedit show) coordinate system from file image.% wcsedit image remove 4
When adding a new coordinate system you must give the transformation which connects it to the target coordinate system. The transformation can be one of the following types:
% wcsedit 'image*' add frame=focal domain=squashed maptype=pincushion coeffs='[-7e-6,1000,1000]'
It's also possible to make fine adjustments to the coordinate systems attached to an image using the SET mode, for example:
changes the name of the Current coordinate system to `OBS1'. For more sophisticated use of this feature, see the documentation of WCSEDIT in appendix §, and of the AST_SET routine in SUN/210.% wcsedit file1 set frame='!' set='domain=obs1'
When run, WCSEDIT will log what it has done, giving the domain of the altered coordinate system where appropriate (even if it was specified in some other way). If it could not perform the requested action on any of the images in the list, an appropriate message will be written, but this does not consitute a fatal error. However, it does write an list to an output file (by default called WCSEDIT.LIS), giving the names of only those images which were successfully accessed, which normally means those which had a coordinate system matching that given by the FRAME parameter. So it's easy to find out which images were successfully modified:
This name list file can be used as an indirection file to pass to the input of another CCDPACK task. For instance, if you want to do an interactive alignment of only those files which have coordinate systems with the name ``FOCAL'', you could follow the above command with this:% wcsedit 'data?' current focal WCSEDIT ======= 4 NDFs accessed using parameter IN data1: Current frame set to domain FOCAL data2: Target frame 'focal' not found NDF not modified data3: Current frame set to domain FOCAL data4: Current frame set to domain FOCAL % cat WCSEDIT.LIS data1 data2 data4
% pairndf '^WCSEDIT.LIS'