Differences between revisions 2 and 3
Revision 2 as of 2014-04-11 14:43:05
Size: 8917
Editor: PierreMaggi
Comment: Updated the calibration guide
Revision 3 as of 2014-04-11 15:00:27
Size: 8885
Editor: PierreMaggi
Comment: The IRAF example is linked to a sub-page
Deletions are marked like this. Additions are marked like this.
Line 73: Line 73:
/!\ T.B.D.: Show working example of image calibration with iraf, with commented commands and results (use verbatim ?)
[[/IRAFexample| On this page]], we show an example of image calibration using IRAF.

Change log: PM 11/04/19 This is a first to introduce the principles of CCD data reduction and analysis (i.e. photometry). Includes a rough tutorial to do basic reduction steps with IRAF. Feel free to add comments.

A quick guide to data analysis

Data reduction

Why the data need calibration

Images of an astronomical object taken with a CCD camera will include many unwanted signals of various origin. The goal of the calibration is to remove these effects, so that the pixel values of the calibrated images are an accurate representation of the sky light that fell on the camera during your observations.

This quick tutorial will work you through the standard reduction steps, with an example of analysis with IRAF.

Effects to correct

/!\ Please comments if the level of details is too low or too high

  • Bias When the CCD images are read, a small voltage is applied to all pixels. This electrical offset is called bias. It has to be subtracted, so that the zero points of the CCD output and the pixel-value scales coincide.

  • Dark Current The thermal agitation of silicon in CCD produce electrons, even when no light fall on the CCD (hence the name 'dark' current). Dark current is always present, i.e. also in your sky images. It scales linearly with exposure time, at a rate dependent on the CCD temperature, and needs to be subtracted

  • Non-uniformity (flat-fielding) The conversion of light to electrical signal on the camera varies with position, both on small scales (pixel-to-pixel), due to changing quantum efficiency of individual pixels, and on larger scales, because of vignetting and dust shadowing. To correct these effects, we need to divide the data by the normalised sensitivity of each pixel. This is estimated by observing a (theoretically) uniform source of light. The variations observed in this exposure, called a flat-field, are a measure of the non-uniformities of the camera. Note that the flat-field(s) need to be first corrected for the two effects described above.

  • Cosmic rays Cosmic rays (CR) produce a stream of high-energy particles that interact with the camera, leaving bright spots or tracks in the images. By combining multiple images using the average, or better, the median of the pixel values at each pixel, the extreme values produced by CR hits are easily spotted and removed. The image combinations are often done with a rejection algorithm to remove extreme variations. If an obvious CR track remains in a combined image, it is better to find out from which individual image it originate, and remove the CR prior to combining the images.

What do you need for data reduction

To calibrate your sky data, you will need a set of calibration frames. They should be taken close (in time) from your sky observations, ideally during the same night. Standard calibration frame sequences are available via MaximDL or ACP. /!\ I need to check what is there!

The minimum required is:

  1. A set of bias frames. These are zero second integration exposures (the shutter remains closed). In principle the bias is constant, but statistical fluctuations and interferences introduce some noise. It is best to combine several (e.g. 10) bias frames. The root-mean-square noise will decrease as the square root of the number of bias frames.

  1. A set of dark frames. These are long exposures taken with the shutter closed. You can either match the exposure time of the dark frames to the exposure time of you sky observations, or used a scalable dark frame, from which the bias has been subtracted. The second option is more flexible. Take a set of dark frames with increasing exposure times (from short to long). Here combining the dark frames will mostly help to remove CR hits (high-energy particles do not "see" the shutter...).

  2. A set of flat fields. These are images of a uniform source of light. Usually the twilight sky is the best choice. The exposure time should be set so that the pixel values is a good fraction (20%-50%) of the full well capacity. For the GOWI camera you should aim for ~20 000 counts. These good statistics allow to reveal the desired level of detail. An automatic sequence to produce twilight sky flat-fields is available. ( /!\ @Vadim: Want to give more detailed description here? /!\ ) Note that because vignetting and CCD sensitivity are colour-dependent, flat-fields must be taken with the same filter as that used for the image to calibrate. As before, several exposures are taken to be combined.

In practice

Typical calibration sequence

1. Look at what you have:

  • Sit down and sort your data. If you have taken images of several objects, it is best to keep the calibration frames, which will be used for all objects, separated from the objects data. Make sure you know what files are bias frames, dark frames, flat-field (in what filter), etc... Ideally, should be clear if you used a proper naming convention for your files.

2. Prepare the master bias frames

  • Combine all the bias frames in one image (the master bias). You can either take the average or median of each pixel value. The first method reduces random noise more effectively, the second is better at excluding abnormal (extreme) values.

3. Prepare a master (scalable) dark frames

  • First, subtract the master bias from all your frames. Then, combine all dark frames. The resulting master dark frames represent the dark current obtain during <t>, the average time of the exposure times of all the dark frames that have been used. Check (by looking at the data) that the master dark frame has no remaining CR. The averaging (in particular with median) should have removed all of them. If one CR feature remains, find which individual dark frames it comes from. Either remove the CR hits from that image, of exclude it from the master dark frame.

4. Prepare the master flat-fields

  • First, subtract the master dark frame, scaled by the exposure time ratio of the flat-fields to that of the master dark, from all your flat-fields. Then, combine the dark-subtracted flat-fields separately for each filter. There might be some large scale gradients because of non-uniform illumination. To correct that in the final flat-fields, use a thorough smoothing of the flat-fields to remove small-scale variations, leaving the gradients apparent. Use this to correct the flat-fields. At the end one obtains the master flat-field for each filter.

5. Process the raw data

  1. Preparation
    • Again, have a first look at the raw data. What can of object do I have? What is the exposure time, the filters used? It is a good idea to have a backup copy of your raw data, and do the calibration in a separate directory than the one with the (processed) calibration frames. Copy the necessary calibration frames in the working directory of your choice.
  2. Subtract the master bias
    • This is done for all images and is neither exposure time nor filter-dependent.
  3. Subtract the scaled master dark frame
    • Subtracted the master dark frame. The dark should be scaled to match the exposure time of each raw sky exposure.
  4. Divide by the corresponding flat-field
    • Divide the dark-subtracted images by the master flat-field taken with the same filter. The flat-field should be normalise by its mean, so that the mean value of the sky images remain unchanged. You can either produce normalised master flats (in step 4) or scale the flat-field by its mean when doing the division.
  5. Align and stack the calibrated images
    • It is common practice to split the total desired exposure time into several exposures. This allows a good rejection of CR, avoids sky-tracking uncertainties, which leave star trails if the telescope do not follow the sky rotation accurately enough, and can be used to avoid saturating the brightest stars in the field. All calibrated images of one object in one filter are then stack. If the pointing is changing (even slightly) from one exposure to another, it is necessary to align them first on a common grid, to avoid a "blur" in the combined image. This can be easily done by matching the position of several bright object in the field.
  6. Look and check
    • Be sure to check the final images and compare to raw data: Is there remaining CR? Are stars more blurry in the final image than in raw data? Are there remaining large-scale gradients (incorrect flat-fielding)? Redo the necessary step accordingly. The calibration is now done! You can go on with the analysis.

A working example with IRAF

On this page, we show an example of image calibration using IRAF.

Photometry

/!\ T.B.D.

cogwiki: ForPraAnalysis (last edited 2022-10-08 16:40:38 by VadimBurwitz)