When working with astronomical imaging data, we will use a python variant of the IRAF data reduction package known as PyRAF This is installed on the classroom linux workstations, and you can also download and install it on your own machine if you have a linux or mac (sorry, it doesn't run under Windows). If you want to do this, use the Ureka package, which is a ginormous but self-contained and stable release of IRAF, pyraf, and python. Since it's self-contained, it won't mess with any versions of python you have installed on your own machine, and you can simply blow it away at the end of the semester if you don't want it remaining on your laptop. It is kind of big, though (you need about 5 Gb on your disk to install it, although once installed it only takes up about 3.5 Gb).
Ureka download page (v1.5.1, release date 23-Mar-2015)
The first time you log in to run PyRAF, do the following:
- mkiraf (hit return at prompts, until you get back to the command line)
Starting PyRAF on the classroom computers
and you're good to start working. when you are done pyrafing, end the session with .exit and then do a ur_forget in the terminal window.
- open a new terminal window
- !ds9 &
Note: Always load images into ds9 using its menu system (File-->Open); never use PyRAF's display task.
Remember basic tasks:
Note: to vary the parameters used in doing aperture photometry in imexam, you want epar rimexam and then change the radius, buffer, and width parameters appropriately.
- r : radial profile
- a : simple aperture photometry
- m : basic statistics
- e: contour plot
- q: quit
Changing task parameters
There are two ways to change task parameters:
You can also get a list of task parameters by saying lpar <task>.
- GUI-based using epar: if you epar <task>, a window will pop up showing all the task parameters and allowing you to enter/change values. There is also a task help button available that way. This is useful if you are new to the task and want to explore how it works.
- direct set via command line: if you know exactly what parameter you want to set, you can just set it by typing iraf.<task>.<parameter>=<value>.
Sometimes tasks will have both parameters and subparameters. For example, imexam also has a set of subparameters for individual tasks within imexam, and to change these you need to know the name of the subparameter set (which is usually explained in the main task help page). To change how imexam does radial profiles, etc, you want the rimexam parameter set, and set the subparameters either via epar rimexam or doing a iraf.rimexam.<parameter>=<value>.
Other Miscellaneous tips:
- When using imexamine, remember that the ds9 window needs to be selected/active. if one of the other windows is active, imexamine won't pay attention to your keystrokes even if your cursor is in the ds9 window.
- 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.