Aperture Photometry Exercise using IRAF

1) On local machine, start an xgterm window and an ds9 window.
To do this, type

xgterm &

ds9 &

Note: Implicitly assume that you type a <return> after
each formatted line. Explicit <return>'s are only
shown where they might not be obvoious.

2) If you are running IRAF locally, skip to Step 4 .

If you are working on a remote machine, log into 'gaspra' in
the xgterm window:

telnet gaspra

username

password

3) To start iraf in the xgterm window, type

setenv IMTDEV inet:5137:localmachinename

cl

where localmachinename is the name (or IP number) of the workstation
at which you are sitting (e.g., physics1).

Note: If the script 'iraf' is in your /bin directory, this can be accomplished
by simply typing

iraf machinename. (e.g., 'iraf physics1').

You are now running the computational part of iraf on the the machine gaspra
and will be displaying images and results on localmachinename.

4) In the xgterm window, type

cd

ls

cd m67

This series of commands took you to the directory 'astro', which is your
IRAF home directory. The 'ls' command lists the files and directories.
Then you changed to the directory 'm67' where the photometry exercise files
are located. Now you would like to display an image.

5) Convert image from FITS (standard) to IRAF format. Type

ls

to see which images exist the current directory. Now type

rfits

and respond with

m67v

m67v

You should now see (after typing 'ls') the file 'm67v.imh' - this is the
m67v image in IRAF format. Now type

disp

and respond with

m67v

and a few <return>'s. You should see the image displayed in
the ds9 window.

Check this for ds9 modifications----------------------------------
Under the Options menu, click on Control Panel. To magnify
the image, click on Zoom In. Position the mouse in the lower right
corner of the ximtool window, click and hold the button down, and then
resize the window until the complete image fits
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^.

6) We now would like to learn a bit about the image. Position the mouse
in the xgterm window and click (i.e., make the window active). Then
type

imexamine

A circular cursor should appear in the image window. Position this over
a star (click the mouse to ensure that the window is active), and then
type

r

on the keyboard. A radial plot of the star's intensity should appear in
a new window. You may have to use the mouse to bring this image in front
of the others on your screen. Experiment with imexamine a bit by
positioning the circular cursor and trying out the following commands (only
the letter is needed):

s (surface plot)

e (contour plot)

c (plot a complete column of the image)

l (plot a complete line of the image)

7) Now we need to get ready to do some photometry. First we need to get
an idea of the width of the stellar images. To do this, use the 'r' command
in imexamine. At the base of the radial plot window, look at the
number in the far right. This is the full width at half-maximum (FWHM)
in pixels, i.e., the width of the stars image where the intensity is one
half of the central value or greater. Does this number seem to agree with
the radial plot? Remember, the x-axis is the radius, not the diameter.
Measure the FWHM for a couple different stars and get a rough average.
(Should be somewhere between 2.1 and 2.3). When you are done, type

q

to quit imexamine.

8) To load the IRAF photometry packages, type

digiphot

apphot

at the cl prompt. We will use the task qphot to do the photometry.
However, we will also learn a new IRAF trick at this point. We have been
entering responses to commands interactively until now. However, all IRAF
commands have a parameter file with default responses. To modify the qphot
parameter
file, type

epar qphot

in the xgterm window. Enter the following parameters by using the
arrow key to position the cursor, entering the value, then hitting .

image = m67v

annulus = 8.0

dannulus = 4.0

aperture = 6.0

output = m67v.mag

zmag = 22.766

The zmag entry is optional at this step. However, this value 'rigs' the
zero-point of the results to be consistent with the v-magnitude of the
reference star in the m67 image. When you are finished, type

:wq

to save the file. Start the photometry program by typing

qphot

and repeatedly hitting <return> to select the default values. A round
cursor should appear in the image window. Center this over the reference
star and type

i

A window should appear querying you for the redius of extraction box.
Enter

20

and hit

<return>

A radial plot of the reference star should appear. Note that it is contaminated
by a neighboring star at about 11.5 pixels. We will now confirm that the
aperture and annulus values entered previously are appropriate. Type

v

Successively hit

<return>

viewing the position of the inner and outer sky radii and the photometry
aperture. The vertical line will position itself at the default values
each time. When you reach the Mark apertures step, type

q

q

and the round cursor should reappear in the image window. Click to make
the window active and then type

w

to save the parameters just confirmed. Now place the round cursor over
each star (measure the reference star last, i.e., make it star #11) and
press the

spacebar

to measure each the magnitude. You should notice the results in the xgterm
window. When you are finished, type

q

in the xgterm window, then move the cursor to the image window,
click the mouse (to make window active) and type (this is quirky - the
order of typing the q's is crucial)

q

You should now have a file 'm67v.mag' containing your results. Type

ls

to confirm this. To view this file, type

page m67v.mag

Hit the spacebar to view the next page and hit 'q' when you are finished.
This file has more info than you care about at the moment. Therefore, we
will use the txdump utility to extract the info that we want. Type

epar txdump

and enter

textfile = m67v.mag

fields = id,mag,merr

:wq

Type

txdump

to see the star id, magnitude, and the error in the mag displayed to the
screen. To save these results to a file, type

txdump > results.dat

or any other filename after the '>'. Compare your results with those shown
in the CCD lab handout. When you are finished, type