Friday, September 26, 2014

Photometry with AIP4WIN: a Tutorial – Part 3
Flat-field preparation



By R.D. Boozer
As mentioned earlier, flat-field frames are created to remove the bad effects of any optical defects in the telescope/camera system.  The two most common methods of shooting flat-field frames are 1) shooting a twilight sky and 2) using what is called a light box (a simple artificially lit box that can be constructed by the user).  Both of these methods are described extensively in Berry and Burnell’s book along with instructions on how to implement them; therefore, there is no need for me to cover those details here.  Instead, I will cover what the observer is to do with the flat-field frames after they are shot.

Before discussion of the implementation of flat-field frames, it should be mentioned that there were several sets of supplied stellar images, with each set taken with a different optical filter.  Those were V, R and I filters which are centered on 550 nm, 650 mn, and 800 nm wavelengths respectively. (Warner 24)   Magnitudes measured with the V filter will roughly correlate to traditional visual magnitudes.  Magnitudes with the R or red filter are measured in the longest wavelengths visible to the human eye, whilst I filter magnitudes are obtained in near infrared light. Later within a reference framework, there will also be mention of U and B filters centered on a 365 nm wavelength and 440 nm wavelength respectively, with U corresponding to near ultraviolet and B being shorter wavelength visible light that appears primarily blue.  (Warner 23)  There may also be mention of a color index, which is the magnitude of a star measured in one filter subtracted from the same star’s magnitude in another filter. (Warner 29)  The reason for obtaining images in such varying wavebands will eventually be explained.

Any flat-field frames that are to be used on a stellar image must have been exposed through the same filter as the image to which it is to be applied.  Because most of the supplied stellar images were taken using the V filter, the creation of a master flat-field frame will be demonstrated using V filter raw flat-field frames.

Another point that needs to be made is that all flat-field frames should ideally be exposed with an integration time such that most of the pixels contain roughly half the saturation value for a pixel.  This level of exposure ensures that enough light has been absorbed to have a strong enough signal, but not close enough to saturation that the light response in the image is no longer linear. (Berry and Burnell 182)  Given this fact, I went about checking each of the raw flat-field frames to see if they met this important criterion before starting the calibration setup.  The explanation of the flat-field part of the calibration setup will be continued after the description of the half-saturation evaluation (that was done earlier) of the flat-field frames.

According to the instructions supplied for the assignment, the saturation level of the CCD sensor used is 65k, which for computer equipment such as a CCD chip is 216 or 65536.  Given this statement, I can attest the following facts from his previous career as a software engineer.  Since a reading of 0 is always considered to be the lowest value in the range, the actual value range for a pixel of the CCD chip would be 0 to 65k-1 or 0 to 65535 ADU (this is still 65k possibilities).  So nothing will register higher than 65535 ADU and thus this value would indicate absolute saturation.  The following screen capture image illustrates how each raw flat-field frame was checked to see that the pixels it contained had values somewhere in the vicinity of 65k divided by 2 or 32768 ADU.

First, the raw flat-field frame was loaded via the File menu as one would load any other image.  Once the image was loaded, the Pixel Tool option under the Measure menu was invoked.  The Rectangle from corner radio button is clicked so that the user can drag the mouse to define the area in the image that he/she wants to check, excluding the unexposed vertical black strips to either side of the actual exposed image.

Figure 10: Making sure a flat frame’s pixels are near half saturation.

The minimum value of 17845 would be one of the stray occasional darkest pixels that have below normal sensitivity and can essentially be ignored, especially since this is one of the things for which the flat-field frame was created to compensate.   What is important is the median ADU value of 35727, which indicates a value such that approximately half of the pixels in the image should have an exposure above that value and half below.  Considering that fact along with the indication that the maximum pixel ADU value in the image is 39262, it then appears that this is a fairly well exposed flat-field frame.  Remember, a value only roughly near the ideal of one half saturation is necessary; therefore, this flat-frame is adequate.  Indeed, when I checked every raw flat-field frame for every filter in this manner, all of them were exposed at a level adequately near the half saturation value.  Again, all of this was done before the Calibration Setup Tool was invoked.

Now continuing the discussion of the Calibration Setup where it was left off, the Flat tab is clicked and produces what is shown in the next illustration.

Figure 11: The default appearance of the Flat-field frame tab.

Clicking the Select Flat Frame(s) button begins the selection of the raw flat-field frames for the production of a master flat-field frame.  Again, the actual selection process is similar to the one followed during the selection of raw bias frames; therefore, that detail will not be shown.  All of the V filter flat-field frames were of 25-second exposure and, as shown earlier, this was a sufficient amount of integration time to fill the pixels to approximately half saturation.  After the raw flat-field frames are chosen, the Flat tab appears similar to thusly:

Figure 12: The raw flat-field frames have been selected.

