TN 0022: Applying World System Coordinates Parameters To TASS FITS Headers

Author: Glenn Gombert
Date: 961220
Revision: #0 961220
Key Words: FITS, astrometry

After doing a little research into the WCS (World Coordinate System) for TASS FITS headers it appears that there is a lot of benefits to be gained by developing an automated method for adding WCS parameters to TASS FITS headers. Once this is accomplished it provides a general astrometric solution for each TASS image and also opens up the possibility of several suites of tools that are available over the Internet to be used to analyze and reduce TASS images.

The WCS parameters appear to have the origin in the Radio Astronomy community where large data gathering project for the VLA (Very Large Array) and the VLBA (Very Long Baseline Array) need to coordinate (and in some cases like the VLBA project) combine and synchronize data taken at various installations around the world. More recently this parameters have found their way into use in the optical astronomical community and several packages outline below have incorporated the use of WCS parameters into image data reduction and analysis programs.

One of these packages is the ATFTOOLS package that is available from the University of Iowa's Automated Telescope Facility. This package has tools for editing FITS headers and automatically calculating the necessary WCS parameters to use the rest of the ATFTOOLS package automated photometric and image analysis tools. Among such things that are available are programs to automated the differential photometric measurements that are necessary to make light curves for variable stars, measuring similar images to detect stars that are in one image and not in another and several programs for determining absolute photometric solutions from images taken through U,V,B,R,I filters. This suite of programs has been compiled to run under Linux as well as Windows95/NT.

The ATFTOOLS package is available from:

"http://www-astro.physics.uiowa.edu/software.html"

Several program descriptions of the programs are outlined below:

