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.
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.
Aperture photometry simply means all of the light within a specified radius of an object's centroid is measured and some estimate of the sky level in the aperture is determined and subtracted. In order to estimate the sky level, a circular annulus around the object is used. You will need to specify the inner and outer radii of this annulus, and should choose values such that inner radius of the annulus lies just outside of the stellar light. (e.g. type IS=15 and OS=30 to set the inner radius to 15 and the outer radius to 30 in photometry).
When you run the photometry routine, DAOPhot will provide you with what are called instrumental magnitudes which correspond to:
-2.5 log(estimated object flux in adu's) + constant
To calibrate the measured instrumental magnitudes you will want to obtain as close to a total magnitude as possible. This is done as when the standard stars are on a different frame than the cluster stars of interest (as is usually the case) the only consistent measurement between the two is the total instrumental magnitude, as the point-spread-function (PSF) may vary between the two frames, giving rise to a constant offset between the two frames for any other instrumental magnitude measure (as will be discussed shortly). Determining an appropriate aperture size to measure a total instrumental magnitude can be done by building up a `light growth curve' of the object. The light growth curve is the object's flux as a function of aperture radius. The adopted aperture would then reflect the point in the light growth curve where it flattens out.
Once you have calibrated your total instrumental magnitudes (discussed below), you will not need to determine the total magnitude for all the other stars on the frame. The light distribution of an unresolved object (such as a star) is governed by the point-spread function (PSF), which we will assume is constant in shape across the entire image (Is this reasonable? You should have an idea from using imexamine to determine the FWHM of stars around the frame). If the PSF is invariant, then the ratio of measured fluxes at different radii from a star's centroid should be constant. This flux ratio (or difference if using magnitudes) is termed an aperture correction. This can be exploited to obtain more accurate photometry by measuring the flux within a small aperture. Because the PSF produces a central concentration of light, a higher S/N is obtained by measuring the light within an aperture that is less than the aperture which measures all (or close to all) of the light. The aperture which maximizes the S/N is a function of the star's magnitude. Choosing an aperture that reflects the maximum S/N for a very faint star (ie. sky limited case) is a good choice. This aperture is found to be one with a radius that is about 5/6 of the measured FWHM (full width at half maximum).
Type a2=n (where n is the aperture you calculated from the curve of growth method, and should reflect the total magnitude of the star) and set a1 to the radius that maximizes the S/N for faint stars (in photometry). It is important that a1 be the smaller aperture as a later utility will require it. Ensure all other apertures are set to 0. Type return to begin the photometry. This tells DAOPhot to perform aperture photometry on all objects with two different aperture radii.
When photometry is finished, a file (with extension .ap) will contain a list of object ID numbers, x and y centroid positions, and the instrumental magnitudes of the objects with an error estimate. Now you will need to determine which of the many detected objects are the standard stars. The IRAF routine imexamine is useful for this purpose. Typing a when the imexamine utility is active will output the x and y values of the centroid of the star under the current cursor position in SAOimage. Obtain the x and y coordinates of the standard stars and find those coordinates in the file output by DAOPhot.
This procedure should be performed on both the B and V frames. The two files (with .ap extensions) should contain all the data you need to generate a calibrated CMD for this cluster.
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.