Images to Analyse

You will need following images to do the analysis:

  • Images of the cluster, in the filters \(B\) (blue), \(V\) (‘visual’, green), \(R\) (red) and \(I\) (infrared).

  • A “flat field” image, to go with each filter used.

  • A bias frame.

The last two images are described below.

Bias frames

Since CCDs are photon counters, one would expect that if an image was taken of nothing (i.e. just blackness) then the readout would be zero in all pixels. But this is not the case. In order to trap electrons in the pixels of the CCD, a voltage (or ’bias’) must be applied across the pixels. This bias generates some additional counts in each pixel when read out. If this bias is known, then it can be subtracted from the real exposures so that only counts from real photons remain. Astronomy grade CCDs are designed so that this bias varies as little as possible between exposures so it can be accurately subtracted.

Thus, the bias frame is simply the readout from a zero-second exposure. You will notice when you examine the bias image that it is not perfectly uniform– there are random variations of a few counts between pixels. This is the “readout noise” of the CCD and is an unavoidable part of making measurements with CCDs. Astronomical CCDs are usually cooled with liquid nitrogen to minimise this readout noise.

Since the same CCD was used for all four exposures, only a single bias frame is necessary for all of the images.

Flat fields

Now, our telescope + CCD system, while very good, is not perfect. One fault is that the response to a uniform illumination will not be a uniform response across the CCD. Instead, there will differences in the response between different regions, and these differences will persist into observations of real sources. Typically, the throughput at the centre of the field is slightly higher than the throughput at the edges.

To account for these variations, so-called “flat field” images are taken. These images are of a uniformly illuminated source – such as a lit screen inside the telescope dome, or, as was used for these images, the sky at twilight (however, you have to be careful with twilight flats not to get too many stars appearing).

Reducing the Data

This section describes how to get your data into a suitable state to measure the magnitudes. This process is known in astro-speak as reduction (although sometimes it might create more images in the process!).

Basic Command Line

You will be using the command line in xterm. The xterm is a terminal emulator and runs on the UNIX operating system. Your friendly demonstrators will be able to help you should you get stuck with using it. For those who are not familiar, here are some basic command line for this lab:

  • cd DIR — change directory to DIR

  • ls — list directory contents

  • mkdir DIR — make directory named DIR

  • cp FILE LOCATION — copy FILE to LOCATION

  • pwd — print current working directory

Starting IRAF

First, log in to the linux computer as partiii (the password will be available in the lab). You will end up with a screen with an xterm in the middle. The xterm runs on the UNIX operating system, and your friendly demonstrators will be able to help you should you get stuck with using it. If you type ls you will get a listing of the current directory. You should see a directory called originals2014 – this is where all the relevant images are kept. Please do not alter these! Instead create your own directory (I’ve used the name bob, but you can be more creative!) and copy them into it:

