Introduction to Imaging

by David Hogg
revised and extended by Andrew Walker



Contents


Using IRAF

To begin, fire up IRAF from your home directory, then 'cd' to the directory you wish to work in. You will be displaying the images with SAOimage and you will first need to set this image display to handle images of the necessary size, using the command set stdimage=imt1024, where the numeric suffix will depend on the size of images you have taken. If your frames are still in FITS format they should first be converted to IRAF format using the dataio.rfits task in IRAF. Set the datatype parameter to real using epar rfits, to avoid later problems with integer division.

Preprocessing Images

Before you can begin to analyse the images you have taken you need to preprocess them. This involves removing the ``signature'' inherent to every CCD by using calibration frames. There are several types of calibration image, although you may not need to use them all: It is important to recognise that for optimal results the colour balance of the flat-field source should be as close as possible to that of the object of interest. This can be difficult to achieve, especially with broadband filters. As a result flat-fielding represents only a compromise and is not a substitute for intrinsic device uniformity. The best results attainable for flat-fielding are typically around 0.3 to 0.5 percent.

Your preprocessed object frame is made, assuming negligible dark current, by the following:

                         (raw frame  - bias frame)
    preprocessed frame = -------------------------
                         (flat-field - bias frame)
The processing can be done using the images.imarith task in IRAF, which provides the basic arithmetic operators for manipulating images. Type help imarith in IRAF for a full description.

As a final step the images can be trimmed to remove any useless rowsor columns within the overscan region, which may cause problems in the later photometric analysis. This can be done using the images.imcopy task, specifying the region to be retained in the name of the input file (e.g. NGC_7790[20:500,10:400]).

At this point you should have preprocessed your images and are now ready to begin the task of data reduction. Although there is a version of DAOPhot built into IRAF you are advised to use the stand-alone version of DAOPhot to carry out these tasks.


Using DAOPhot

When DAOPhot is invoked (type daophot), it will ask you for some CCD specific quantities. These are the READ NOISE in adu's (analogue-digital units) and the GAIN (electrons/adu). Type options to change some of the default options (see the user's manual for a more detailed description) and hit return at the keyboard input prompt. The fields you will want to change are HIGH GOOD DATUM which sets the upper limit such that the CCD's response to light is linear (adu's). The FWHM (full-width at half-maximum) in pixels should be set to an appropriate average value for the field. To determine the FWHM, you can use the images.tv.imexamine task. When imexamine is active, you can place the cursor (using the mouse) on any star and type r to plot an image profile from which you can measure the FWHM. Typing a will give text output, with an estimate of the FWHM. You should repeat this for several stars on the frame of varying brightness and position and determine an average FWHM. Finally you should set the FITTING RADIUS, which sets the circular area within which pixels will be used in performing the profile fits. This is typically the same as the FWHM value. When you are happy with your selected options in DAOPhot, type return to leave the option section.

As an alternative to entering the required values every time you run DAOPhot you can create a file called daophot.opt containing all the necessary parameter values. e.g.

    READOUT NOISE   = 5.0
    GAIN            = 2.5
    FWHM            = 2.6
    HIGH GOOD DATUM = 40000
    FITTING RADIUS  = 3.0

The next step, in DAOPhot, is to type attach image_name. This tells DAOPhot which image is currently being analyzed. To find all the objects in your frame above the threshold level selected type find (answer 1, 1 to the question find asks, assuming the image you are interested in is not the sum, median, or average of several other images). DAOPhot will now search for all objects in the field and output them to a default file (with a .coo extension). This default file will contain, on each line, an object ID number, the x and y value of the object's centroid, and three image statistics, which can be used to differentiate between stars, cosmic rays, and galaxies.


Calibration

For those cases where the standard stars are on a different frame than the cluster stars of interest you will have to work with total instrumental magnitudes when applying the calibration. To achieve the highest accuracy you need to determine an aperture correction, which is simply a constant offset which is added to the instrumental magnitude (from the aperture method with radius = 5/6 FWHM, or from the PSF method) to obtain the calculated total instrumental magnitude. To determine this value for each frame use a subset of stars (which are isolated from crowding effects, unsaturated, and generally well-behaved to ensure a good determination of the total instrumental magnitude) and calculate the average of the difference between the instrumental magnitude (for the two cases) and total instrumental magnitude. You should do this for each frame and each filter. This offset can then be applied to all of the other instrumental magnitudes to derive total instrumental magnitudes for each star within the cluster. For all further steps the magnitudes you should use are these calculated total instrumental magnitudes.

