Image Statistics Analysis System


Every image analysed by the elixir system is first entered into a database, the Image Registration database, Imreg.db. This database records the image name, location of the image file on the Elixir disks, and other basic data about the image. The details of the database, and the tools for manipulating it, are discussed in detail elsewhere (Image Database). Most of the statistics recorded in Imreg.db are available from the image header (ie, data & time) or from external sources (ie, the various dome temperatures). Some of the information, however, must be derived from the image data array. These measurements are performed by the 'imstats' elixir. The imstats elixir determines three major statistics for each image: bias, median sky, fwhm. The statistics are then incorporated back into Imreg.db, the image registration database. At CFHT, the imstats elixir also includes a function to pass these data to the QSO database system. This analysis performed by imstats is normally done on images as quickly as possible after the image is obtained at the telescope. In the discussion below, we describe the various files produced for each image which contain useful data. These files have endings which depend on the data type. The rest of the file name is constructed on the basis of the image file name. In the discussion below, we use the abbreviation 'filename.ext' to substitute for a specific example.


The first module of imstats is a small program called 'imstats'. This program has three functions. First, it measures the bias value and sky value from the overscan and data portions of the image. Next, it writes these values to a temporary file (filename.sdat) for use by later programs. Finally, it extracts a small subraster (filename.split) of the image which it passes to the next module to measure the image quality statistics. Only a subraster is extracted to speed up both I/O and the calculation of the seeing. The subraster is limited to a maximum of 1500 x 1500 pixels, which generally contains enough stars to obtain a good measure of the seeing. If the input image is smaller in either dimension that 1500, the subraster uses the full available pixels in that dimension.


The second module of imstats measures the FWHM of the subrastered image and writes the value to an output file. In fact, this module checks the image header and write the value 0.0 if the image is not an image of the night sky, that is to say, the image type keyword (OBSTYPE at CFHT) must be set of OBJECT. This module uses the program sextractor to perform the measurement of the FWHM. The sextractor measurement is performed only to a limited depth on the image and the measured objects are written to a file with a the name filename.stat. Each object measured has an associated FWHM. The job of determining the true seeing for the image based on the collection of observed object shapes falls to the next two programs.


The program imstatqso calculates the seeing from the FWHM list in filename.stat. It determines the image odometer ID, and loads the data from filename.sdat. Finally, it passes these pieces of information to the QSO database system. The QSO database records only a single value for each mosaic image, while the Elixir systems have a separate entry for each CCD. Thus, imstatqso first check the CCD number and gracefully exists for any CCD other than a specific reference chip. For CFH12K, we use chip 03 for all seeing measurements. This is a chip near the detector center, and is traditionally used for focusing. Note also that imstatqso converts the seeing to arcsec from pixels before passing it to the QSO database.


The final module of imstats is the imstatreg program. This program load the data from filename.stat & filename.sdat, calculates the seeing (using the same algorithm as imstatqso) and records these values in the Imreg.db. For this step, it is necessary that the image already be registered in the Imreg.db by an earlier step. Imstatreg makes the association between the current image and CCD on the basis of the exposure time and the CCD number.


TODO: provide some typical times for analysis of each CCD.