In this practical you will learn to do relative photometry on astronomical data. Our example dataset will be data on the delta-Scuti star SZ Lyn. The data was taken by third-year students using the department's remote controlled 10-inch telescope, ROSA.
We know how to do aperture photometry in principle. In practice, there are many software packages available to perform aperture photometry. We will analyse our images using AstroImageJ. This software package is freely available, runs on Windows, Linux and OS X and does not have a steep learning curve.
You will need a copy of the data. The data files are located at C:\\SharedFolder\astrolab\SZLyn. There are 427 images of SZ Lyn, taken over several hours. Each image is stored in a file format called FITS format, and end in the .fit extension. FITS format is the standard image format for astronomical data. Inside one file is both the image, and a header, which contains metadata about the image - such as when it was taken, and what filter the data was taken in.
You can work on the data in the SharedFolder. However, this folder is local to the PC you are working on now. If you want to keep files from this practical to use later, you will need to copy those files to your U: or M: drives. Don't copy all the FITS files to those drives, though. The data is nearly half a gigabyte, and will fill your allocation of networked drive space!
At the end of this lab, you will have a sub-folder, called aligned, with your work in it. Please delete this folder before you leave.
AstroImageJ is already installed on the lab PCs. Should you want a copy for your own machine, it is available for download here. A detailed and helpful manual is available here. If you encounter difficulty, or do not understand a setting, check the manual.
To open AstroImageJ, double-click the file C:\\SharedFolder\astrolab\AstroImageJ\ImageJ\AstroImageJ.
Task 1: Open AstroImageJ. You are presented with the main window, as seen in figure 14. Load all of our images by choosing File > Import > Image Sequence... Select the folder that contains all the .fit images and click Open.
Important: In the options box which appears, make sure Use virtual stack is selected. Otherwise AstroImageJ will attempt to store all of the images in memory. This will not end well for you.
You should see a new window open, with a display of the first image in the stack. This is the photometry window, shown in figure 15. Near the bottom of the photometry window is a slider which moves through the images, and a button, which will animate through all the images in the stack. Press this button and notice how the stars move around slightly with time. This is due to imperfect tracking of the telescope. Note also the subtle changes in size of the stars as the seeing changes from frame to frame.
Our first step is to correct for the motion of the stars from frame-to-frame. AstroImageJ does this using the align stack function. Strictly speaking it is not necessary to align the images before performing photometry, but it makes the centroiding step of the photometry easier, so we will do it here.
Task 2: Align the images by choosing Process > Align stack using WCS or apertures... This brings up the stack aligner window (figure 16). Make sure the Use previous N apertures box and the Align only to whole pixels boxes are unchecked. Make sure the Show help panel box is checked.
The radii of the object aperture and sky annuli are not too important, but you might want to make sure the object radius is set to a reasonable value, since if the star lies outside this radius, AstroImageJ will not be able to calculate the image shift. Set this value to somewhere in the range 15-20.
Click OK to begin selecting stars to use for alignment. Left click on a star to add an aperture around it. Add two or three bright stars to use for alignment and press Enter or right-click to begin the alignment procedure.
AstroImageJ will now look for a star within each aperture, and measure the centroid of those stars. For each image, it uses the centroid of the stars to estimate the image shift, and saves an aligned version of the image into a subdirectory called aligned.
When AstroImageJ has finished, close the photometry window, and load the aligned images in as an Image Sequence. Be sure to use a virtual stack again! Once you've loaded the aligned images into the stack, hit the button and check the alignment.
Now it is time to perform the relative photometry on the aligned images. Recall that aperture photometry involves three steps, centroiding, sky background estimation and extraction of the counts from our object. AstroImageJ performs all three of these steps with the Multi-Aperture Photometry tool. First however, we need to know how large to make our object apertures, and the inner and outer radius of our sky annulus. To do that we need to know what the FWHM of the stars in our image is.
Task 3: In the photometry window, click on a star, then choose Analyze > Plot Seeing Profile... You should end up with a plot like figure 17. Based upon this plot, decide how large you want your aperture sizes to be.
Task 4: Open the Multi-Aperture photometry tool by choosing Analyze > Multi-aperture... Set the radius of the object aperture, and the inner and outer radii of the background annulus to the values chosen earlier.
Make sure the various options boxes are marked as indicated in figure 18, and click Place Apertures to begin. Aperture placement is done in exactly the same way as when you aligned the images.
Figure 19 shows a plot of the sky centred on SZ Lyn. The orientation of this image is not the same as the images from ROSA. Place your first aperture around SZ Lyn, and at least one other aperture around a comparison star. When choosing a comparison star, you should choose an unsaturated, bright star. If possible, it should be brighter than SZ Lyn. Why?
Once you've placed your apertures, right-click or press Enter to start performing photometry.
The measurement window, which appears following aperture photometry, contains many entries for each image. Only a few are of direct interest to us however. These are:
Task 5: Save your data to a Tab-Separated Values text file by clicking in the Measurements window and choosing File > Save As... You should be able to open this file in Excel. Use Excel to make two scatter plots, one of JD vs Source-Sky_T1 and another of JD vs rel_flux_T1.
Notice how using relative photometry has corrected the large jump that occurs in the plot of the counts from the target star. This jump is associated with a change in position of the stars, but it has affected our target and comparison star equally, so it is not present in the count ratio plot.
Now you have successfully learnt to use AstroImageJ for aperture photometry. However there are two issues remaining. The first is that your lightcurve does not have accurate error bars. The second is that you do not know if you used the best aperture sizes. Before we can calculate error bars we need to know more about how CCDs work. We will cover that later in the course.
However, we can fix the second problem.
Task 6: Re-run your aperture photometry with a few different aperture sizes, and save the results. Leave the sky annulus unchanged for now, and simply change the object aperture radius.
Open these files in new Sheets in Excel and plot JD vs rel_flux_T1 in each case. Try to plot them on the same graph, and add a small offset to each dataset in y, so you can see the curves.
Which aperture size is best? What does the light curve look like when the object aperture is too small? What happens when it is too big? See if you can understand these effects.
One final thing to think about - if you use a small aperture radius like 2 pixels, much of the light from your object is falling outside your aperture. Why do you still get a reasonable lightcurve?