Zen of Iraf
Zen of Iraf
Zen of Iraf
A. Charles Pullen
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 1 of 53
Table of Contents
I. INTRODUCTION..3
II.BEGININGS4
A .Background.4
B. Assumptions..4
C. LINUX Review..4
D. Installation of IRAF on the LINUX PC5
E. Getting to Know the Beast - Fun with dev$pix5
III. IMAGE CALIBRATION.9
A. Overview.10
B. File Names...10
C. Getting Headers Straight.10
D. Getting to Know ccdproc13
E. Fixing Bad Pixels.15
F. Overscan Corrections...17
G. Overscan Trimming.18
H. Dark Subtraction.18
I. Making a Master Bias Frame and Applying Bias.19
J. Making Master Field Frames and Applying Flat Field Correction..20
K. Registering Images or Performing Astrometry...22
IV. INSTUMENTAL PHOTOMETRY...23
A. Identifying Standard Stars23
B. Using daofind for Star Identification...25
C. Setting Aperture and Background Annulus Size.29
D. Extracting Raw Photometry with phot.30
V. STANDARD SYTEM CORECTIONS..34
A. Making an Image Set34
B. Making a Standard Star Observation File.35
C. Making Configuration Files..38
D. Fitting the Transformation Plots...40
E. Back Checking Your Work...41
VI. THE FINISHED PRODUCT..43
VII. ACKNOWLEDGMENTS..45
VIII. RESOURCES...46
XI. REFERENCES..46
X. APPENDIX.....46
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 2 of 53
I. INTRODUCTION
Go beyond this way or that way, to the farther shore where the world dissolves
and everything becomes clear. Beyond this shore and the farther shore,
Beyond the beyond, where there is no beginning, no end, without fear, go.
- Buddha in the Dhammapada
"IRAF is the Image Reduction and Analysis Facility, a general purpose software system for the
reduction and analysis of astronomical data. IRAF is written and supported by the IRAF programming
group at the National Optical Astronomy Observatories (NOAO) in Tucson, Arizona. NOAO is operated
by the Association of Universities for Research in Astronomy (AURA), Inc. under cooperative
agreement with the National Science Foundation" (from http://iraf.noao.edu/iraf/web/).
The astute reader will have already noticed that IRAF is made by a consortium, controlled by a
government contractor, overseen by a committee. That's the bad news. The good news is that IRAF is
the most powerful, free, software for CCD image reduction and analysis that the U.S. taxpayer ever
provided the astronomical community, amateur and professional alike. That said, it has also been called
one of the most "user-antagonistic" pieces of software ever written (Hager, 2002). Part of this fact is
that it is primarily command line driven; remember MS-DOS? Another fact is that editing text files
does configuration of tasks, not using nifty dialogs as in Windows. But, once the user gets into the
method behind the madness, the logic behind IRAF can begin to grow on one.
IRAF is extremely well documented, with both on-board help files for every task as well as a number of
web accessible tutorials, reference guides, and user manuals (see resources). That's the good news. The
bad news is that the documentation has not kept up with version revisions. So, while you can get from
A to B following examples in the help files and other documentation, you probably worked too hard to
get there. The most glaring example of this problem is that, originally, IRAF required that FITS format
images be converted into an IRAF native format, .imh, using the command "rfits". This step, and
references to .imh files, fills the documentation. Yet, starting around 1995, IRAF became able to handle
FITS files transparently, with no need for image conversion! This document will try to help you avoid
the painful steps to IRAF self-realization the author endured.
Originally intended for UNIX mainframes with tape drives, IRAF has been made accessible to the
LINUX PCs that are replacing even Sun workstations. This conversion again comes with a price - the
documentation is not specific to the LINUX version, and may even conflict at times. One personality
trait of LINUX users is (or should be) that they are willing to exchange thinking by droids in Redmond,
Washington ( Microsoft) with greater computing power at the expense of complexity. The user who
sees every error message, failure to execute a command, or system lock up as a worthy challenge, will
do well with LINUX and IRAF. The user who doesn't will likely be found naked, screaming, in the rain,
on a dark night, in their local city park prior to being institutionalized. Or follow the legions of
previous users who just gave up trying. Be of stout heart! IRAF's ability to simplify, yes simplify, your
image reduction and photometry is worth the journey; as is the benefit to your personal spiritual growth
though adversity. And you will grow...
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 3 of 53
II. BEGINNINGS
One equal temper of heroic hearts,
Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield.
- Tennyson
A. Background
As part of Swinburne Astronomy Online, I chose to do a project in HET611 - astrophysics, involving
plotting and interpreting a Color-Magnitude Diagram (CMD) for the open cluster M67. I decided to
combine aspects of this project with another course taken concurrently, HET609 - Imaging. So, for the
imaging project (this document) it was proposed to make a user's guide to IRAF. Specifically, this guide
was to be for the non-LINUX expert and would also be more current than the official offerings from
NOAO. The author had dabbled with IRAF in the past, but knew that the need to make a class
deliverable would be an incentive to really "break though" past failures and disappointments. The CMD
project involved the calibration of B, R, and I images of SA104, SA107 (each at several airmasses) and
M67 taken with a 2085 by 2085 pixel CCD at McDonald Observatory by PhD candidate (now Dr.)
Pamela Gay. The student was expected to process the data fully, though a B-R vs R plot on the
Johnson-Cousins UBVRI system.
B. Assumptions
It is assumed you have an i86 PC clone, with some flavor of LINUX installed and working. The project
was performed using Red Hat 7.2, on a Pentium -4 clone with 256MB of RAM, and an 80 GB hard
drive. If you don't have this horsepower, some of the image processing steps will just take a bit longer.
"NOAO PC-IRAF Revision 2.11.3 EXPORT Thu Feb 10 23:10:10 MST 2000" (from the "Welcome to
IRAF" paragraph that shows every time you start IRAF) was used. As of this writing, they are up to PCIRAF 2.12.1, but it is assumed that there are no significant differences at the level we will be working.
Aa KDE Graphical User Interface (GUI) was used, but GNOME would work just as well. It is also
assumed you have downloaded and installed SAOIMAGE - DS9 as an image viewer. ( see the resources
section). But, you can use the integral IRAF viewer (XIMTOOL) if you wish, (see below).
C. LINUX Review
LINUX is a powerful, multitasking operating system for i86-based PCs, developed by Linus Torvalds in
1991. At the command line, it is at heart UNIX, which has existed in various forms since the days of
punch cards. Unlike Windows, LINUX does many operations at once, and is nearly immune to system
crashes (e.g. the infamous Microsoft "blue screen of death"). However applications can and do crash on
LINUX, as you'll see with IRAF. Various forms of LINUX can be downloaded free, and installed in
conjunction with a Windows operating system such that you can choose at boot up which system you
want to use. Or you can purchase some LINUX flavors, such as Red Hat, and get access to good
manuals and even telephone technical support. If you are not really into computers, a good technical
guide for your LINUX system is a must, because the onboard "man" (manual) pages are often too terse
and too comprehensive for the non-technogeek. For RH 7.2, one such tome is the "Red Hat Linux 7.2
Bible-unlimited version" (Megus 2002 - Hungry Minds , Inc.) which is comprehensive yet
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 4 of 53
understandable. And, they include the three installation CD-ROMS as well, justifying the U.S.$50
price!
D. Installation of IRAF on the LINUX-PC
1.Where to get it.
Having heard horror stories about trying to install the ftp version, the author purchased "LINUX for
Astronomy CD-ROM, Volumes 5 and 6" from "The Random Factory". They have compiled for LINUX
a vast amount of professional astronomical software, and developed, where needed, install scripts to
automate the installation. This approach was cheap (U.S.$80) and following the instructions was
painless. You can also download it for free, and follow NOAO's instructions. It is rumored that the
later versions of PC IRAF install much easier than the older versions. But, once installed, you still have
a bit of configuration to do to make it work.
2. Setting up your basic parameters - login.cl
The file login.cl was placed in whatever directory you installed IRAF (probably your home directory,
home/username) when you executed the 'mkiraf' command to finish installation. Using the command
line command 'find login.cl' , (type without the quotes, and hit enter to input the command) should help
you find it. Once found, lets first make a copy of the default file, just in case something bad happens.
Use 'cp login.cl login.cl.bak' to make a copy. Now lets look at login.cl with your favorite text editor.
This author prefers EMACS, so 'emacs login.cl' should bring it up. Note that any thing with a # in front
of it in the login.cl file is not enabled.
Refer to the login.cl file, in the Appendix if you dont have one on the screen in front of you. 'set home'
tells you where IRAF is. 'imdir' is where .imh pixel files are stored, but we won't be using them - just
ignore it. Also ignore right now 'uparm' and 'useid'. Under set terminal type, you'll see some
programming language, then 'stty gterm' and later 'stty xterm'. We'll open IRAF in an Xterm window
manually, so just leave these alone. The next parameters are some important ones. 'Editor' is which
LINUX text editor will be invoked by IRAF with the command 'edit'. To change from the default vi,
just type over that with emacs, pico, or leave it at vi if you are comfortable with that editor. 'stdimage' is
the default image size you will be using in terms of pixels. For most amateur CCD, the imt512 value
is fine. But, for this project, stimage was reset to imt2048 as the trimmed images were 2048 by 2048
pixels square. 'imtype' should tell the file extensions of your images; the authors were 'fit'. 'imextn' is
an function that will allow IRAF to open various types of FITS extensions (like fit, fts, fits) that are used
often interchangeably. The author is set to 'imextn="fxf:fit,fts,fits oif:imh ', to cover all the bases.
That's pretty much it at this point. Save your file and exit. You should be ready to go.
Note that if you want to try any change to login.cl without actually changing the file, you can always
type one of the 'set" lines from the IRAF command prompt cl>. For example, you want to try using vi
as a text editor type: 'set editor=vi' to change it for just that session.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 5 of 53
cl>
Now, from the cl> prompt, let's open our image viewer, DS9, by typing '! ds9 &' . DS9 should open in a
separate window. Yea! You are up and running.
Note that the way to close IRAF is to type 'logout' at the prompt. Just closing the window could leave it
unhappy. Also, if you get any kind of error message, reset things with the command 'flpr' which is
supposed to recover any faulty processing from the error. You'll want to do flpr if you ever use 'cntl-c'
to abort an IRAF process that is running away or hung up.
2.Why DS9?
IRAF has an onboard image viewer included in the distribution, ximtool. Why not use that? The simple
answer is that it only works if your computer is set up for 8-bit color. Most folks have not used 8-bit
color since their first color Macintosh was purchased in 1985. 8 bit means 28 colors to represent every
possible shade. That's 512 colors. Your computer is probably running 16 or 24-bit color. DS9 will run
fine on either of those. Or, if you want to use ximtool, change your color scheme by typing
'xconfigurator' at the shell command line, and follow the instructions (select with the space bar, move
though the menus with the tab key). If you only use the computer for IRAF, it probably won't matter
changing it to 8 bit, but if you want to see photos of your grandchildren, you'll want to get DS9 so you
don't have to keep changing back and forth, and rebooting each time you do.
3.Basic IRAF Tasks
a. Image Display
Lets open an onboard image: type 'display dev$pix 1'. The image of M51 should appear in DS9 frame
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 6 of 53
14June 2003
Page 7 of 53
(xsize = 1.)
display window horizontal size
(ysize = 1.)
display window vertical size
(xmag = 1.)
display window horizontal magnification
(ymag = 1.)
display window vertical magnification
(order = 0)
spatial interpolator order (0=replicate, 1=line
(z1 = )
minimum greylevel to be displayed
(z2 = )
maximum greylevel to be displayed
(ztrans = "linear")
greylevel transformation (linear|log|none|user)
(lutfile = "")
file containing user defined look up table
(mode = "ql")
cl>
The columns are "parameter="what's set", then a description of the parameter. Note that image and
frame are not in parentheses. These have to be set each time the command is invoked. However, the
parameters in parenthesis are generally not changed often.
You can modify the parm file with the command epar display. Your cursor can be navigated up and
down the options with the up and down arrow keys. To change a parameter, just type over it, then hit
enter. Make a mistake while typing and you cant backspace because of some incompatibility with your
system? Save it with enter then retype it. When done, move the cursor to the last line of the file
(mode) and exit and save the parm file with ':q'.
Try changing the display parm file to display dev$pix in frame 4, then quit and save. Now, at the cl>
type display, then hit the return key to accept the offered value in parentheses as below.
cl> display
image to be displayed (dev$pix): [return]
frame to be written into (1:4) (4): [return]
cl>
Toggle DS9 into frame - tile mode, and you should see two panes of the M51 image. You'll become
familiar with parm files as we go ahead, but to recap:
What if you think you have somehow damaged the parm file for a given command? Type: 'unlearn
command'. That returns the parm file to the default value.
While at display, we also should learn about help pages for every command. The help file covers
all the gory details, including some examples of how to use a given command. Type 'help display', and
you'll get a detailed explanation of every one of those "hidden parameters", and more information.
Scroll one page at time with the space bar. At the end, quit with 'q' or by scrolling down past the bottom
of the file. But note the help files are not necessarily current! In addition, they are not specific to the
LINUX version. As one example, they will be full of references to those .imh images you no longer
need! Part of the Zen of IRAF is learning to remain calm and centered in the face of non-current
instructions.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 8 of 53
c. imexamine
Place the cursor over a bright star on dev$pix, then type 'r'. A radial plot should pop up showing you the
FWHM of the image (the 2.5 numbers to the right. Don't close the popup yet, or you'll crash IRAF.
Move the cursor to another bright star, and hit 'c' for a contour plot. Try 'h' for a histogram. On the
same star, try 'a' for aperture photometry. Now you'll get a print out to your IRAF text window with data
like:
# COL LINE COORDINATES
# R MAG FLUX SKY PEAK E PA BETA ENCLOSED MOFFAT DIRECT
441.96 409.67 441.96 409.67
13.93 26734. 45. 3279. 0.02 -57 5.41 2.34 2.43 2.38
Also try '.' and ',' for photometry. You get similar information, but you may prefer one way over another.
Now, try 'x' for coordinates, and get something like: 478.00 329.00 49 where you have the X pixel, Y
pixel, and the value of the pixel. Try both 'a' and 'x' on the same star, and see if the pixel coordinates
match. The 'a' coordinates are based on a centroid solution. Exit imexamine with a 'q'. Then close the
graphics window.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 9 of 53
Figure 3 - Histogram
We'll be using mostly 'ccdproc' for this work, although (like the rest of IRAF) there are several other
ways to do it. The advantage of 'ccdproc' is that you can do a full night's image calibration with a
very few instructions once it is set up and you understand what you are doing.
B. File Names
IRAF can make powerful use of the "*" wild card function if you set up your image file names right.
It can also use image lists as inputs into calibration commands, where by you listed the names of the
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 10 of 53
file you wanted processed - once - into a text file. However, I find that image names that tell me
what the image is, and what kind of image it is are very time saving. I use the following conventions:
Flats: flatFN.fit (example: flatR1.fit)
Bias: zeroN.fit (example: zero5.fit)
Fields: "field"FN.fit (example: M67B3.fit)
where:
F = filter name (BVRI)
N= frame number (1,2,3...N)
"field"= field name (M67, SA104, SSCyg)
Another thing to keep in mind is that when running image calibration routines though the ccdproc
command, IRAF will sort out which files are which from the image header. But it sure helps if you
can tell what an image is up front. Something like "sci0001tr5.fit" is a bit cryptic.
C. Getting Headers Straight
Because IRAF will be using image headers, they need to be right. You can get a short-listing of what
is in a given directory by using the "imheader *.fit" command. With my project, you get the
following partial output:
cl> imheader *.fit
104b1.fit[2080,2048][ushort]: SA104 B
104b2.fit[2080,2048][ushort]: SA104 B
104i1.fit[2080,2048][ushort]: SA104 I
...
What! Remember that peace is in the mind of the believer- believe you are at peace, and you will be
at peace
IRAF loads a small set of tasks at start up. You can modify that list, it's in your login.cl file. But
remember that IRAF was written in the days of limited memory. So, we have to load the package
that ccdproc is in. That is done as follows:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 11 of 53
Change to 'noao'
cl> noao
artdata.
digiphot. mtlocal.
observatory surfphot.
astrometry. focas.
nobsolete. onedspec. twodspec.
astutil.
imred.
nproto.
rv.
Change to 'imred'
no> imred
argus.
ctioslit. generic. irred.
kpnoslit.
bias.
dtoi.
hydra.
irs.
specred.
ccdred. echelle. iids.
kpnocoude. vtel.
Change to 'ccdred'
im> ccdred
badpiximage
ccdmask
ccdgroups
ccdproc
ccdhedit
ccdtest
ccdinstrument combine
ccdlist
cosmicrays
cc>
darkcombine
mkskycor
flatcombine
mkskyflat
mkfringecor
setinstrument
mkillumcor
zerocombine
mkillumflat
I asked for the 'noao' package, which gave me another list. I asked for the 'imred' package, and
finally the 'ccdred' package that has 'ccdedit' in it. Note that the prompt changed each time I switched
packages (cl> to no> to im> to cc>). That is one way IRAF tells you where you are. To go back (or
unload) a package, type 'bye':
cc> bye
argus.
ctioslit. generic. irred.
kpnoslit.
bias.
dtoi.
hydra.
irs.
specred.
ccdred. echelle. iids.
kpnocoude. vtel.
Im>
See how I moved back one step? So, to get back all the way to the cl> prompt, I'd have to type 'bye'
for each level. Yes, there are layers and layers of packages, each with a number of different tasks.
"In complexity one can find beauty".
To review, ccdhedit is in the ccdred package. To get there, you have to move as follows: opening
level (cl>), noao (no>), imred (im>),ccdred (cc>). To move back in the package set, type 'bye for
each level.
Now, back to subsets. We want to teach IRAF what each type of image is. We are confirming the
'imtype' and are adding 'filter' to the image header. Here is how to do it with 'ccdhedit':
ccdhedit bias* imgetyp zero
ccdhedit flat* imagetyp flat
ccdhedit dark* imagetyp dark
ccdhedit flatB* subset "B"
ccdhedit flat R* subset "R"
ccdhedit flatI* subset "I"
ccdhedit field1!* imtyp object
ccdhedit field1B* subset "B"
ccdhedit field1R* subset "R"
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 12 of 53
Now, if this seems like a lot of typing, it is. If you can set up your acquisition software to do it for
your, so much the better. Or, if you use the same naming conventions all the time, you can make up a
simple shell script (or an IRAF script) to type all this in for you. See the example of a script in the
'ccdhedit' help file.
2. Header Inspection
So, how did IRAF know what was what when I typed 'imheader'?
104b1.fit[2080,2048][ushort]: SA104 B
It got the information from the image header, either because the camera operating software put it
there, or we later added it, or a combination of both.
If you want to look at the entire header, then type 'imheader m67r.fit l+' and your output will be:
m67r[2046,2046][real]: M67 R
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [2046,2046], length of user area 2673 s.u.
Created Sat 15:17:47 10-May-2003, Last modified Sat 15:17:44 10-May-2003
Pixel file "m67r.fit" [ok]
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 1999' / FITS file originator
EXTEND =
F / File may contain extensions
IRAF-TLM= '15:17:44 (10/05/2003)' / Time of last modification
OBJECT = 'M67 R '
/
DATE = '2003-05-10T15:17:47'
IRAF-MAX=
5.683400E4 / DATA MAX
IRAF-MIN=
3.187000E3 / DATA MIN
OBSERVAT= 'MCDONALD
' / observatory
EXPTIME =
60.00 / actual integration time
DARKTIME=
60.00 / total elapsed time
IMAGETYP= 'object
' / object, dark, bias, etc.
DATE-OBS= '2001-04-24
' / date (yyyy-mm-dd) of obs.
UT
= ' 3:21:57.35'
/ universal time
ST
= '10:34:46.47'
/ sidereal time
EPOCH =
2001.31 / epoch of ra and dec
HA
= '+10:34:46.5
' / hour angle
ZD
= '21.27
' / zenith distance
AIRMASS =
1.073 / airmass
TELESCOP= 'mcd30
' / telescope name
PROGRAM = 'ICE-1.5
' / program used to get and write data
DETECTOR= 'lf1_0004
' / detector microcode name
SSI = '#5 Revision B ' / synchronous serial interface id
DSP = '#6 Revision F ' / digital signal processor id
PREFLASH=
0 / preflash time, seconds
GAIN =
1.60 / gain, electrons per adu
RDNOISE =
5.87 / read noise, electrons
CAMTEMP =
0 / camera temperature
DEWTEMP =
0 / dewar temperature
CCDSEC = '[2:2047,2:2047]' / orientation to full frame
ORIGSEC = '[1:2048,1:2048] ' / original size full frame
CCDSUM = '1 1
' / on chip summation
INSTRUME= 'pfc
' / instrument
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 13 of 53
INSFILTE= 'R
' / instrument filters
INSFOCUS= '-788
' / instrument focus
INSTRTEM= ' 9.59
' / instrument current temperature
HISTORY 'KPNO-IRAF'
/
HISTORY '2001-04-26T09:11:56'
FILTERS = 'R
'
Some of the fields that were added or altered with our 'ccdhedit' exercise above have been
highlighted. Some of these fields are not important for your data, others are critical. Exposure time
(EXPTIME) is critical. IMTYPE helps IRAF distinguish between bias, flat, and actual data images
(which are called "OBJECT") The filter (INSFILTE and/or FILTERS) is critical. For all-sky
photometry, AIRMASS is critical. Various sections ending in 'SEC' tell IRAF what areas of the
image to use for what processing step, are critical.
These should be correct if your image acquisition software is doing it's job. If not, or if you want to
modify the header, you can do so with the 'ccdhedit' command. For example, if the real airmass for
the above image was 1.53, you could change the header with 'ccdhedit m67r.fit airmass=1.53'
You can do multiple changes with commas 'ccdhedit m67r.fit airmass=1.53, exptime=62, insfilter=V'
You can also add comments to the header, such as: 'ccdhedit m67r.ft comment=peace is in the mind
of the believer'. Then do 'imheader imagename l+' to see that your changes took place.
So, now that we are 'headed' (sorry!) in the right direction, let's do some image processing.
D. Getting to Know 'ccdproc'
Let's start with looking at the par file for ccdproc, type 'lpar ccdproc' and you'll get:
cl> lpar ccdproc
ERROR: task `ccdproc' not found
lparam (ccdproc)
Gotcha! Make sure you are in the noao.imred.ccdred package. So, get back in to the ccdred package,
and type 'lpar ccdproc'.
cc> .lpar ccdproc
images = "*.fit"
List of CCD images to correct
(output = "out*.fit") List of output CCD images
(ccdtype = "object")
CCD image type to correct
(max_cache = 0)
Maximum image caching memory (in Mbytes)
(noproc = no)
List processing steps only?\n
(fixpix = no)
Fix bad CCD lines and columns?
(overscan = no)
Apply overscan strip correction?
(trim = no)
Trim the image?
(zerocor = no)
Apply zero level correction?
(darkcor = no)
Apply dark count correction?
(flatcor = yes)
Apply flat field correction?
(illumcor = no)
Apply illumination correction?
(fringecor = no)
Apply fringe correction?
(readcor = no)
Convert zero level image to readout correction?
(scancor = no)
correction?\n
(readaxis = "line")
Read out axis (column|line)
(fixfile = "pambadpix.pix") File describing the bad lines and columns
(biassec = "image")
Overscan strip image section
(trimsec = "image")
Trim data section
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 14 of 53
This is a working par file, not the default. But, let's look at the important fields. 'images' is a set of
images you want to work on at once. 'output' is what the images could be called if you just didn't
overwrite them. 'ccdtype' is the generic type of image to you want to work on (could be 'zero', 'flat',
or 'object'). Think of it as a subset of the 'image' parameter. 'fixpix' applies a bad pixel mask to the
image, more later on that step. 'overscan' uses the average pixel value in the BIASSEC area to
subtract pedestal from each row. 'trim' removes the bias strip and any other parts you specified in
your TRIMSEC. When 'BIASEC='image' IRAF will use the section defined in the image header. Or
you could put it here. The various '...COR' parameters are correction steps. We will perform zero
(bias), and flat corrections in sequence. Down farther, 'interactive' allows you to hand-tweak the bias,
which is probably better left to IRAF for the beginner. Below that are the names of various images,
some not yet made, that we will use in the image calibration. The rest can be left in their defaults for
now. The great power of ccdproc is that you can do all the image calibration steps in one command.
This is a great time saver. However, using ccdproc, we will do multiple passes through out image
set, so as to understand each step. We will do this by toggling on and off the various parameters.
So, put all your images in one directory (we'll call it 'image'). This should be a working directory, so
that the raw images are also stored somewhere else. You may be overwriting them, so you want a
back-up set in case you (or IRAF) do something weird to them. There is serenity in knowing you can
always start from scratch. Change to that working directory at the IRAF command line with:
' cd image'. Check that you are in the right directory with the 'path' command 'path', which should
return something like: "yourcomputername!/home/username/image". Note: to go back, you either
need to type the entire directory path, or do 'cd ..' which will move you back one level.
You can also do 'dir' to see what is in the directory:
104.3.cfg~
104i1.fts
104.3.config~ 104i2.fts
104.5,cfg
104imset
104.ans
104imsets
104.cfg~
104r1.fts
104stobs2~
107r1.fts
m67.coo.4
107.coo
107r2.fts
m67.mag.1
107.mag
107r3.fts
m67.mag.2
107.mag.2
2try
m67.mag.3
107b1.fts
SA104BRI
m67b.fts
14June 2003
Page 15 of 53
of the chip, the greater the odds of something going wrong. The good news is that these defects are
built into the chip, so they don't change from image to image. If they don't change, they can be
corrected. The defects are most obvious on the bias images. Since a bias image is zero seconds, all
you really see are the defects and the underling bias current. The way IRAF corrects these defects is
to interpolate between the bad pixel (or series of pixels such as in a column) and adjacent pixels that
are not damaged. It then replaces the "bad" pixel values with the interpolated ones.
You might well ask yourself: Is this legitimate? Wouldn't it be better to just not use data
contaminated by a physical defect in the chip? Probably! Except it is very hard to control exactly
what pixels are going to be needed down the road. So, lets just fix them and move on.
Since the bad pixels are physically on the chip, you need to make a bad pixel mask that tells IRAF
which pixels are bad and need interpolation. An example of a mask made for the camera that took
my images is in the Appendix. Each line is a coordinate set for the untrimmed image. "5 334 1 4"
means "from pixel column 5 to column 334, and row 1 to row 4, inclusive.
So, one must specify which pixels and/or columns you want to fix. The example mask was made
"with much cursing" (Gay, 2003) over time. The key point to making a mask is to identify the pixels
properly. Note that they are integers. If whatever you are doing is giving you fractional row:column
pixel coordinates, you are doing something wrong (however, star centroids may well be determined
to fractional pixel values).
One way to determine the grossest errors, like a bad column, is to use 'imexamine', place your cursor
over the bad pixel (use the magnifier) and hit 'x'. This outputs: 1107.00 1213.00 5.08008
showing the column and row coordinates, and the value of the pixel, respectively. You can also do l
for a line plot (Figure 4). Note that I am zoomed in on the image (see the blue box on the magnifier.
So, I zoom out, I can see that the bad column is the entire height of the image, from row 1 to row
2048. But, while zoomed out, if I try 'x', I get different coordinates for the column number!: 1105.00
1988.00 7.08008
Figure 4 Spike is the bad column
14June 2003
Page 16 of 53
coordinate resolution.
The point of this exercise is that making up bad pixels masks by inspection is a pain. There are other
ways. One is to take a flat field image of two different exposure lengths, then subtract them (Massy,
1997; Wells & Bell, 1994). The resultant "image" is your bad pixel mask, because it only shows the
"high points". This process is covered in detail in the references. The good news is you only have to
get the mask right, once, then use it over and over. So, given that the "bad pixel mask fairy" provides
you with a mask, as she did for me, lets fix those pesky bad pixels.
Going back to epar ccdproc, lets modify the parameter file to fix the bad pixels with fixpix:
cc> lpar ccdproc
images = "*.fit"
List of CCD images to correct
(output = "out*.fit") List of output CCD images
(ccdtype = "")
CCD image type to correct
(max_cache = 0)
Maximum image caching memory (in Mbytes)
(noproc = no)
List processing steps only?\n
(fixpix = yes)
Fix bad CCD lines and columns?
(overscan = no)
Apply overscan strip correction?
(trim = no)
Trim the image?
(zerocor = no)
Apply zero level correction?
(darkcor = no)
Apply dark count correction?
(flatcor = yes)
Apply flat field correction?
(illumcor = no)
Apply illumination correction?
(fringecor = no)
Apply fringe correction?
(readcor = no)
Convert zero level image to readout correction?
(scancor = no)
Convert flat field image to scan correction?\n
(readaxis = "line")
Read out axis (column|line)
(fixfile = "pambadpix.pix") File describing the bad lines and columns
(biassec = "image")
Overscan strip image section
(trimsec = "image")
Trim data section
(zero = "zero.fit") Zero level calibration image
(dark = "")
Dark count calibration image
(flat = "flat*.fit") Flat field images
It will confirm the image set (no parenthesis) and then run it by itself. Note that we are apply this to
all images, so change 'ccdtype' to all with "" (double quotes). Run ccdproc again, then display a bias
image and see what it now looks like. In my case, Fig. 4a went to 4b. Magic!
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 17 of 53
Figure 4a - defects
F. Overscan Corrections
So, now lets do the first part of the overscan correction. Toggle overscan to 'on' with an 'epar
ccdproc' and turn everything else off so that your ccdproc file looks something like:
images = "*.fit"
List of CCD images to correct
(output = "out*.fit") List of output CCD images
(ccdtype = "")
CCD image type to correct
(max_cache = 0)
Maximum image caching memory (in Mbytes)
(noproc = no)
List processing steps only?\n
(fixpix = no)
Fix bad CCD lines and columns?
(overscan = yes)
Apply overscan strip correction?
(trim = no)
Trim the image?
(zerocor = no)
Apply zero level correction?
(darkcor = no)
Apply dark count correction?
(flatcor = no)
Apply flat field correction?
(illumcor = no)
Apply illumination correction?
(fringecor = no)
Apply fringe correction?
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 18 of 53
G. Overscan Trimming
Now that we've used the bias strip to adjust for row-by-row bias, we can get rid of it on all our
images. Why? It just takes up memory, and looks ugly on our images. So, go back to epar ccdproc
and toggle off 'overscan' and toggle on 'trim' as follows:
images = "*.fit"
List of CCD images to correct
(output = "out*.fit") List of output CCD images
(ccdtype = "")
CCD image type to correct
(max_cache = 0)
Maximum image caching memory (in Mbytes)
(noproc = no)
List processing steps only?\n
(fixpix = no)
Fix bad CCD lines and columns?
(overscan = no)
Apply overscan strip correction?
(trim = yes)
Trim the image?
(zerocor = no)
Apply zero level correction?
(darkcor = no)
Apply dark count correction?
(flatcor = no)
Apply flat field correction?
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 19 of 53
'input' is the images you want to use to combine. Remember our file naming conventions? Here is
where you use them. 'output' is what the combined bias frame will be called. 'combine' is the
statistical method you want to use. I prefer median combine for bias and flats, but you could use
'mode' as well. 'reject' for a bias frame is suggested to be 'minmax'. 'ccdtype' is another way to
specify which images you would use from your 'input' set. So, with 'image=*.fit' you could use
'ccdtype=zero' and still only combine the bias images. 'process' is for combining steps into one grand
ccdproc run. 'delete' is to get rid of your original bias images to keep them from cluttering up your
directory -- use it at your own risk!
So, now that we are all set up, lets try 'zerocombine'. It will produce the image zero.fit (Fig.2b).
Display zero.fit on your viewer, as well as one of the bias frames used to make it. Go to imexamine
(which works in the ccdred task, no need to move back to the cl> level) and look at the same pixel
coordinates with 'm' (image statistics).
For the master bias (zero.fit):
#
SECTION NPIX MEAN MEDIAN STDDEV
MIN
[1104:1108,1065:1069]
25 98.56
96. 26.88
48. 168.
[850:854,1143:1147]
25 100.2 104. 28.39
40. 152.
MAX
By median combining many bias frames, you have lowered the overall noise, which was the goal of
the exercise. How many frames is enough? Some say as many as 25 to 50! The example was done
with 5. Note the apparent residual column defect on Fig. 2b. It is really an artifact of the viewer
contrast, as it is invisible on a line plot.
Now, lets apply that master bias (zero.fit) to the rest of our frames with ccdproc:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 20 of 53
images = "*.fit"
List of CCD images to correct
(output = "out*.fit") List of output CCD images
(ccdtype = "object", "flat")
CCD image type to correct
(max_cache = 0)
Maximum image caching memory (in Mbytes)
(noproc = no)
List processing steps only?\n
(fixpix = no)
Fix bad CCD lines and columns?
(overscan = no)
Apply overscan strip correction?
(trim = no)
Trim the image?
(zerocor =yes))
Apply zero level correction?
(darkcor = no)
Apply dark count correction?
(flatcor = yes)
Apply flat field correction?
(illumcor = no)
Apply illumination correction?
(fringecor = no)
Apply fringe correction?
(readcor = no)
Convert zero level image to readout correction?
(scancor = no)
Convert flat field image to scan correction?\n
(readaxis = "line")
Read out axis (column|line)
(fixfile = "pambadpix.pix") File describing the bad lines and columns
(biassec = "image")
Overscan strip image section
(trimsec = "image")
Trim data section
(zero = "zero.fit") Zero level calibration image
(dark = "")
Dark count calibration image
(flat = "flat*.fit") Flat field images
Note that for 'ccdtype' this ccdproc run will subtract the bias from both the flat field and object
images. Run ccdproc, and move on to flat fielding!
J. Making Master Flat Field Frames and Applying Flat Field Corrections
Just like we made our master bias frame, we must make master flat frames for each filter used. You
probably have guessed how we are going to do that flatcombine!
Look at the param file for flatcombine:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 21 of 53
(gain = "1.")
(snoise = "0.")
(pclip = -0.5)
(blank = 1.)
(mode = "ql")
Go ahead and run it, then look at the headers of your object fields. Here is an example of the final
lines in a FITS header from a calibrated image:
FIXPIX = 'May 10 15:02 Bad pixel file is pambadpix.pix'
CCDPROC = 'May 10 15:17 CCD processing done'
TRIM = 'May 10 15:09 Trim data section is [2:2047,2:2047]'
OVERSCAN= 'May 10 15:09 Overscan section is [2057:2072,2:2047] with mean=3204.4'
ZEROCOR = 'May 10 15:09 Zero level correction image is zero.fit'
LTV1 = 2048.00006509877
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 22 of 53
LTV2 = 2047.99993490121
FLATCOR = 'May 10 15:17 Flat field image is flatR.fit with scale=25884.08'
It tells us that the image has been trimmed to 2046 by 2046 pixels. It is now "real", which means 32 bit floating point.
K. Registering Images or Performing Astrometry
We are, unfortunately, not out of the woods yet. For our photometry, we will need to identify specific
stars in a way IRAF can understand. This means pixel coordinates or a WCS astrometric solution.
An astrometric solution provides header information to allow IRAF and DS9 to display coordinates
in RA and DEC to some precession epoch. These are much preferred over just pixel X and Y,
because you can then identify stars by their "proper names", RA and DEC.
As it stands right now, IRAF doesn't really have an astrometry routine. SAO puts out a WCS
calculation tool called (oddly enough) WCS-Tools for use in LINUX. WCS-Tools is also free.
Unfortunately for me, it would be another project to get it working! A friend who is a geophysicist
and lives and breathes both Linux and astronmetry could not get WCS tools to work (Billings, 2003).
I attempted to use the LINUX planetarium software Xephem that has a WCS tool. However, it would
not work on any of the object images, presumably due to their size, although "human error" (me!)
cannot be ruled out either. So, pixel coordinates were used to identify specific stars. This creates
another problem.
In any of the object images, a given star is not at the same coordinates. So, the images had to be
"registered" such that a given star was at the same place in all the images of that field. If you think of
a FITS image as a 3D plot of z, y, and z (where x = row, y= column, z= the value of the pixel) it is
easy to visualize how images are registered. One takes an image of a given field, calls that the
master, and coordinates are compiled for a number of clear, well defined stars in each image. One
can then calculate the amount of x,y transformation that is needed, and add or subtract these values
from the entire matrix of x,y,z coordinates. If we were using photographic negatives, you could
imagine moving the film around until all the stars line up.
While the concept is simple, the IRAF execution was not. At the time I was trying to register the
images, I was having great inner turmoil with IRAF, and the tasked looked very daunting. So, I took
the easy, yet sinful, way past this karmic bump, and used the Windows software Mira 6.2 to do the
registration. In MIRA one loads the images into the program, clicks on the stars one wants to use as
registration points, and tells it to register the image stack to those stars. It worked fine, although it
took over 20 minutes to process an image stack of 9 SA107 images due to their 16 MB (each) size!
This section will be rewritten for IRAF after I have had a chance to figure it out.
There is Windows camera software that will perform precision astrometry on images as they are
taken. Its called PinPoint, which is part of the ASCOM Initiative (http://www.dc3.com). Use of this
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 23 of 53
software will make astrometry at the precision needed for my work just part of taking the image - I
hope!
Save your calibrated images in a different directory, and lets try to extract some information from
them!
IV. INSTRUMENTAL PHOTOMETRY
Don't tell me how difficult the Way.
The bird's path, winding far, is
right before you. Water of the
Dokei Gorge, you return to the
ocean, I to the mountain.
Hofuku Seikatsu
A. Identifying Standard Stars
Figure 6 shows part of SA107. It,
and many others, has been
calibrated by Arlo Landolt (Landolt
1992) to act as UBVRI standards.
That means that their magnitude
and color is established and
referenced to the original equatorial
UBV stars of Landolt and Morgan.
However, finding out which star is
which can be difficult.
Nevertheless, correct identification
is critical.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 24 of 53
Another issue is simply finding which star is which. The original plates from Landolt 1992 are fairly
large scale, and even in an offset press published reprint (which was sent to me by Dr. Landolt upon
request), it can be difficult to see which star is which in some cases. Some photometrists have made
their own finder charts based on their own CCD images, if you can get some of these from a trusted
source they are worth their weight in gold. But, given that you have to use open resources, you can
access the Landolt 1992 catalog and finder plates on-line from ESO LaSilla. Close-up images of
some of the Landolt stars, organized by RA, can be found at Lick Observatory (URLs in Resources)
Now that you've decided which stars to use, you need to tell IRAF their coordinates. Open an image
in 'display', and execute 'imexamine'. Find each star on your image, and record it's pixel coordinates
with ','. That is one of the quick photometry routines that will give you output like:
# COL LINE RMAG FLUX
SKY N RMOM ELLIP PA PEAK MFWHM
940.97 1132.59 13.28 48806.5 111.12 78 2.34 0.111 -9.8 7300.69 2.33
1050.24 1066.43 15.00 9988.9 110.39 80 2.31 0.152 -6.6 1520.14 2.29
1126.96 1072.26 14.45 16623.1 111.43 77 2.23 0.174 -16.2 2709.07 2.13
842.48 874.10 16.16 3441.8 111.37 80 2.31 0.136 15.6 547.11 2.11
Note that the pixel coordinates are the centroids of the stars, so you don't have to be too careful where
you put your cursor. Note also the (MFWHM), this figure is in pixels, and will be used later to set
aperture size. Finally, note that fractional coordinates are OK for this application.
Once you get this data, cut and paste it into a text file, say 107.coo (highlight the output in your
Xwindow, open a text editor, place the cursor in it, and click both mouse buttons at once). All we
need are the coordinates, so you can delete all other information by hand.
Now, you might want to check that you have everything correct. One way to do this is to mark the
stars with the coordinates found in the .coo file (Figure 6, above). That is done with 'tvmark', in the
digiphot.daophot package. Epar 'tvmark'
da> lpar tvmark
frame = 1
Default frame number for display
coords = "107.pam.coo" Input coordinate list
(logfile = "")
Output log file
(autolog = no)
Automatically log each marking command
(outimage = "")
Output snapped image
(deletions = "")
Output coordinate deletions list
(commands = "")
Image cursor: [x y wcs] key [cmd]
(mark = "circle")
The mark type
(radii = "12,20,25") Radii in image pixels of concentric circles
(lengths = "0")
Lengths and width in image pixels of concentric
(font = "raster")
Default font
(color = 204)
Gray level of marks to be drawn
(label = no)
Label the marked coordinates
(number = yes)
Number the marked coordinates
(nxoffset = 20)
X offset in display pixels of number
(nyoffset = 0)
Y offset in display pixels of number
(pointsize = 5)
Size of mark type point in display pixels
(txsize = 2)
Size of text and numbers in font units
(tolerance = 1.5)
Tolerance for deleting coordinates in image pix
(interactive = no)
Mode of use
(mode = "ql")
The 'frame' is the DS9 frame the image is in. 'coods' is the .coo file you made. A 'outimage' would
have the marks embedded in it. 'mark type' is a circle, box, point, or none (which can be useful for
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 25 of 53
just numbering stars. 'radi' is in pixels, and you can simulate an aperture and background annulus ,
as I did above. 'color' is a code for the color of the mark, the help file has all the options. 'number'
numbers the markings in order of their appearance in the .coo file The 'offset' is how much off the
center of the coordinate to mark the number.
'tvmark' can be invoked with:
da> display 107r1 1
da> tvmark
Default frame number for display (2): 1
Input coordinate list (107.pam.coo):
If you want to extract this image for later use, such as in a paper, you can either do a screen capture,
or make it a 'snap' image from the 'tvmark' par file.
B. Using daofind' for Star Identification
For your program stars, you may be interested in just a few, or as many as possible in the field. In
my CMD project, I wanted all of them in M67. IRAF has a task (unique among photometric
software) for automatically finding large numbers of stars in a field, called 'daofind', also in the
daophot package with tvmark.
Figure 7 is my M67 field. Lets look at the par file for daofind:
da> lpar daofind
image = "m67r"
Input image(s)
output = "m67.coo.4" Output coordinate file(s) (default: image.coo.?
(starmap = "")
Output density enhancement image(s)
(skymap = "")
Output sky image(s)
(datapars = "")
Data dependent parameters
(findpars = "")
Object detection parameters
(boundary = "nearest")
Boundary extension (constant|nearest|reflect|wr
(constant = 0.)
Constant for boundary extension
(interactive = no)
Interactive mode ?
(verify = )_.verify)
Verify critical daofind parameters ?
(update = )_.update)
Update critical daofind parameters ?
(verbose = )_.verbose) Print daofind messages ?
(graphics = )_.graphics) Graphics device
(display = )_.display) Display device
(icommands = "")
Image cursor: [x y wcs] key [cmd]
(gcommands = "")
Graphics cursor: [x y wcs] key [cmd]
(mode = "ql"
'image' is the image. 'output' is the output file name, a .coo extension will tell you it it is a coordinate
file. But now things get complicated. 'datapars' and 'fitpars' have their own par file!
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 26 of 53
Edit it by putting your cursor on that line in epar, and type ':e'. For datapars, we get:
PACKAGE = daophot
TASK = datapars
(scale =
1.) Image scale in units per
pixel
(fwhmpsf=
2.5) FWHM of the PSF
in scale units
(emissio=
yes) Features are positive
?(sigma =
0.) Standard deviation of
background in counts
(datamin=
INDEF) Minimum good
data value
(datamax=
INDEF) Maximum good
data value
(noise =
poisson) Noise model
(ccdread=
) CCD readout noise
image header keyword
(gain =
) CCD gain image header
keyword
(readnoi=
0.) CCD readout noise in
electrons
(epadu =
1.) Gain in electrons per
count
(exposur=
EXPTIME) Exposure time
image header keyword
(airmass=
AIRMASS) Airmass image
header keyword
(filter =
FILTERS) Filter image header
keyword
(obstime=
UT) Time of observation
image header keyword
(itime =
30.) Exposure time
(xairmas=
1.7070000171661) Airmass
(ifilter=
R) Filter
(otime =
6:06:48.53) Time of
observation
(mode =
ql)
PACKAGE = daophot
TASK = findpars
(thresho=
(nsigma =
(ratio =
(theta =
(sharplo=
(sharphi=
(roundlo=
(roundhi=
(mkdetec=
(mode =
'datapars' and 'fitpars' tell daofind what defines a "star" of interest to you. You can screen out stars
based on minimum or maximum pixel value (noise or saturated), FWHM, or specific key words in an
image, so it doesn't try to find stars in your flats. Using the default values, more or less, lets try to
find some stars:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 27 of 53
da> daofind
Input image(s) (m67r):
Output coordinate file(s) (default: image.coo.?) (m67.coo.example):
FWHM of features in scale units (2.5) (CR or value):
New FWHM of features: 2.5 scale units 2.5 pixels
Standard deviation of background in counts (0.) (CR or value):
New standard deviation of background: 0. counts
Detection threshold in sigma (4.) (CR or value):
New detection threshold: 4. sigma 0. counts
Minimum good data value (INDEF) (CR or value):
New minimum good data value: INDEF counts
Maximum good data value (INDEF) (CR or value):
New maximum good data value: INDEF counts
...
1336.31 1985.12 -2.810 0.643 -0.220 -0.378 943
607.48 1996.66 -4.849 0.597 -0.197 -0.110 944
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 28 of 53
1053.98 2005.81
179.96 2006.95
1869.94 2008.86
259.35 2013.66
1198.58 2013.70
495.01 2028.77
1192.94 2033.69
984.83 2041.23
-2.561
-2.576
-3.355
-4.177
-2.346
-1.826
-3.202
-2.438
0.615 0.347
0.608 -0.158
0.653 0.007
0.594 -0.168
0.609 0.036
0.593 -0.125
0.647 0.011
0.612 -0.438
-0.901
0.320
-0.066
0.019
-0.200
0.324
-0.007
-0.112
945
946
947
948
949
950
951
952
I want to include all the stars that are adequately exposed, but not stars that are saturated. One way to
tell this is to zoom in on a small section that has faint non-detected stars, Figure 9, as well as bright
non- detected stars and check them out with imexamine 'a' quick photometry. Its an iterative process,
so be prepared to try different values. Finally, using the following values:
Figure 9 Close up to evaluate daofind selection
da> daofind
Input image(s) (m67r):
Output coordinate file(s) (default: image.coo.?)
(m67.coo.example2):
FWHM of features in scale units (2.5) (CR or value):
New FWHM of features: 2.5 scale units 2.5 pixels
Standard deviation of background in counts (0.) (CR or value):
250
New standard deviation of background: 250. counts
Detection threshold in sigma (4.) (CR or value):
New detection threshold: 4. sigma 1000. counts
Minimum good data value (INDEF) (CR or value):
New minimum good data value: INDEF counts
Maximum good data value (INDEF) (CR or value): 50000
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 29 of 53
NOT SELECTED
# R MAG FLUX SKY PEAK E PA BETA ENCLOSED MOFFAT DIRECT
1113.30 417.62 1113.30 417.62
7.01 17.68 850.5 217.3 INDEF 1.01 39 INDEF 2.36 INDEF 2.32
1167.99 402.77 1167.99 402.77
7.43 16.87 1782. 213.6 167.3 0.15 29 6.35 2.49 2.83 2.49
1136.11 377.05 1136.11 377.05
6.79 15.96 4118. 217. 571.3 0.18 12 4.95 2.28 2.45 2.26
1126.59 359.31 1126.59 359.31
6.95 15.54 6068. 218.2 878.8 0.43 -45 4.12 2.27 2.29 2.32
1160.78 234.72 1160.78 234.72
2.70 17.25 1260. 215. 1081. 0.16 35 3.28 0.92 0.83 0.90
1198.58 289.39 1198.58 289.39
14June 2003
Page 30 of 53
aperture size if your images are between 2 and 4 pixels FWHM. Probably not bad advice...
Why not just make it big? You run the risk of getting light from other stars in it, and for single stars,
you start to add noise in the form of background light. You also risk getting a bad pixel or cosmic ray
hit in your aperture the larger it is as well.
For the beginning of my background annulus, I'm going to choose to start 10 more pixels out from the
center, for a number of 12 +10 =22 in radius. I'll add 5 pixels for the outer edge of the background
annulus. Again, the idea is to get a good sampling of the background, but not run the risk of any
more contamination than necessary, which would happen if you were too close to the center star, or
the annulus was too large.
But remember, you must use the same aperture and background annulus for all of your images, or get
into complicated and painful aperture corrections. Remember: The goal is inner peace through IRAF,
so keep it simple.
If you want to see how your choice looks on a radial plot that shows you the boundaries of your
aperture and annulus, you can do that with our next IRAF task - phot.
D. Extracting Raw Photometry with phot
Phot is a powerful aperture photometry task. You can run it from the apphot or daophot package.
For unknown reasons, Massy and Davis (1992) suggest running it from the daophot package. I
would bet that, like rfits and imh files, this is dated advice. Nevertheless, disobedience to ones
elders can bring bad karma, so we'll comply.
If you look at the phot parameters you'll see:
da> lpar phot
image = "107*.fts"
Input image(s)
coords = "107.pam.coo" Input coordinate list(s) (default: image.coo.?)
output = "std107.pam.mag" Output photometry file(s) (default: image.mag.
skyfile = ""
Input sky value file(s)
(plotfile = "")
Output plot metacode file
(datapars = "")
Data dependent parameters
(centerpars = "")
Centering parameters
(fitskypars = "")
Sky fitting parameters
(photpars = "")
Photometry parameters
(interactive = no)
Interactive mode ?
(radplots = no)
Plot the radial profiles?
(verify = )_..verify)
Verify critical phot parameters ?
(update = )_.update)
Update critical phot parameters ?
(verbose = )_.verbose) Print phot messages ?
(graphics = )_.graphics) Graphics device
(display = )_.display) Display device
(icommands = "")
Image cursor: [x y wcs] key [cmd]
(gcommands = "")
Graphics cursor: [x y wcs] key [cmd]
(mode = "ql")
It looks deceptively simple. 'image' is our input list, it probably could do multiple fields with the right
set up using commas, but I keep it separate. "coords" is our manual or daofind generated coordinate
list. 'output' is a text file with the data in it. From 'datapars' to 'photpars' are additional param files
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 31 of 53
(like in daofind) we'll come back to. 'interactive' allows you to run the program one star at a time.
'radplots' allows you to see how your aperture and background annulus selections look on a radial
plot. 'verify' will prompt you for the key parameters for the task. And, if you change them from the
command line, it will 'update' the par file with the new values.
Lets use epar to see what is in the hidden pars file. You can epar phot first, then in the field for, say,
datapars, type ':e' to get to that par file. Or you could just type 'epar datapar', your choice.
PACKAGE = daophot
TASK = datapars
(scale =
(fwhmpsf=
(emissio=
(sigma =
(datamin=
(datamax=
(noise =
(ccdread=
(gain =
(readnoi=
(epadu =
(exposur=
(airmass=
(filter =
(obstime=
(itime =
(xairmas=
(ifilter=
(otime =
(mode =
You could use 'datamin' & 'datamax' to exclude stars that are too faint, or too bright. But, we already
did this in when we made our coordinate files. The other highlighted fields are header names that
will be used to put header information in the outputted data file.
Close 'datapars' with :q, and look at 'centerpars':
PACKAGE = daophot
TASK = centerpars
(calgori=
(cbox =
(cthresh=
(minsnra=
(cmaxite=
(maxshif=
(clean =
(rclean =
(rclip =
(kclean =
(mkcente=
(mode =
We want to use 'centroid' as our centering method. A 5 pixel box should be able to account for any
scatter in our registered positions on the .coo file. You can also set 'maxshif' so that you'll get an
error warning if positions shift more than the number of pixels you specify. Save centerpars (':q') and
epar fitskypars:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 32 of 53
PACKAGE = daophot
TASK = fitskypars
(salgori=
mode) Sky fitting algorithm
(annulus=
22.) Inner radius of sky annulus
in scale units
(dannulu=
5.) Width of sky annulus in
scale units
(skyvalu=
0.) User sky value
(smaxite=
10) Maximum number of sky
fitting iterations
(sloclip=
0.) Lower clipping factor in
percent
(shiclip=
0.) Upper clipping factor in
percent
(snrejec=
50) Maximum number of sky
fitting rejection iteratio
(sloreje=
3.) Lower K-sigma rejection limit
in sky sigma
(shireje=
3.) Upper K-sigma rejection limit
in sky sigma
(khist =
3.) Half width of histogram in sky sigma
(binsize= 0.10000000149012) Binsize of histogram in sky sigma
(smooth =
no) Boxcar smooth the histogram
(rgrow =
0.) Region growing radius in scale units
(mksky =
no) Mark sky annuli on the display
(mode =
ql)
Choose 'mode for your 'salgori'. Here is where we set where the background annulus starts, and how
wide it is. Finally, lets look at 'photpars'
PACKAGE = daophot
TASK = photpars
(weighti=
(apertur=
(zmag =
(mkapert=
(mode =
'weighti' is always constant in daophot. 'apertur' is where you specify your aperture(s). If you want
multiple, use commas ('10,12,14'). 'zmag' is a dummy zero point. It will be modified as part of the
standardization we will be doing later. It really should be zero, as you would then have true
instrumental magnitudes. But, these are all negative numbers, so it might cause math problems for
IRAF. Leave it at the default.
So, now the big moment: Lets run phot, first in "manual" mode. Change phot pars to interactive
with rplot enabled. Load the image in the display, and type 'phot imagename'. Once you confirm the
parameters, you'll get a graphics cursor (blinking circle) on your display. Center it on a star, and hit
the space bar. You'll get this radial profile (Figure 12), with your aperture and annulus displayed, as
well as this output on your screen:
da> phot 107r1
Input coordinate list(s) (default: image.coo.?) (104.pam.coo): 107.pam.coo
Output photometry file(s) (default: image.mag.?) (104.pam.mag): 107.mag.manual
Warning: Graphics overlay not available for display device.
107r1 965.19 995.57 111.2863 16.054 ok
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 33 of 53
Do the same with the other field, specifying a different .mag file name or append it to your other file
with >>107.pam.mag. Edit out the second set of parameters and field identifiers, so that you have
one file full of just the phot output of your standards.
Since the .mag files can be unwieldy, IRAF gives you a tool called 'txdump' to parse them. Here is
an example to pull just select information out of a .mag file:
da> txdump 104.pam.mag image,id,xcenter,ycenter,ifilter,xairmass,mag,merr yes
104b1.fts
104b1.fts
104b1.fts
104b1.fts
104b1.fts
104b1.fts
...
1
2
3
4
5
6
839.036
748.371
488.016
407.867
383.930
348.996
If you wanted to make an output file that you could put into Excel, you can txdump to a file:
da> txdump 104.pam.mag >104mag.dat
Fields to be extracted (image,id,xcenter,ycenter,ifilter,xairmass,mag,merr):
Boolean expression for record selection (yes):
da>
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 34 of 53
Remember the "NoError" phrase? If you want to be sure you extract only data that in fact has
"NoError", use the following boolean expression:
da> txdump *.pam.mag > 104.mag.dat
Fields to be extracted (image,id,xcenter,ycenter,ifilter,xairmass,mag,merr):
Boolean expression for record selection (yes): perror!="No_error"
104b1.fts 1 839.036 940.677 B 1.409 18.845 0.006
104b1.fts 2 748.371 1093.615 B 1.409 19.537 0.009
104b1.fts 3 488.016 877.080 B 1.409 25.217 0.921
104b1.fts 4 407.867 875.756 B 1.409 18.293 0.005
104b1.fts 5 383.930 961.248 B 1.409 21.732 0.039
...
Now, if all you wanted to do was differential photometry, without transforming to the standard
system, you can import your data into Excel or use a PERL program to do the subtraction, and leave
IRAF behind. However, since the goal of my project was to work on the standard system, I'll walk
you though those steps next.
V. STANDARD SYSTEM CORRECTION
Disciples as numerous as grains of sand in the River
Ganges, not one has gained enlightenment; they err
in seeking it as a path taught by others. To eliminate
form and eradicate its traces, make utmost effort
and strive diligently to walk in nothingness.
Tung-shan Liang-chieh (807-869)
If you are not clear on what it means to put your data on the standard Johnson-Cousins BVRI system
refer to some of the reference links. In brief summary, the idea is to find out from our standard fields
how both color and magnitude are affected by airmass, and to calculate the actual zero point for each
color and/or color index. This is why we took images of standard fields at different airmasses. IRAF
can determine extinction and transformation coefficients for you, then apply them to that massive
m67.mag file. But, like all things on the path to Nirvana, it will take a bit of work.
In summary we will:
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 35 of 53
PACKAGE = photcal
TASK = mkimsets
imlist =
The input image list
idfilter=
The list of filter ids
imsets =
The output image set file
(imobspa=
) The output image observing parameters file
(input =
photfiles) The source of the input image list
(filter =
) The filter keyword
(fields =
) Additional image list fields
(sort =
) The image list field to be sorted on
(edit =
yes) Edit the input image list before grouping
(rename =
yes) Prompt the user for image set names
(review =
yes) Review the image set file with the editor
(list =
)
(mode =
ql)
However, it may be easier to simply make it with a text editor. Here is the standard star imset I used for
my project:
ph> type stdimset
104_1 : 104b1.fts 104i1.fts 104r1.fts
104_2 : 104b2.fts 104i2.fts 104r2.fts
107_1 : 107b1.fts 107i1.fts 107r1.fts
107_2 : 107b2.fts 107i2.fts 107r2.fts
107_3 : 107b3.fts 107i3.fts 107r3.fts
As can be seen, all an imset does is tell IRAF that there are two observations of the SA 104 field, and
three of the SA107 field, with what image names are in those observations. Note, rather than use 'edit',
for a quick look at a file in the IRAF window, I used 'type'.
B. Making a Standard Star Observation File
'mknobsfile' is the task that makes a file of our standard observations, as well as creates format files to
help IRAF find the right information the later tasks will need. Note! The command is mknobsfile, not
mkobsfile! mkobsfile is a different command! Look at the help file to see the difference.
The mknobsfile par file is :
PACKAGE = photcal
TASK = mknobsfile
photfile=
idfilter=
imsets =
observat=
(obspara=
(obscolu=
(minmage=
(shifts =
(apercor=
(apertur=
(toleran=
(allfilt=
(verify =
(verbose=
(mode =
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 36 of 53
As usual, 'photfile' is your input file name. Note that I combined the two separate .mag files for SA104
and SA107. 'idfilter' are your filter names. 'stdimset' is the name of the file made in the previous step.
'obscolu' are the columns of relevant data in the input file, which if IRAF made the .mag file, should be
default. Lets run mknobsfile and see what happens:
ph> mknobsfile
The input list of APPHOT/DAOPHOT databases (std.pam.mag): stdcombo.pam.mag
The list of filter ids (B,I,R):
The input image set file (stdimset):
The output observations file (std.pam.obs.example): std.pam.obs
Observations file: std.pam.obs
Image set: 104_1 6 stars written to the observations file
Image set: 104_2 6 stars written to the observations file
Image set: 107_1 18 stars written to the observations file
Image set: 107_2 18 stars written to the observations file
Image set: 107_3 18 stars written to the observations file
If you look at your directory, you'll see that a two new files were created:
ph> dir
104.pam.coo
107.pam.coo
107r3.fts
m67i.fts
104.pam.coo~
107.pam.mag
Apr01.obsfile
m67r.fts
104.pam.mag
107b1.fts
AprLandolt.dat
std.pam.invertfit
104b1.fts
107b2.fts
aperturegrowth.txt std.pam.obs
104b2.fts
107b3.fts
aperturegrowth.txt stdcombo.pam.mag
104i1.fts
107i1.fts
fAprLandolt.dat stdimset
104i2.fts
107i2.fts
fstd.pam.obs.dat tAprLandolt.dat
104r1.fts
107i3.fts
m67.coo.example3
104r2.fts
107r1.fts
m67.mag
107.mag.manual
107r2.fts
m67b.fts
Looking at a bit of the .obs file,
ph> type std.pam.obs
# FIELD
104_1-1
*
*
104_1-2
*
*
...
FILTER
B
I
R
B
I
R
3:09:02.9 1.409
3:14:50.0 1.387
3:04:43.5 1.431
3:09:02.9 1.409
3:14:50.0 1.387
3:04:43.5 1.431
MAG MERR
There is a fatal problem here, which is subtle and will drive you past the point of inner calm if you don't
correct it. See the star names (104_1-1, 104_1-2, etc.)? IRAF cannot match these to the Landolt catalog.
As you'll remember, you choose which stars to use, but they are named something like 104_350. So,
you need to match up the proper names with the IRAF name for the individual star. Much drudgery
with a text editor awaits you. But, remember there is serenity in simple labor. Come back after you've
fixed the star names, and perhaps taken a walk to work off your unseemly lack of inner calm.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 37 of 53
It should be clear by now that IRAF will protect you from yourself to a large degree. It will not tolerate
errors in file format. If it doesn't add up, it will fault. Now, this trait doesn't protect you from giving it
wrong information in the right format, but it is helpful to think of IRAF as a protective Godess, as it
faults, and faults, and faults until you get all these little errors fixed. At least it never holds a grudge...
not even the Greeks could say that of their Godesses!
If you did the same fields, night after night, you would still need to hand edit the .obs file from each
night to correct the star names. This can cause karmic distress! Now, those willing to try to cut corners
on the way to Nirvana may be tempted to use Excel to import the column with the correct names from a
previous night's file into the latest file that needs correcting. Go ahead, make IRAFs day! Excel will
damage the file so that it won't work later by shuffling columns. Great karmic distress will ensue.
The problem is that you can save a text file in Excel only as a comma or tab delimited file. But, IRAF
uses white space as the column delimiter. Use commas, and you can spend the rest of eternity hand
editing them out. Use tabs, and there will be problems reading the file. Remember, the Great Satan of
Redmond brought Excel into the world, and there are those who believe He is the AntiChrist...
If in fact you need to use the same fields, night after night, which is where IRAF really shines, you could
write a PERL or other script program to replace 104_1-1 with 104_350 wherever it finds it in the .obs
file. This is probably the best method for returning a sense of calm to your inner core.
We expected to make std.pam.obs, but what is this fstd.pam.obs.dat file?
ph> type fstd.pam.obs.dat
# Declare the observations file variables
observations
TB
3
XB
4
xB
5
yB
6
mB
7
error(mB) 8
TI
10
XI
11
xI
12
yI
13
mI
14
error(mI) 15
TR
17
XR
18
xR
19
yR
20
mR
21
error(mR) 22
As you can see, the 'f' means "format". It tells IRAF what the fields in the .mag file are.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 38 of 53
However, in my project, I had a problem. I have B, R, and I data. For the CMD, I was going to use R
vs B-R. However, there is no data in Landolt 1992 for B-R. My options are V, B-V, V-R, R-I, and V-I.
So, I had to calculate R and B-R from the available Landolt data, and make my own catalog, along with
the catalog format files. IRAF helps you with this, with the 'mkcatalog' task. However, it was a real
pain. Upon request, the instructor provided me with a catalog along with the format and transformation
files for that catalog (Gay 2003). We'll continue on as if I was working with the onboard catalog.
Looking at the par file for 'mkconfig', you can see it is straightforward to use, once all the catalog and
fomat files are right:
PACKAGE = photcal
TASK = mkconfig
config =
catalog =
observat=
transfor=
(templat=
(catdir =
(verify =
(edit =
(check =
(verbose=
(mode =
Running mkconfig, I get the following in an editor (EMACS) window. This is IRAFs way to let me
look at the file and make any edits now.
# Declare the new Landolt UBVRI standards catalog variables
catalog
BR
2
R
3
RI
4
error(BR) 5
error(R) 6
error(RI) 7
# BR color
# R magnitude
# RI color
# the BR color error
# the R magnitude error
# the RI color error
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 39 of 53
TI
10
XI
11
xI
12
yI
13
mI
14
error(mI) 15
TR
17
XR
18
xR
19
yR
20
mR
21
error(mR) 22
For the transformation equations, the numbers after 'fit' mean as follows:
1 = zero point adjustment coefficient
2= extinction coefficient
3= color transformation coefficient
These are used as a "first approximation" by IRAF when it attempts to fit the transformation plots in the
next step. They can be set to zero in most cases. Note also in the transformation equations that "R-I" is
denoted as 'RI' etc. This is a syntax issue with IRAF.
So, if everything is to your liking, save the file and exit the editor. I got:
ph> mkconfig
The new configuration file (std.pam.cfg):
The source of the catalog format specification (fAprLandolt.dat):
The source of the observations file format specification (fstd.pam.obs.dat):
The source of the transformation equations (tAprLandolt.dat):
** Beginning of compilation **
** End of compilation **
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 40 of 53
You'll know all is well if 'Warnings' and 'Errors' is zero. If not, go to the help file for mkconfig to learn
what they mean and try to fix the problem. In general, an error or warning means that something in one
of the three input files to mkconfig is not in exactly the right format. Remember, GIGO ("Garbage-In,
Garbage-Out").
D. Fitting the Transformation Plots
Now comes the fun part, seeing how good
your standards data really is, and generating
the transformation, zero point, and extinction
coefficients using the task 'fitparams'. Lets
look at the par file first:
PACKAGE = photcal
TASK = fitparams
observat= std.pam.obs List of observations files
catalogs=
AprLandolt.dat List of standard catalog files
config =
std.pam.cfg Configuration file
paramete=
std.pam.ans Output parameters file
(weighti=
photometric) Weighting type
(uniform,photometric,equations)
(addscat=
yes) Add a scatter term to the weights ?
(toleran= 3.0000000000000E-5) Fit convergence tolerance
(maxiter=
15) Maximum number of fit iterations
(nreject=
0) Number of rejection iterations
(low_rej=
3.) Low sigma rejection factor
(high_re=
3.) High sigma rejection factor
(grow =
0.) Rejection growing radius
(interac=
yes) Solve fit interactively ?
(logfile=
fitlog.dat) Output log file
(log_unm=
yes) Log any unmatched stars ?
(log_fit=
yes) Log the fit parameters and statistics
?
(log_res=
yes) Log the results ?
(catdir =
)_.catdir) The standard star catalog directory
(graphic=
stdgraph) Output graphics device
(cursor =
) Graphics cursor input
(mode =
ql)
Figure 13 No Convergence
Here you name all the files you have made that are needed for the task. 'weighti' should be
'photometric'. We'll start with the default 'toleran' as we can interactively change that as needed. We
want to solve the fit interactively, and log errors and statistics in the logfile fitlog.dat. Lets run it!
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 41 of 53
ph> fitparams
List of observations files (std.pam.obs):
List of standard catalog files (AprLandolt.dat):
Configuration file (std.pam.cfg):
Output parameters file (std.pam.ans):
First you get an interactive graph (Figure 14). Notice the ominous phrase "Solution did not converge".
This is IRAF's version of "I can't let you do that, Dave" (HAL 9000 in 2001, A Space Odyssey).
What it really means is that the solution doesn't fit to the tolerances you specified or accepted as the
defaults. Notice that you have three points at the bottom left part of the plot that are way out of the
bounds of the rest of the points. These are stars that didn't fit well. Perhaps they are too faint, or the
apertures are contaminated. Lets get rid of them and try again.
Put your cursor on them one at a time, and type 'd'. This will change the '+' to a '*' meaning they have
been removed from the calculation. Try the fit again by typing 'f'. That does it. Type 'q' to exit this plot,
accept the solution with a 'yes', then 'n' for the next color. Continue until you are done with all of them.
As an example of when good stars go
bad, look at Figure 14. It shows
another case of non-convergence. My
R and I fit did not work, even when I
deleted the stars at the bottom left. I
had to change the tolerance to
':tolerance 1.8e-4' before it would
converge. Clearly, there is a problem
here, and you can see that what should
be linear is in fact curved - a sure sign
of trouble. So, I'd use R as a function
of R-I coefficients with a great deal of
skepticism. This really means that, for
whatever reason, it's hard to put data
from this camera and filters on the
standard system using I data.
Figure 14 note display problem, strange squares
Type 'q', then 'q' again to exit fitparams. Congratulations, you now have coefficients in your .ans file.
Look in the Appendix for them, and be satisfied!
E. Back checking your Work
How good do these coefficients really work? IRAF can help you find out with a task in photcal called
'invertfit' which will calculate the values of your standard stars from your coefficients so you can see
how well they work. Look at the par file:
PACKAGE = photcal
TASK = invertfit
observat=
config =
paramete=
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 42 of 53
Figure 11: R
I can see what my calculated values are. I can check for fit by inspection with my catalog file, such as:
ph> type AprLandolt.dat
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 43 of 53
#ID
BR
RI
BRerr Rerr
RIerr
13.251 0.353
14.015 0.356
15.485 0.397
12.391 0.464
15.43 0.607
15.462 0.296
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 44 of 53
#
#
#
#
#
3
4
5
6
7
m67_1-1
m67_1-2
m67_1-3
m67_1-4
m67_1-5
m67_1-6
m67_1-7
m67_1-8
m67_1-9
m67_1-10
m67_1-11
m67_1-12
m67_1-13
m67_1-14
m67_1-15
m67_1-16
m67_1-17
error(BR)
R
error(R)
RI
error(RI)
INDEF INDEF INDEF INDEF INDEF
INDEF INDEF INDEF INDEF INDEF
INDEF INDEF INDEF INDEF INDEF
INDEF INDEF INDEF INDEF INDEF
INDEF INDEF INDEF INDEF INDEF
INDEF INDEF INDEF INDEF INDEF
1.488 0.005 12.001 0.002 0.360 0.003
1.296 0.007 12.690 0.003 0.522 0.004
INDEF INDEF INDEF INDEF INDEF
1.122 0.054 15.625 0.031 0.646 0.044
0.908 0.007 12.870 0.004 0.364 0.006
0.895 0.010 13.445 0.005 0.369 0.008
1.078 0.028 14.796 0.016 0.388 0.024
1.234 0.035 14.963 0.018 0.419 0.027
1.028 0.011 13.601 0.006 0.400 0.009
1.168 0.025 14.617 0.013 0.452 0.020
0.968 0.047 15.470 0.029 0.504 0.042
INDEF
INDEF
INDEF
INDEF
INDEF
INDEF
INDEF
Notice all the INDEF notations? That means that during the photometry, IRAF was not happy with the
results, and therefore did not print them. Out of 1003 stars chosen with daofind, only 18 had one or
more INDEF magnitude or color indexes.
Now, to plot your CMD (remember - the goal of the exercise?). You can import this file into Excel and
plot from there. I prefer GNUPLOT, so the file needs reshuffling to the format B-R vs R (x vs y) in two
columns. I did this shuffling in Excel, and deleted the INDEF data because it will fault GNUPLOT.
The resulting plot is Figure 16. Note the axes are V and B-V as I transformed them because I didnt have
any V data and needed them that way in a CMD. Forget about it at this point!
The main sequence is clearly visible, although there seem to be a lot of stars all over the place. One
reason is that foreground stars have not been removed. Another reason is that there may be some points
that are so far out of reality due to the crowded field that the photometry is suspect. One will have to go
though each point (all 990) and decide if they belong in the plot, or are suffering from contamination or
other problems before the final product is really ready for prime time. But, that will be the subject of
another paper someday!
One minute of sitting, one inch of Buddha.
Like lightning all thoughts come and pass.
Just once look into your mind-depths:
Nothing else has ever been.
Manzan (1649-1709)
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 45 of 53
Approximate
turn-off point
VII. ACKNOWLEDGEMENTS
Grateful acknowledgment is given to Dr. Pamela Gay & Dr. Dante Minniti for their forbearance and
support during this project.
Acknowledgement is also given to years of photometric help, including IRAF and LINUX assistance, by
Dr. Arne A. Henden, Dr. Dirk Terrel, Gary Billings, and Aaron Price. Tim Hager has also provided
critical start up advise with IRAF. Of course, a task of this size could not have been done without the
support of the authors wife and child.
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 46 of 53
VIII . RESOURCES
XI. REFERENCES
Berry, R. & Burnell, J.; 2000 "Handbook of Astronomical Image Processing", Willman Bell Publishers
Billings, G. 2003; Personal Communication
Gay, P. 2003 - Personal Communication
Hager, T.; 2002, Personal Communication
Landolt, A._ 1992 AJ 104 340
Massy, P. & Davis, L.E; 1992 "A User's Guide to Stellar CCD Photometry with IRAF", NOAO
Massy, P. ; 1997 "A User's Guide to CCD Reductions with IRAF", NOAO
Wells, L.A; Bell, D.J" "Cleaning Images of Bad Pixels and Cosmic Rays Using IRAF", NOAO
Zen Quotes from http://:www.dailyzen.com
Cover Art Work from http://www.thegalleryofchina.com/lotuspainting9.html
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 47 of 53
X. APENDIX
LOGIN.CL
# LOGIN.CL -- User login file for the IRAF command language.
# Identify login.cl version (checked in images.cl).
if (defpar ("logver"))
logver = "IRAF V2.11 May 1997"
set
set
set
set
home
imdir
uparm
userid
= "/home/cpullen/"
= "./pix/"
= "home$uparm/"
= "cpullen"
$adb $bc $cal $cat $comm $cp $csh $date $dbx $df $diff
$du $find $finger $ftp $grep $lpq $lprm $ls $mail $make
$man $mon $mv $nm $od $ps $rcp $rlogin $rsh $ruptime
$rwho $sh $spell $sps $strings $su $telnet $tip $top
$touch $vi $emacs $w $wc $less $rusers $sync $pwd $gdb
task
Revision 1.0
A. Charles Pullen, all rights reserved.
= "$foreign"
= "$foreign"
= "$foreign"
= "$foreign"
= "$foreign"
= "$foreign"
14June 2003
Page 48 of 53
#task
task
task
task
if (access ("home$loginuser.cl"))
cl < "home$loginuser.cl"
;
keep; clpackage
prcache directory
cache directory page type help
# Print the message of the day.
if (access (".hushiraf"))
menus = no
else {
clear; type hlib$motd
}
# Delete any old MTIO lock (magtape position) files.
if (deftask ("mtclean"))
mtclean
else
delete uparm$mt?.lok,uparm$*.wcs verify# List any packages you want loaded at login time, ONE PER LINE.
images
# general image operators
plot
# graphics tasks
dataio
# data conversions, import export
lists
# list processing
# The if(deftask...) is needed for V2.9 compatibility.
if (deftask ("proto"))
proto
# prototype or ad hoc tasks
tv
utilities
noao
# image display
# miscellaneous utilities
# optical astronomy packages
keep
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 49 of 53
.MAG File
#K IRAF
= NOAO/IRAFV2.11EXPORT version %-23s
#K USER
= cpullen
name
%-23s
#K HOST
= unit7
computer %-23s
#K DATE
= 2003-06-05
yyyy-mm-dd %-23s
#K TIME
= 04:35:25
hh:mm:ss %-23s
#K PACKAGE = apphot
name
%-23s
#K TASK
= phot
name
%-23s
#
#K SCALE
= 1.
units
%-23.7g
#K FWHMPSF = 2.5
scaleunit %-23.7g
#K EMISSION = yes
switch %-23b
#K DATAMIN = INDEF
counts %-23.7g
#K DATAMAX = INDEF
counts %-23.7g
#K EXPOSURE = EXPTIME
keyword %-23s
#K AIRMASS = AIRMASS
keyword %-23s
#K FILTER = FILTERS
keyword %-23s
#K OBSTIME = UT
keyword %-23s
#
#K NOISE
= poisson
model
%-23s
#K SIGMA
= 0.
counts %-23.7g
#K GAIN
= ""
keyword %-23s
#K EPADU
= 1.
e-/adu %-23.7g
#K CCDREAD = ""
keyword %-23s
#K READNOISE = 0.
e%-23.7g
#
#K CALGORITHM = centroid
algorithm %-23s
#K CBOXWIDTH = 5.
scaleunit %-23.7g
#K CTHRESHOLD = 1.
sigma
%-23.7g
#K MINSNRATIO = 1.
number %-23.7g
#K CMAXITER = 10
number %-23d
#K MAXSHIFT = 5.
scaleunit %-23.7g
#K CLEAN
= no
scaleunit %-23b
#K RCLEAN = 1.
scaleunit %-23.7g
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 50 of 53
#K RCLIP
= 2.
scaleunit %-23.7g
#K KCLEAN = 3.
sigma
%-23.7g
#
#K SALGORITHM = mode
algorithm %-23s
#K ANNULUS = 22.
scaleunit %-23.7g
#K DANNULUS = 5.
scaleunit %-23.7g
#K SKYVALUE = 0.
counts %-23.7g
#K KHIST
= 3.
sigma
%-23.7g
#K BINSIZE = 0.1
sigma
%-23.7g
#K SMOOTH = no
switch %-23b
#K SMAXITER = 10
number %-23d
#K SLOCLIP = 0.
percent %-23.7g
#K SHICLIP = 0.
percent %-23.7g
#K SNREJECT = 50
number %-23d
#K SLOREJECT = 3.
sigma
%-23.7g
#K SHIREJECT = 3.
sigma
%-23.7g
#K RGROW
= 0.
scaleunit %-23.7g
#
#K WEIGHTING = constant
model
%-23s
#K APERTURES = 12
scaleunit %-23s
#K ZMAG
= 25.
zeropoint %-23.7g
#
#N IMAGE
XINIT YINIT ID COORDS
LID \
#U imagename
pixels pixels ## filename
##
\
#F %-23s
%-10.3f %-10.3f %-5d %-23s
%-5d
#
#N XCENTER YCENTER XSHIFT YSHIFT XERR YERR
CIER CERROR \
#U pixels pixels pixels pixels pixels pixels
## cerrors \
#F %-14.3f %-11.3f %-8.3f %-8.3f %-8.3f %-15.3f
%-5d %-9s
#
#N MSKY
STDEV
SSKEW
NSKY NSREJ SIER SERROR \
#U counts
counts
counts
npix npix
## serrors \
#F %-18.7g
%-15.7g
%-15.7g
%-7d %-9d
%-5d %-9s
#
#N ITIME
XAIRMASS
IFILTER
OTIME
\
#U timeunit
number
name
timeunit
\
#F %-18.7g
%-15.7g
%-23s
%-23s
#
#N RAPERT SUM
AREA
FLUX
MAG MERR PIER PERROR \
#U scale counts
pixels counts
mag mag ## perrors \
#F %-12.2f %-14.7g
%-11.7g %-14.7g
%-7.3f %-6.3f %-5d %-9s
#
107r1
965.000 995.000 1 107.pam.coo
0
\
965.187 995.567 0.187 0.567 0.007 0.006
0 NoError \
111.2863
7.554567
2.194241
767 6
0 NoError \
30.
1.417
R
6:06:48.53
\
12.0164005.9
452.444 113655.1
16.054 0.004 0 NoError
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 51 of 53
rms
0.05110584
reference
mB
fitting
(BR+R)+b1+b2*XB+b3*BR
weights
photometric
parameters
3
b1
(fit)
b2
(fit)
b3
(fit)
derivatives 3
0.1
0.1
0.1
values 3
4.248597
0.278672
-0.1007238
errors 3
0.06886289
0.05204131
0.01177141
# Thu 15:54:03 05-Jun-2003
begin RFIT
status 0
(Solution converged)
variance
0.001376153
stdeviation 0.03709653
avsqerror
0.00143578
averror
0.03789169
avsqscatter 5.623257E-4
avscatter
0.02371341
chisqr
0.9584703
msq
0.001309565
rms
0.03618791
reference
mR
fitting
R+r1+r2*XR+r3*BR
weights
photometric
parameters
3
r1
(fit)
r2
(fit)
r3
(fit)
derivatives 3
0.1
0.1
0.1
values 3
3.520395
0.1009293
0.008327574
errors 3
0.04797363
0.03534715
0.009378653
# Thu 15:58:35 05-Jun-2003
begin IFIT
status 0
(Solution converged)
variance
0.01009456
stdeviation 0.1004717
avsqerror
0.01009277
averror
0.1004628
avsqscatter 0.009789092
avscatter
0.09893984
chisqr
1.000177
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 52 of 53
msq
0.009606113
rms
0.09801078
reference
mI
fitting
(R-RI)+i1+i2*XI+i3*RI
weights
photometric
parameters
3
i1
(fit)
i2
(fit)
i3
(fit)
derivatives 3
0.1
0.1
0.1
values 3
3.535172
0.04811165
0.1618898
errors 3
0.1958016
0.1471552
0.105398
Revision 1.0
A. Charles Pullen, all rights reserved.
14June 2003
Page 53 of 53