Also outlined below are several other tools that allow detailed analysis of images once WCS parameters have been added to FITS headers. These include a version of SAO image and the European Southern Observations "SkyCat" (Sky Catalog Tool).

  1. World Coordinate Systems in SAOimage (version 1.8)

    SAOimage can deal with three WCS modes: 8 of the standard FITS WCS types, Digital Sky Survey plate solutions, and an approximate WCS if a plate center and scale are given. imwcs has been developed to set the WCS of an image by matching stars images to a catalog, such as the HST Guide Star Catalog, with a no user interaction. The subroutine library, libwcs, used by SAOimage is available for inclusion in other programs.

    Keyboard and Cursor Access to World Coordinate Systems

    If WCS information is present in the FITS image header, SAOimage versions from 1.12 track world coordinate systems as well as pixel coordinates within the image. In versions 1.17 and after, spatial WCS information is extracted from IRAF .imh (OIF) images as well. Two single character keyboard commands have been added: c prints the world coordinate (RA and Dec as hh:mm:ss.sss dd:mm:ss.ss and Lat Long as dd.ddddddd.ddddd) and image pixel coordinate, along with the value of that pixel to standard output. w executes the command set by -wcscom command_%s, substituting that same world coordinate string for %s. Example 1. To append the WCS position for the current cursor location to a file using a one-line script, savepos.sh:

         echo $1 $2 >>coord.list
    
         Execute SAOimage 
    
         saoimage -wcscom savepos.sh_%s wcsimage.fits
    

    Whenever you click w, the WCS position for the current cursor location will be added to the file coord.list.

    Example 2. To use RGSC to identify all HST Guide Stars within 30 arcseconds of the cursor, run SAOimage

         saoimage -wcscom rgsc_-rad_0:00:30_%s
    

    Whenever you click w, RGSC will list any stars within 30 arcseconds of the current cursor location. The output format and filtering characteristics can be set by editing the RGSC parameter file.

    SAOimage versions from 1.14 add three more WCS key commands. In versions 1.14 through 1.17, they print the oordinates to standard output. In later versions, they change both the trackingwindow and the c key continues to print whatever is in the tracking window.

         b displays the current cursor coordinates in the B1950 (FK4) system. 
         j displays the current cursor coordinates in the J2000 (FK5) system. 
         g displays the current cursor position in galactic latitude and longitude. 
    

    SAO Image is available from:

         "http://tdc-www.harvard.edu/software/saoimage.html"
    
  2. . European Southern Observatory's SkyCat Features:
         * Open and visualize a variety of FITS images including support for
    World Coordinate System (WCS),
         interactive measurement of offsets and other standard visualization
    functions (SAOimage-like); 
         * Overlay and edit color graphic objects on the image, like `tagging'
    sources with text, arrows, circles or other graphic elements such as masks; 
         * Display a world coordinates based grid over the image with the
    resolution given in arcseconds. 
         * Display a compass indicating where north and east are in the image,
    based on the world coordinates information. 
         * PostScript color printing of the display (image + graphics); 
         * Access and load an image from a network server of the Digitized Sky
    Survey scans; 
         * Access and load catalog information from a number of popular
    astronomical catalogs like the HS, Guide Star Catalog and others; 
         *  Access local user catalogs. 
         *  Save catalog data locally. 
         *  Overlay catalog sources on an image; 
         *  Interact with Netscape to display more object information when
    available (support for Mosaic may be
         added in a future release); 
         * Access the observations catalog from the NTT, HST and CFHT Science
    Archives; 
         * Access to SIMBAD and NED both as name resolves as well as for
    information on known objects; 
         * Retrieve preview and other compressed images and decompress them on
    the fly. 
         * Retrieve and plot tabular preview data for a selected object as an
    X/Y graph. 
         * Calculate, display and plot the center position, FWHM, angle and
    other information for 
            a selected star/object. 
         * Load compressed images in hcompress, gzip or unix compress format. 
         * Access SkyCat features from a remote process via socket interface or
    Tk "send". 
         * Access image header and data (FITS format) via SysV shared memory or
    mmap. 
         * Interact with WWW browser to access catalog documentation and other
    documents. 
    
    
         *  Astrometry: SkyCat handles the astrometric positions by translating
    pixel positions into equatorial  coordinates (RA, DEC). This translation is
    based on WCS (World Coordinate System FITS keywords that are included in the
    image header and that give the astrometric solution for the image. The
    accuracy  of the solution varies because, in many cases, an approximation is
    used. 
    
         * Colors: If you are running netscape or some other color intensive
    applications before you start  SkyCat, you may get some color flashing when
    you move the mouse in and out of the SkyCat image window. This is because
    SkyCat is using a private colormap to get enough colors to display the
    image. You can get around this problem by starting netscape with the
    "-ncols" option: for example: 
    
               netscape -ncols 60 &
    

    European Southern Observatories "SkyCat" Tool is available from:

             "http://arch-http.hq.eso.org/skycat/"
    
  3. IRAF

    Recently the image matching add-on package "immatch" has several tools that have been specifically designed to manipulate and align images with catalogs the Hubble Guide Star once the appropriate parameters have been added to FITS headers.

    Calculating WCS Parameters For TASS FITS Headers:

    The calculation of WCS parameters TASS FITS header files depend upon knowing the APPROXIMTAE center of the image in both RA and DEC. Norman's tm3get.xx program calculates this value based on where the TASS Mark III cameras are pointing and the value for declination that is contained in the TASS FITS header. These values are then used to select a region from the Hubble Guide Star catalog to be used to compare with the 25 brighest stars that are detected in the TASS image and are used to calculate the necessary WCS parameters.

    After experimenting with the calculation of WCS parameters for several TASS images and images taken with a SBIG ST-6 ccd camera and a 16 inch F/4.5 Newtonian Telescope the center of the image specified by RA and DEC parameters in the FITS header written out by tm3get.xx must be at-least 25-30 % coverage of the image for the star matching program WCS.exe to have enough bright stars in the image to compare with the HGSC data.

    Several parameters need to be inserted into the header for the WCS.exe to operate properly. These include the XFACTOR and YFACTOR parameters that specify the image scale per pixel (13.8 in arch seconds) for each TASS image. With Norman's new program tm3get11.exe these parameters should be able to be automatically added to each TASS image so that they do not have to be added (manually ) to a night's data collection run later.

    There has been some good discussion here recently on how accurate it is possible to align TASS cameras and have Normand's program calculate them automatically. Tom and several others have pointed out that it should be possible (with careful alignment) to get within +/1/2 degree in both RA and DEC with some careful alignment of each TASS camera installation.

    A sample output from the ATFTOOL kits WCS.exe program using a TASS image taken the last week in November here in Dayton would look like:

    	input: WCS.exe -owv 31t0421.232 
    
    	output: 
    		  31t0421.232:
    		  CTYPE1 = RA---TAN
    		  CRVAL1 = 314.827
                                  CDELT1 = -0.003832
    		  CRPIX1 = 400
    		  CROTA1 = 0
    		  CTYPE2 = DEC--TAN
    		  CRVAL2 = 0.837672
    		  CDELT2 = -0.003832
    		  CRPIX2 = 448
    		  CROTA2 = -1.66439
    		  RA=21:02:38.4 DEC=  0:00:17 W=800 H=896 ArcSecs/Pixel=13.7952
    		  found 6519 GSC stars
    	                found 427 image stars
    		  using only 25 brightest GSC stars
      		  using only the 25 brightest image stars
    		  6 bin hits
    		  Delta  RA:  0:03:20 = 217.295 pixels
    		  Delta Dec:  -0:49:59 = -217.36 pixels
    		  Rotation:  1.66439 degrees
    		  CTYPE1 = RA---TAN
    		  CRVAL1 = 314.827
    		  CDELT1 = -0.003832
    		  CRPIX1 = 400
    	    	  CROTA1 = 0
    		  CTYPE2 = DEC--TAN
    		  CRVAL2 = 0.837672
    		  CDELT2 = -0.003832
    		  CRPIX2 = 448
    		  CROTA2 = -1.66439
    		  31t0421.232: rewritten successfully.
    

    Conclusions:

    Thus it should be possible to calculate the WCS parameters for TASS images using the new WCS parameters. The ATFTOOL kit allows the WCS.exe program to be run in 'batch' mode for a nights data collection run. The only thing that will have to be done carefully is to align each individual TASS camera installation so that the RA and DEC of each image is centered with-in +/- 1/ 2 degree or so.

    Once this is accomplished we should be able to make use of a powerful new suite of tools outlined above to make (automated) data reduction and analysis of TASS images more feasible than it has been in the past. I have taken just the first step or two in utilizing TASS WCS parameters, but they should become powerful tools for data analysis both for the present and future generations of TASS camera operators and data reduction efforts.