SB updated IRAF commands to end 1.5.2 > mkdir bob > cp originals2014/*.fits bob/ Now you want to start IRAF. This stands for Image Reduction and Analysis Facility, and is one of the most common tools used for reduction and analysis of astronomical images, particularly optical and infrared ones.

Important: you must be in the iraf directory to start IRAF.

> cd iraf

Bring up a new window (of a slightly different type) by typing

> xgterm & in your first window. Now type

> cl

in the new xgterm to start IRAF. You will notice that the prompt will change, and you will get a brief welcome message. You also want to start the image display tool, called ds9. At the IRAF prompt (indicated by cl\(>\)), type:

cl> cd ../bob cl> !ds9 & Images can be displayed in ds9 by using the command display – you will need to put in a frame number for ds9 to display it in, and you have a choice of four. Move into the directory where your images are (eg. cd bob), and display one of your images. For example:

cl> display M93_B.fits 1

You can also use the File \(->\) Open menu in ds9 to open images.

A Quick and Dirty Look

imexam is an interactive tool for analysing astronomical data. It allows you to take a quick, dirty look at the properties of your images. To start it, just type imexam. If you haven’t already got an image in the display, you can type the image file name after imexam to display automatically (eg. imexam M93_B).

Once you have the ring-shaped imexam cursor on your image, there are a number of keys that can be pressed to examine it:

  • l — produces a plot of the intensity of the line the cursor is currently on.

  • c — as for l, but for the current column.

  • s — produces a 3-D surface plot of the region surrounding the cursor.

  • e — produces a contour plot of the region surrounding the cursor.

  • a — prints out the current position of the cursor, and results from the photometry calculations. Ask your demonstrator to translate this output for you.

  • r — produces a radial plot of the source the cursor is currently over, as well as the output of a.

  • q — quits imexam.

Play around with imexam for a bit to get a feel for what your raw data looks like. In the next section we’ll use imexam to see how your data changes through the reduction process.

At this point it is worthwhile considering exactly what you are looking at. When an image is displayed, some stars appear to have a larger diameter than others. What is going on? Is the size of the image of each star different? Each pixel on this CCD has an angular size of approximately 1/2 arcsecond. Assuming these stars are the same size as the Sun and 1104 pc away, what is their angular size? So what is causing their images to be larger than this on the CCD? You can move the cursor over the display window and the count value for pixels will be displayed. Is there are difference between “large” stars and “small” stars? Make some radial profile plots of different stars. What do you notice? Is the radius over which light is spread for a “large” star actually any different than for a “small” star?

Processing the Data

To understand how CCD image reduction works, you need to understand that a CCD image is simply an array of values, where the value indicates the number of counts in that particular pixel. Since the images are just numbers, you can perform simple arithmetic operations on them, such as adding two images, or subtracting them and so on. This is simply what IRAF does – manipulates images arithmetically to improve the signal-to-noise, remove instrumental effects, show features not readily apparent in single images etc.

\begin{equation} C(x,y)=S(x,y)\times F(x,y)+B(x,y),\nonumber \\ \end{equation}

All you need to do to your images is to remove the effects of both the bias and the flat field. The total number of counts in a particular pixel \((x,y)\) is given by

where \(S\) is the signal (the interesting part), \(F\) is the flat field contribution and \(B\) is the bias. As you go through this procedure, use imexam to make a note of how the background noise changes as you first account for the bias, and then the flat field.

The way you will be removing the bias and flat field effects is by using the IRAF procedure ccdproc. We first need to load some IRAF packages. Type:

cl> noao cl> imred cl> ccdred

Before we do anything, we need to set the parameters of ccdproc, so that it will do what we want. To do this, type epar ccdproc (epar = ‘edit parameters’). You will see a screen with a lot of options (most of which we are not interested in here!) The one of relevance at the moment is the zero (or bias) correction. Scroll down with the arrow keys and make the zerocor parameter “yes”, and the others in that section “no”. Then go down further and change the zero parameter to the name of the bias file (which should be bias.fits). To exit, type :q. To run ccdproc on an image (say bob.fits), type ccdproc bob.fits. You can also run ccdproc from the parameters screen by typing :g.

Do this for all the cluster images. The flat fields have already been bias subtracted, so it is not necessary to process them in this way.

Now you can remove the flat fields. Type epar ccdproc again, and make the flatcor parameter “yes”. Scroll down and make the flat parameter equal to the relevant flat field image. This should be the same filter as the image you are about to run ccdproc on (as the flat field is different in different filters). Then run ccdproc on the cluster and standard images again.

Is there any noticeable difference between image before and after bias/flatfield correction? What about the background levels (i.e. blank spaces between stars), are they zero now? Is the background the same for all filters? (Note: the exposure times for these images were not the same. The B, V, R and I images had exposure times of 60, 7, 5 and 3 seconds respectively.) The background is due to sky brightness. During the day, the Sun excites molecules in the atmosphere, which re-radiate at night. Most of the re-radiation is at specific (quantised) wavelengths in the V, R and I bands and the near-IR. Hence, the counts in your CCD measurements of stars also contain counts from the night sky. Luckily, the night sky uniformly illuminates the CCD just like a flat field. Your flat field corrections should make this background uniform across the CCD, hence it too can be compensated for.

Measuring the Brightness of your Stars

Aperture Photometry and the Point Spread Function

Once your images are fully reduced, you can go about measuring the brightness of the stars in the cluster. We will use the task phot in the digiphot.apphot package for this purpose. phot performs aperture photometry on an input list of coordinates. For each coordinate in the list it automatically performs the following steps:

  • Determines the centre of the star

  • Adds up the total flux within a circular aperture around this point

  • Adds up the flux within a surrounding annulus to determine the underlying sky brightness

  • Subtracts the sky brightness from the aperture sum to determine the brightness of the star