this file - Department of Physics and Astronomy

Transcription

this file - Department of Physics and Astronomy
7
03/08/2012
ASTRO IMAGE PROCESSING FOR BEGINNING STUDENTS MSUM Paul Feder Observatory D. Software example using AstroImageJ Any decent astronomical image processing software must now come with automated features that allow rapid calibration of image files. However, realize that the calibration steps in parts A through C are ordered such that the next “master” file depends on input from previous processing steps. Also realize that most software is not smart enough to keep your work organized for you, so you are free to name and organize your steps that you prefer. In this example, we show you how to calibrate images taken at the Paul Feder Observatory on the night of 2011-­‐09-­‐10 (sept. 10, 2011). All data can be downloaded from physics.mnstate.edu/feder. We will specifically look at the data taken in the R filter for XX Cyg, a variable star. (In Part II, we will then use these calibrated images to create a light curve.) The software we will demonstrate is Astro ImageJ. When you open ImageJ on your computer, you will know it is the “astro” version due to added features on the toolbar. The toolbar appears as in Fig. 4 below. Fig. 4 . Astro Image J has added toolbar functions. All functions to the right of the box shown are astronomical specific tools. This example walks you through using the DP or Data Processor tool to calibrate files. A good practice is to set up separate subdirectories for your calibration images and your science images. For this example, subdirectories under the date of the images are set up called bias, dark, flat, and XXCygR. We have moved the following files into the subdirectories: 8
03/08/2012
/bias /dark /flat /XXCygR calib-­‐001bias.fit xxcyg-­‐058dk60.fit calib-­‐011flat_r.fit xxcyg-­‐058Lt_R.fit calib-­‐002bias.fit xxcyg-­‐059dk60.fit calib-­‐012flat_r.fit xxcyg-­‐059Lt_R.fit calib-­‐003bias.fit xxcyg-­‐060dk60.fit calib-­‐013flat_r.fit xxcyg-­‐060Lt_R.fit calib-­‐004bias.fit xxcyg-­‐061dk60.fit calib-­‐014flat_r.fit xxcyg-­‐061Lt_R.fit calib-­‐005bias.fit xxcyg-­‐062dk60.fit calib-­‐015flat_r.fit xxcyg-­‐062Lt_R.fit calib-­‐006bias.fit xxcyg-­‐063dk60.fit calib-­‐016flat_r.fit xxcyg-­‐063Lt_R.fit calib-­‐007bias.fit xxcyg-­‐064dk60.fit calib-­‐017flat_r.fit xxcyg-­‐064Lt_R.fit calib-­‐008bias.fit xxcyg-­‐065dk60.fit calib-­‐018flat_r.fit xxcyg-­‐065Lt_R.fit calib-­‐009bias.fit xxcyg-­‐066dk60.fit calib-­‐019flat_r.fit xxcyg-­‐066Lt_R.fit calib-­‐010bias.fit xxcyg-­‐067dk60.fit calib-­‐020flat_r.fit xxcyg-­‐067Lt_R.fit xxcyg-­‐068Lt_R.fit xxcyg-­‐069Lt_R.fit Note that whoever acquired this data was very careful to name the files according to object, type of image, even exposure time, as well as filter type. All this information should also be provided in the file header, but would require some software sorting tool to further help organize the data without clear naming. Step 1. Create a master bias frame. This step will familiarize you with the DP panel. It is shown in Fig. 5. The most important areas are indicated by the arrows. Prior to creating the master bias frame, it is also a good idea to check the bias frames one by one. If you are not satisfied with any of them, change their name in a way that the word “bias” does not appear any more in their filename, and they will not be processed according to the filename specifier “*bias.fit”. This specifier means grab every image in the \bias subdirectory that has any name ending with bias.fit; the “*” character is called a “wildcard” and instructs the software that any characters could be in front of “bias.fit” in the filename. We specifically excluded calib-­‐008bias.fit and calib-­‐006bias.fit by renaming them calib-­‐008badb.fit and calib-­‐
006badb.fit. Note that the DP panel also has an entry line for Filename Number filter: Exclude:. This area gives an alternate way to exclude particular files, but we found it easier to rename the suspects. Note that the two bias frames were picked out of the group because they each had a number of rather bright (hot) pixels falling on the right side of the histogram, as shown below. Suspects here 9
03/08/2012
Fig. 5. Setting up to create a master bias image. Primary Directory: Browse to the subdirectory holding the bias images to combine. Master Bias: Check create; pick an averaging method; give filename specifics for input; specify a master image name. At bottom of panel: Select helpful output options (You choose the ones you like. I don’t like getting Beeped at, but I do like to see the progress of the software in a Log of work, and I certainly don’t want cosmic rays if it can help remove them.) Then START. NOTE: I chose a final master name that did NOT include the word “bias”, in case I wanted to try several master bias combinations. If I had ended these files in the “bias.fit” ending, the software would have tried to process master bias frames into master bias frames, and would have been puzzled. When I was finally satisfied with the master bias frame, I called it “final_master_bias.fit” and kept in the /bias subdirectory. 10
03/08/2012
Step 2. Create A Scalable Master Dark Frame This step is performed with the DP panel in a similar way to Step 1. However, Step 2 REQUIRES a MASTER BIAS frame in order to continue. The DP panel is filled in as shown in Fig. 6. Fig. 6. Setting up to create a Scalable Master Dark Frame Primary Directory: Browse to the subdirectory holding the dark images to combine. USE Dark Exp Time Scaling (check box covered by Log—sorry) USE Master Bias created in step 1 (check box covered by Log—sorry)—put in name of the master bias to be sure, as well as the subdirectory in which it is found. (NOTE: “..” means go up one directory, so “../bias” is the whole name of the bias directory.) CREATE Master dark using the same averaging method used for the bias frames (I switched to median combine method for all). The filename pattern that shows up in all the filenames is “*dk*.fit”. This screenshot also shows an example of the Log File created after the process STARTS. The Log shows me that indeed the master bias file was used to correct the master dark file, and that the process finished without error. I could also scroll through the Log screen and make sure it used only the input files I wanted it to. 11
03/08/2012
Step 3. Create a Master Flat Field Image This is where most astronomical image processing software is very powerful. The software will not only combine flat frames into a master frame, it will clean up the flat frames using the bias and dark master frames already made. Then it will scale the master flat field image using the median of the final image. Thus, the software will actually create a CLEAN, NORMALIZED master flat frame. The set up of the DP panel for this step is shown in Fig. 7. Fig. 7. Setting up a Master Flat Frame—Cleaned and Normalized goodness Primary Directory: Browse to the subdirectory holding the flat images to combine. USE Dark Exp Time Scaling (check box covered by Log—sorry). USE the master bias and master dark frames created earlier, being sure to put in correct subdirectories and filenames CREATE Master flat using the same averaging method used for the bias and dark frames . Another example of a Log file is shown. The log file can be used to verify that the master flat has bias and dark subtracted, and that it is normalized. 12
03/08/2012
It is always interesting to check the output of the software at each step. So here we show what the master flat field in the R filter actually looks like in Fig. 8. Indeed, we see that the flat field image is “bumpy”—with a number of dust particles readily apparent (but we do not know if these are on the CCD chip or on the filter, of course). Note also in the histogram below that there are various levels of intensity in the image centered near 1.0. These bumps confirm to us the wisdom in using flat field corrections to our images in the R filter! Fig. 8. Result of master flat field operation of Step 3. 13
03/08/2012
Step 4. Clean and flatten the “science” images. This step uses all three master frames created up to here. The DP panel set up for correcting the XX Cyg images taken in the R filter is shown in Fig. 8. Fig. 8. Setting up to calibrate all your science images Primary Directory: Browse to the subdirectory holding the science images to calibrate. USE Dark Exp Time Scaling (check box covered by Log—sorry). USE all your master calibration files. Be sure to show their relative directories and file names. Processed Science Images: Save them with a new suffix appended to their filenames so you can tell them apart from the original images. 14
03/08/2012
OK, so now you have cleaned images. Will they really look that much better? It sort of depends. Below are before a before and after processing pair of science images. Visually, these do not look much different from each other. However, you can be more confident that errors will be smaller in the measurement of the magnitudes of stars in the “cal” image. Aperture photometry and light curve plotting are the topics of Part II in this series.