2 Attaching modified coordinates using CCDPACK

For users of Starlink software, the calibrated coordinate information can be attached automatically to image files using the ASTIMP command, and the file INT-WFC.ast. This file is distributed in the CCDPACK package (in directory $CCDPACK_DIR, or bin/ccdpack).

To use this facility, it is best if the files are first converted to Starlink NDF format using the CONVERT package as follows:

  % convert
  
     CONVERT commands are now available -- (Version 1.5-4)
  
     Defaults for automatic NDF conversion are set.
  
     Type conhelp for help on CONVERT commands.
     Type "showme sun55" to browse the hypertext documentation.
  
  % fits2ndf in=’r10628?.fits’ out=’*’ container=true

which will convert the FITS file r106280.fits into the NDF r106280.sdf and so on. The Starlink software will in fact work with FITS files, but because it converts them on the fly between FITS and NDF formats before and after each command, this can be rather slow with files the size of WFC frames.

Once the file is in Starlink NDF format, from the Unix C shell do the following:

  % ccdpack
  
     CCDPACK commands are now available -- (Version 4.0-16)
  
    For help use the commands ccdhelp or ccdwww
  
  % astimp in=’r10628?’ astfile=$CCDPACK_DIR/INT-WFC.ast reset accept
  
      ASTIMP
      ======
    Framesets read from file INT-WFC.ast:
      FITS header "ROTSKYPA" used for rotation
  
       N    Base domain         Current domain      Frameset ID
       --   -----------         --------------      -----------
       1    PIXEL               INT-WFC             FITSID CHIPNAME ’A5506-4’
       2    PIXEL               INT-WFC             FITSID CHIPNAME ’A5383-17-7’
       3    PIXEL               INT-WFC             FITSID CHIPNAME ’A5530-3’
       4    PIXEL               INT-WFC             FITSID CHIPNAME ’A5382-1-7’
    4 NDFs accessed using parameter IN
  
    Processing NDF /data/cass58a/mbt/data/int4/r106280
      Matched with frameset ID "FITSID CHIPNAME ’A5506-4’"
      Rotating additional 180 degrees
      New frame in domain "INT-WFC" added
  
    Processing NDF /data/cass58a/mbt/data/int4/r106281
      Matched with frameset ID "FITSID CHIPNAME ’A5383-17-7’"
      Rotating additional 180 degrees
      New frame in domain "INT-WFC" added
  
    Processing NDF /data/cass58a/mbt/data/int4/r106282
      Matched with frameset ID "FITSID CHIPNAME ’A5530-3’"
      Rotating additional 180 degrees
      New frame in domain "INT-WFC" added
  
    Processing NDF /data/cass58a/mbt/data/int4/r106283
      Matched with frameset ID "FITSID CHIPNAME ’A5382-1-7’"
      Rotating additional 180 degrees
      New frame in domain "INT-WFC" added

This command sets the Current coordinate frame of the specified NDF files to the new coordinate system (x, y) described above. As well as applying the linear and nonlinear geometry terms whose coefficients were given, it also rotates the coordinates according to the value of the ROTSKYPA FITS header card, which records the orientation of the turntable when the observation was made; in this case it was oriented at 180. In this way, applying the INT-WFC.ast file to any set of image NDF files will result in them sharing coordinates which are related by a simple shift in X and Y coordinates, since the nonlinear optical distortions, the exact positioning of the CCDs on the turntable, and the orientation of the turntable itself will have been accounted for.

Once the new coordinate system has been attached to the images, then most Starlink applications will make use of this as appropriate. If you display any of the images using KAPPA’s DISPLAY application, the axes will show the coordinates in the new frame as in figure 3:

  % kappa
  
     KAPPA commands are now available -- (Version 0.13-7)
  
     Type kaphelp for help on KAPPA commands
     Type "showme sun95" to browse the hypertext documentation
  
  % display r106282 style=’"grid=1,gap=500"’


pdfpict

Figure 3: Display of a single CCD image with coordinates grafted onto it using ASTIMP. Close inspection will show that the grid is not quite parallel to the sides of the image, or straight, because of the slight rotation from the vertical and nonlinear distortion.


If some of the frames overlap, the corresponding X and Y offsets can then easily be determined using CCDPACK’s object matching registration facilities.