Next: Error Estimation in Elliptical Isophote Fitting
Previous: Massively Parallel Spatially-Variant Maximum Likelihood Image Restoration
Table of Contents --- Search --- PS reprint


Astronomical Data Analysis Software and Systems V
ASP Conference Series, Vol. 101, 1996
George H. Jacoby and Jeannette Barnes, eds.

CCDPHOT---An IDL Widget Based CCD Photometry Reduction System

Marc W. Buie

Lowell Observatory, 1400 W. Mars Hill Rd., Flagstaff, AZ 86001

Abstract:

This paper describes IDL software developed to aid in the reduction of CCD images to point-source photometry. This description covers the version of software as of October 1995. This software is in a continual, albeit slow, state of development. Updates and additional documentation are maintained and available via anonymous ftp and WWW access.

1. Introduction

The IDL (Interactive Data Language, RSI, Boulder, CO) environment and language provides many powerful but low-level tools for the manipulation of data. Its generality permits many types of quick analyses at the expense of detailed and customized handling of large amounts of similar data. In fact, even the simple steps of displaying and manipulating CCD images on a workstation screen are cumbersome given the display primitives provided by IDL.

With the assistance of programmer, D. Loucks, I have developed a data reduction system intended for extracting synthetic aperture photometry from CCD images. Most of the basic steps performed in this software are not particularly unique and are well known and understood by most observational astronomers. However, the collection of all these tools into a tightly integrated and graphically oriented interface leads to a significant increase in throughput when reducing large numbers of CCD images. This paper is meant to provide an overview of the main functions of this system. Detailed documentation on how to use the software to full advantage is beyond the scope of this document.

This software system has two principal user interfaces. ITOOL handles all aspects of image display and photometry. CCDPHOT takes care of reading FITS files and processing the image data and passing all relevant information to ITOOL. Each of these tools is more fully described in the following sections.

2. CCDPHOT

CCDPHOT is a specialized front-end program that is written to understand how to read CCD image data from FITS files, how to calibrate the image data, how to extract the required ancillary information, and finally pass the data on to ITOOL for display and photometric extraction.

By default, CCDPHOT looks in the current directory for image files but the user can enter a relative or absolute path to any file or use the ``Select File'' browser button to select an image. The path for images can be overridden by a keyword parameter when CCDPHOT is invoked. This mechanism is important when reading from read-only directories (e.g., CD-ROM) so that output files from this program can be written to the current (write-access) directory.

Some information needs to be provided in the FITS header to facilitate the reduction steps handled by this program. The user can provide a keyword correspondence file to allow the program to decode the needed information. Table 1 shows the contents of an example correspondence file.

 

The first column in Table 1 indicates the information by the name CCDPHOT requires. The second column indicates the type of information in this line (T = decoding Template and K = Keyword). The last column provides the FITS keyword name to look for in the header (if K) or the standard template for decoding information. The DATETMPL value allows providing a template for decoding different styles of date presentation. Many more keywords could be scanned for to provide even more interpretation of the image but this set was deemed to be the minimum useful set needed for doing aperture photometry.

The data on disk is usually kept as raw data files which are usually 2-byte integer data. Upon reading the header and data from disk, CCDPHOT performs the calibration sequence guided by the information in the calibration setup file. The resulting image is then a 32-bit floating point image but is kept in memory and discarded when the next image is loaded.

The CCD calibration information is contained in a file, usually one file for every night of data. CCDPHOT automatically looks for a sub-directory calib in the data directory. If the file files.cal is found in this directory, then it is read and the calibration files are thus loaded. Table 2 shows an example calibration file.

The leading `` +'' in the calibration file indicates to look for the file in the same directory where files.cal was found. If the files are found, all flats, biases, and darks are loaded into memory for later use. The extra level of indirect directory pointers was added to accommodate working with read-only storage media such as recordable CD-ROM where an absolute path name to the calibration area cannot be known beforehand.

Having completed the calibration steps, the final image is passed to ITOOL along with all the decoded header information. For files of the form rootname.NNN where the suffix is a three digit integer, CCDPHOT can single step through the data from a night by just clicking the ``Next'' button. This make it very easy to scan through a set of bias, dark, or flat images with full calibration to check the quality of the calibration information.

3. ITOOL

ITOOL is a general purpose image display and manipulation tool. It is written following the guidelines of a compound widget allowing multiple copies to run simultaneously if desired. This tool knows nothing about file I/O and requires the image data to be provided as pre-defined IDL variables. It can either be run from the IDL command prompt (e.g., itool,array) or run from another program as a compound widget ( cw_itool).

All of the image manipulation functions are available regardless of how the program is used. However, the photometry tools are of limited use unless ITOOL is called from another program. A considerable amount of information needs to be collected to permit sensible photometric reductions (e.g., exposure time, start time of exposure, filter). By using a specialized calling program that understands the data being analyzed, the information can be collected and passed to ITOOL in a more standard format.

Once the image is sent to ITOOL by CCDPHOT, the user usually spends the rest of their time interacting with the image. The functionality of ITOOL is loosely patterned after the most important functions and layout of the popular image display program SAOIMAGE. Some difficulties do exist in implementation caused by limitations of IDL (such as the complete lack of keyboard driven input events). Nonetheless, this system is quite fast, easy to use, and has become the key to keeping up with my regular program of photometric observations of Near-Earth Asteroids which generates up to 6 nights of CCD photometry per month. The system is also simple enough for new student helpers to master and perform useful work in a matter of days.

Some of the more often used functions provided by ITOOL are:

The option of template photometry allows the user to define a star pattern (such as a Landolt standard field) that can then be used again by clicking on the location of the anchor object. The manual sky option (also known as comet photometry) permits the user to roam the entire image interactively collecting small segments of sky signal in those cases where the object morphology precludes the use of standard circular aperture extractions.

One important feature contained in the template photometry system is the ability to track ``small'' but systematic motions of a program object between successive CCD images without having to retrain the template. For slow moving objects in the outer solar system, the use of this template tracking and the subsequent astrometry has proven to be a quicker method of finding the moving object than using more traditional blinking techniques. This functionality is also essential for doing on-chip differential CCD photometry of moving objects.

4. Availability

All of these procedures, as well as numerous support routines, are available via anonymous ftp from ftp.lowell.edu under pub/buie/idl. Versions relevant to different releases of IDL are baselined in this directory as well. Additional and more up-to-date information regarding these programs will be maintained on my WWW page as time allows---start browsing from http://www.lowell.edu/users/buie.

Acknowledgments:

Support for this software development was spread over many sources, including STScI grants GO--03848.01--91A and GO--03769.02--91A, NASA grants NAGW--3397, NAGW--1912, and NAGW--3210.


Next: Error Estimation in Elliptical Isophote Fitting
Previous: Massively Parallel Spatially-Variant Maximum Likelihood Image Restoration
Table of Contents --- Search --- PS reprint
Wed Jul 3 07:30:29 MST 1996