It is normally considered optimal to shoot at least 16 raw flat-field frames to obtain the highest quality master flat-field frame.  (Berry and Burnell 182; AAVSO 3.4)   Only 13 V filter raw flat-field frames were supplied.  There could have been an equal number of what are called flat darks which might improve the final images.  These are raw flat-field frames where the twilight sky is used as the uniform light source and have the same integration time as the regular flat-field frames.  With these 32 flats (16 flats + 16 flat darks), typical master flat-field frames have a signal to noise ratio of around 600. (Berry and Burnell 182)  An SNR of 500 or better is needed to obtain 0.01 magnitudes accuracy.  (AAVSO 3.4)  But with the paucity of flats that were supplied, it will be good fortune if the SNR of the master flat is half of that.  However, even given only fairly transparent seeing conditions, Gliese 876 would be a special case where planetary transit photometry may not require such extremely precise magnitude resolutions, for reasons that will be explained later.

Had dark flats been supplied, the Subtract Dark Flat box would be checked and the Select Flat Dark(s) button clicked to allow the selecting of the raw flat darks.  Instead, the user goes directly to clicking the Process Flat Frame(s) button to make the software automatically create the master flat-field frame via averaging of the raw flat-field frames.  A result similar to what you see below presents itself after that action.


Figure 13:  The master flat-field frame has been created and may be saved.

Of course, the user may now click the Save as Master Flat button to make a permanent copy of the newly generated master flat-field frame.  The Applied Flatfield Correction box was automatically checked and indicates that any stellar image calibrated by AIP4WIN will have the master flat-field frame automatically applied to it.  Of course, if for some reason the user decides (for some reason) he/she does not want the master flat applied, the box may be unchecked.  But for photometry, you definitely want it applied.

Understanding how the master flat-field frame is applied to the image is important.  But before this is discussed, the reader may be wondering, “What purpose do the Median Combine and Normalize Median Combine radio buttons serve?”

Some observers contend that there is a way to produce a better flat-field frame than by using a uniform artificial light source and/or flat dark frames taken at twilight.  Instead of a series of exposures from the two aforementioned relatively uniform light sources, they take a number of exposures of different areas of the dark night sky whilst making sure that none of the exposures contain a bright object.  A median combine of those exposures is then done.  Since disparate parts of the sky are being merged, any particular stellar object in a frame will be removed by the median operation since it will not appear in other frames.  Proponents of this method say it gives a more uniformly illuminated master flat-field frame than traditional methods. (Brown 1)

According to AIP4WIN’s built-in help documentation, a normalized median combine is used when the only flat-field frames shot are dark flats taken at twilight.  In this case, the flat darks are scaled to produce a common average value and then median combined.

But once a master flat-field frame has been generated, how does AIP4WIN apply it to the image during calibration?  After the bias-removed dark frame has been subtracted from the stellar image, an operation is done on each pixel in the stellar image.  This operation consists of dividing the value of a stellar image pixel by a ratio that is equal to the ADU value contained in the corresponding pixel in the flat-field frame by the average pixel value of the central region of the flat field frame.  The reason why the average of only the central region is used rather than the average of the whole flat-field frame is because it is assumed that the values at the outer edges of the field are going to be consistently lower than central pixels due to vignetting and that vignetting is part of what is to be eliminated. (Berry and Burnell 189)

Why does this procedure work?  If the above-stated ratio were gotten from a perfectly flat frame, then that ratio of the average value to the value of a pixel would always be one.  However, because of vignetting, inhomogeneous pixel sensitivity, etc., a one value for any pixel is seldom the case.  In the instance of a pixel with low sensitivity or that is shaded by a dust particle on the camera’s optical window, then the pixel value in the master flat will be low.  Thus, the ratio for that pixel in the flat frame will be greater than one and the value of the corresponding pixel in the stellar image will be boosted upward to what it should be when it is multiplied by the ratio. (Berry and Burnell 190)

In the next instalment of this series of articles, I will reveal the visual appearance of the master bias, dark and flat-field frames and how to use the software to apply them for calibrating an astronomical image.

References
AAVSO, CCD Camera Skills, http://www.aavso.org/observing/programs/ccd/manual/3.shtml (2009) (last accessed November 2009)
Berry, Richard and James Burnell, Handbook of Astronomical Image Processing, (2006) Willmann-Bell, Inc., Richmond, Virginia, USA
Brown, Michael, Flat Fielding Dithered Data, http://www.ph.unimelb.edu.au/~mbrown/ccd/pfrancis/node14.html  (1996) (last accessed November 2009)
Warner, Brian D., A Practical Guide to Light Curve Photometry and Analysis, (2006) Springer Science + Business Media, Inc, New York, New York, USA


Copyright 2014 R.D. Boozer

No comments:

Post a Comment