For the simpler case where the standard stars and cluster stars are in the same frame then there is no need to calculate the total instrumental magnitudes, and you can simply work with instrumental magnitudes for the calibration.

You can perform the calibration and subsequent creation of a CMD for the aperture and/or PSF instrumental magnitudes.

The stars identified in the V and B frames must be matched according to their positions in the frames. There will likely be some shift between the two frames. There is a program called DAOMatch (type daomatch in Unix) which will determine the translation between the frames, using the 30 brightest stars in the frame. When you run this program the input files will be the .ap or .als files for the V and B frames. The program will iterate a number of times matching stars to determine the shift between frames; answer y to the series of 'Another level?' prompts, and hit return at the third 'Input file:' prompt. (As a check, you should ensure that the translation equation that DAOmatch prints to the screen at each iteration looks reasonable.) When complete a file with a .mch extension is produced which is used in the next step.

To match all the stars in each frame, run the program DAOMaster (type daomaster from Unix). This program will ask you for various pieces of information and the output will be a list of instrumental V and B magnitudes for stars identified in both frames.

An example recipe for running the program:

input file: the .mch file created by daomatch
Minimum number, minimum fraction, enough frames: 1,0,1
Maximum sigma: 9999
Desired degrees of freedom --- Your choice: 4
Critical match-up radius: Begin with a suitably large radius, of say 10.
Reduce this number on each iteration until you
reach 1, and then keep entering 1 until the
the number of stars in the master list is
constant for two consecutive iterations.
Enter 0 to exit the iterations.

Answer n to the rest of the questions except that which asks if you wish a file with raw magnitudes. This file (with a .raw extension) will contain a list of instrumental magnitudes in V and B obtained using the small aperture. Columns 4 and 6 will correspond to the V and B instrumental magnitudes (provided the V file was specified first in DAOMatch, otherwise vice versa), and columns 5 and 7 their corresponding error. In the cases where a star is found in only one of the frames the other magnitude will be given as 99.9990 and its error as 9.999.

In general, transforming instrumental magnitudes into calibrated magnitudes considers both airmass and colour (for example B-V). For this lab we will ignore the airmass term and use the following simple transformation equations:

vinst = V + a1 + b1 ( B - V )

binst = B + a2 + b2 ( B - V )

which is equivalent to:

V = ( vinst(1+b2) - binstb1 - a1(1+b2) + a2b1 ) / ( 1-b1+b2 )

B = ( binst(1-b1) + vinstb2 - a2(1-b1) - a1b2 ) / ( 1-b1+b2 )

where vinst and binst are the instrumental magnitudes, and B and V are the true (i.e. literature values) apparent magnitudes for the standard stars. You will need to determine the coefficients a1, a2, b1, and b2. This calibration determines the zero point of the magnitude scale, and accounts for the difference in the response function of the detector (including filter, optics, sky absorption etc.) between your set of observations and the defined standard response function. To first order this is simply the difference in the mean wavelength of the two response functions. If there are sufficient standard stars higher order coefficients can also be determined, which can begin to account for such factors as the form of the response function. (If you like, you can use the utilities.polyfit routine in IRAF to make a least-squares-fit to the data.)

The next step is to use the above two equations, now with known coefficients, to determine the magnitude for all objects in the frame from the measured instrumental magnitudes.

Now you can construct a CMD (V vs. B-V) with your results. The SuperMongo plotting package (type sm from a Unix prompt to run it) can be used as a convenient way to carry out the above calculations on all the stars and to produce a CMD for the aperture and/or PSF photometry. As a final step you can estimate the distance to your cluster using standard CMDs (plotted with the absolute magnitude, MV) to derive a distance modulus and hence a physical distance, which can be compared to the accepted value.