Using PyRAF's imexam task for photometry
PyRAF is installed on the classroom linux machines using the astroconda
setup. You do not need to install astroconda or PyRAF on your own
machine (unless you want to). If you haven't yet set up pyraf on your
linux account, go to this page for instructions.
ds9 menu functions are listed in italics
pyraf command line commands are listed in boldface courier
useful imexam commands (execute these after placing the flashing circle cursor over a region of interest on the image):
- Use ds9 to open the reduced.fits image we've been working with: File --> Open
- start imexam in pyraf: imexam
Try the following:
- m: quick image statistics in a region
- default statbox = 5x5 region
- does not do any statistical clipping!
- changing region size (quit imexam, execute this commands, start imexam again):
- change # of columns in statbox: iraf.imexam.ncstat=<#>
- change # of lines in statbox: iraf.imexam.nlstat=<#>
- r: radial profile of a star
- radii are measured in pixels
- flux is measured in counts
- photometric properties of the star are given below the plot; last three numbers are estimates of FWHM.
- a: circular aperture photometry
- automatically chooses "best" aperture. To stop this, say iraf.rimexam.iterations=1
- set aperture size: iraf.rimexam.radius=<#>
- set space between aperture and sky annulus: iraf.rimexam.buffer=<#>
- set width of sky annulus: iraf.rimexam.width=<#>
- provides fluxes and instrumental magnitudes (given by m=-2.5log(counts)+25)
Quitting imexam: hit q with the cursor somewhere in the image
- What is the typical sky level in the image? How consistent is it across the image?
- Do a radial profile of a few items:
- Find a saturated star and look at its profile.
- Find a small galaxy and look at its proifile. Notice it is not very Gaussian!
- Find a good star and look at its profile. A "good" star should
look reasonably Gaussian and have a few tens of thousands of counts in
the center. What is the FWHM in pixels?
- Do an aperture flux measurement of a few stars.
Quitting pyraf: .exit (that's dot-exit)
Miscellaneous tips, as I think of them:
use pyraf's display task to display images. That task is outdated and
does not play well with ds9. ALWAYS open images directly from ds9.
- If you get stuck in imexam (pyraf command window doesn't respond,
no flashy cursor in image), check to see if the plot window is
expecting input. Put your cursor in the bar under the plot and hit
- To edit pyraf task parameters:
- Option 1: epar <task>
will open up a new window that allows you to view and edit the
parameters. Good if your not sure which parameter you need or what the
allowed values are.
- Option 2: if you already know what you need to set a parameter to, from the pyraf command prompt you can set it by typing iraf.<task>.<parameter> = <value>
- If you have a file where the first two lines are x,y image
coordinates, you can overplot those positions in ds9 by going to
Region -> Load Region,
clicking All, and then
choosing the file. When the load window pops up, tell it that
the file format is xy
and that the coordinate system is image. (if you had a file of ra & dec, you
could tell it the coordinate system is wcs....)
- In any command that wants to know certain keywords from the
image header, exposure time is EXPTIME, airmass is AIRMASS, and
obstime is DATE-OBS. If you set these this way, you'll be
happier. You can always see what's in the image header by
loading the image into ds9 (don't
display it through IRAF) and choosing File->Display Fits Header.