Evaluating and Reducing SOI Images
In this section we discuss the software and observing procedures needed for the following:
- How to evaluate the observations as they are obtained at the telescope, including how to display SOI images and how to examine the delivered image quality,
- Calibration data that should be obtained at the telescope, and
- How to reduce the images.
Observers familiar with CCD cameras, images obtained using the NOIRLab Mosaic cameras, and the IRAF reduction and analysis software for the most part will find the processing of SOI images to be familiar. At the same time, there are some differences that we touch upon briefly here. To start with, SOI images are recorded in a special multi-extension FITS format (MEF). In brief, the SOI CCDs are saved as individual images grouped together as separate entities in a larger FITS file; only at the end of the reduction are the CCDs assembled as a single large astronomical image. Because of this special format, most IRAF routines will not work directly on the full SOI files. To provide for processing of the SOI format, as well as reduction and analysis tasks specific to SOI, we use some of the MSCRED IRAF routines that were developed for the Mosaic cameras in addtion to having developed some SOI specific IRAF routines. Almost all of the software tasks that we discuss below presume that you will be working within this environment.
A key factor that drives both the data taking and reduction of SOI images is the presumption that the final astronomical exposure will be built from a number of SOI images obtained by dithering the telescope. This places strong demands on the quality of the data reduction to ensure the uniformity of the photometric response of the reduced image. We have custom scripts we use for reducing SOI data; please contact the SOI instrument scientist (Sean Points) to obtain, install and run them on your system.
NOTE: These packages have been quasi-independently developed by astronomers at SOAR, CTIO and MSU. They contain slightly different versions of the same tasks. So it is recommended to download one or the other packages, but not both. For non-expert IRAF MSCRED users, it is advised that the MSU routines be downloaded.
An excellent summary of the MSCRED reduction routines is provided in the two guides written by Frank Valdes: Mosaic Data Reduction System and the Guide to the NOAO Mosaic Data Handling System. The latter link is available in the IRAF/MCSRED package by the command "help mscguide". We encourage SOI users to read through these documents before attempting to reduce their data for the first time. These guides also provide a thorough description of all MSCRED tasks that may be of use during the night's observing.
The SOAR Optical Imager data format is a multi-extension FITS (MEF) file. The file contains five FITS header and data units (HDU). The first HDU, called the primary or global header unit, contains only header information which is common to all the CCD images. The remaining four HDUs, called extensions, contain the header and images from the four amplifiers on the two CCDs.
The fact that the image data is stored as FITS format images is not particularly significant. A single FITS format image file may be treated in the same way as any other IRAF image format. The significant feature is the multi-extension nature of the data format. This means that commands that operate on images need to have the image or images within the file specified. Only commands specifically intended to operate on MEF files, such as those in the MSCRED package, can be used by simply specifying the file name. Commands that operate on files rather than images, such as copying a file, may be used on MEF files. In general, it is safest to use only MSCRED commands on MEF files. IRAF V2.11 is required to run MSCRED. The basic syntax for specifying an image in a MEF file to an IRAF task is:
where "filename" is the name of the file. The ".fits" extension does not need to be used. The "extension" is the name of the image. For the SOI data the 4 CCD images have the names "im1" through "im4" (but the simple "1" through "4" works, too). The extension position in the file (where the first extension is 1) may also be used. To access the global header (for listing or editing) the extension number is 0; i.e. filename.fits.
There is currently no wildcard notation for specifying a set of extensions. So to apply an arbitrary IRAF command that takes a list of images you must either prepare an @list (or type the list explicitly) or use the special MSCCMD command. The task MSCCMD takes an IRAF command with the image list parameter replaced by the special string "$input". The input list of SOI files will then be expanded to a list of image extensions.
During observing, a small set of IRAF commands are commonly used to examine the data. This section describes these common commands. While this section is oriented to examining the data at the telescope during the course of observing, the tools described here are also used when reducing and analyzing the data at a later time.
The two IRAF commands DISPLAY and MSCDISPLAY are used to display the images in DS9. DS9 and an IRAF command window should be running on the data analysis GUI. The DISPLAY task is used to display individual images - in this context, the individual amplifiers in a SOI exposure designated by the appropriate extension ID. There are many display options that are discussed in the help page that will not be discussed here. The only special factor in using this task with the SOI data is that you must specify which image to display using the image extension syntax discussed previously. As an example (see Figure 12), the central portion of extension im2 (i.e., AMP#2) in displayed in the first frame of a DS9 window using the IRAF DISPLAY command and the whole image is displayed in the second frame of a DS9 window using the IRAF MSCDISPLAY command:
- mscred> disp obj.064.fits 1 zs+
- mscred> mscdisp obj.064.fits 2 zs+
Figure 12: (left) A DS9 image display of the second SOI amplfier using the IRAF DISPLAY command. (right) A DS9 image display of an entire image using the IRAF MSCDISPLAY command.
The MSCDISPLAY task is based on DISPLAY with a number of specialized enhancements for displaying MEF data. It displays the entire MEF observation in a single frame by "filling" each image in a tiled region of the frame buffer. The default filling (defined by the order parameter) subsamples the image by uniform integer steps to fit the tile and then replicates pixels to scale to the full tile size. The resolution is set by the frame buffer size defined by the "stdimage" variable.
Many of the parameters in MSCDISPLAY are the same as DISPLAY and there are also a few that are specific to the task of displaying a mosaic of CCD images. The mapping of the pixel values to gray levels includes the same automatic or range scaling algorithms as in DISPLAY. This is done for each image in the mosaic separately. The new parameter "zcombine" then selects whether to display each image with it's own display range ("none") or to combine the display ranges into a single display range based on the minimum and maximum values ("minmax"), the average of the minimum and maximum values ("average"), or the median of the minimum and maximum values. The independent scaling may be most appropriate for raw data while the "minmax" scaling is recommend for processed data. Another new optional answer here is "auto", which is the default, will try to use the best option, given the status of the data.
During your nightly observing, MSCDISPLAY is normally used during image acquisition to insure that your object is centered at the desired location and that it does not lie in the chip gap between the CCDs. In order to measure the delivered image quality of an exposure, one normally uses the IRAF DISPLAY and IMEXAM commands to measure the FWHM and the ellipticity of stars in the field. The FWHM can be compared to the seeing reported by the Cerro Pachón seeing monitor (you need to be connected to the VPN to access this link). If the measured image quality is consirably worse than the site seeing, you may want to re-tune the mirror. Another measure of the image quality is the ellipticity of stars in the observed field. If the ellipticity, as measured by the IMEXAM command, is greater than 0.15 you may want to re-tune the mirror. The telescope operators normally tune the mirror at the beginning of the night. After that, it is the observer's responsibility to check the image quality and request that the mirror be re-tuned.
In general the only calibration data that one needs to obtain at the telescope are Bias frames, and Flats (Dome and/or Twilight Sky). These data are obtained by clicking on the appropriate tab in the Data Acquisition Region of the Data Acquisition GUI. This will set the proper "OBSTYPE" keyword (i.e., ZERO, DOMEFLAT, or SKYFLAT) in the FITS headers for your calibration data.
Click here for table of exposure times and lamp intensities that will allow you to take dome flats with a peak intensity of ~20000 counts for most filters. When taking twilight sky flats, one should start observing as soon as you can after sunset, and take at least 5 twilight sky flats per filter. As soon as the peak counts for a particular filter are below ~30000, we recommend taking a series of exposures until either the peak counts drop below ~10000 or you have enough twilight sky flats to reduce your data.
Fringing with SOI
The only other calibration data one will likely need to obtain at the telescope are sky frames for fringing correction. As any thinned, back illuminated chip the SOI E2V devices suffer from considerable fringing in the Bessel I, SDSS-i and SDSS-z bands. Fringing is most evident in longer exposures. Depending on the nature of your science targets you can take either of two approaches to approach obtaining the fringing correction images:
1) If your field is sparse and contains mostly/only stars (maybe a few faint, small galaxies), then you can use the same science frames to construct the master fringe removal frame. All that is needed is to carry out the observation as a series of dithered/offset observations, which you will later median-combine without registering (after the basic bias subtraction and flatfielding). This will eliminate all stars and leave only the sky background with the fringe pattern - see the examples in this page. Just make sure you dither/offset by at least 10 arcsec between each exposure.
2) If you are imaging an extended object which covers a significant part of your field, like a large galaxy, or you are looking at a very crowded stellar field, the previous approach will not work. In this case you should offset to a nearby "empty" field (sparse stellar field) to take your sky data. Again, you need to split your total exposure time among at least 3, preferably 5 exposures, that you will then median-combine; dither at least 10 arcsec between each frame. Ideally, your total "empty" sky image should have an integration time equal to your science frame.
It is important to bear in mind the the fringing pattern will not be the same across all the sky or all position angles, so for the best fringe removal, you should create the master fringe frame using either the same science data or images obtained in the same general area of the sky.
Removal of the fringing pattern is done by applying the master fringe frame as an illumination correction to the data that have been already bias-subtracted and flatfielded.
More details can be found in these links on fringing correction:
- Basis for a SOAR Imager pipeline (Maia et al 2011)
This section assumes that either the NOIRLab SOI reduction package or the MSU SOI reduction package has been downloaded and successfully installed on your local reduction computer. If not, please contact the SOI instrument scientist (Sean Points) for help.
The first step in reducing SOI data should be to perform the BIAS scan and TRIM section corrections. The values for BIASSEC and TRIMSEC are given in the FITS headers for each amplifier. Please see the IRAF MSCRED CCDPROC help pages for further information. After all of the images are Bias-subtracted and Trimmed, the Zero (or Bias) frames should be combined into a master bias for the night using the IRAF mscred.zerocombine task. After this step, the flats and object images should be Zero-corrected by setting the appropriate flags in mscred.ccdproc. Combine the dome flats and if necessary twilight flats, depending on the filter. Apply the Flat-field correction for your data using mscred.ccdproc. You should now be ready to perform photometry on your SOI data.
Updated on July 8, 2021, 4:44 am