Basic Data Reduction and Analysis Summary We will be using computers running Red Hat Linux or possibly in a few cases Sun Solaris. To reduce and analyze our data we will enter a software environment called IRAF (Image Reduction and Analysis Facility), which is specifically designed for visible light (aka "optical") and infrared imaging and spectroscopy. This is a huge and complex piece of software that is very powerful, but it is correspondingly a bit ponderous and sometimes follows a design logic that is too sophisticated for normal astronomers. Since it was first designed back in the 80s, its interface is command-line, not gui (graphical user interface) like a lot of more recent software. However, it has powerful image display and line graphics capabilities. If you absolutely fall in love with it or have masochistic tendencies beyond the norm, it is freely available for download... http://iraf.noao.edu/ Starting IRAF ------------- Start with a regular xterm. Launch an X-windows graphics terminal in the background: xgterm & Enable the scroll bar by placing the cursor in the window, holding down CTRL and right mouse button, and then selecting "enable scrollbar." Make sure you're in the home directory: cd Now start IRAF by typing (of course): cl You should see a bunch of introductory verbage at the top of the screen, and the prompt should now be cl> Now start the image display window, also in the background: ds9 & The Structure of IRAF --------------------- IRAF is organized into packages and subpackages based on categories of tasks. For example, there is a package for image manipulation (images), general image reduction (imred), ccd-specific image reduction (ccdred), etc. Each package contains subpackages and/or actual tasks. When you first start up IRAF you'll see a listing of packages which are automatically preloaded. If you want other packages, load them by typing their names one at a time at the cl> prompt. You can find out which packages you want in several ways. First, typing '?' at the prompt will give you a list of all of the packages and tasks which are under your current package. Typing '??' will give you a listing of all packages and subpackages. You'll see the package hierachy at the top of the help file on a task or package: cl> help ccdproc Finally, if you read one of the many IRAF guides and cookbooks, it will tell you which task and/or package to use. Using Tasks ----------- Many tasks are quite flexible and powerful, so consequently they have a lot of options and parameters. You can list the parameters with the command "lpar" (for "list parameters"). For example, to see the parameters in the display task: cl> lpar display Don't be too scared by the number of parameters. Many of them are set to sensible defaults so you don't have to change them. You can edit the parameters with the "edit parameters" command: cl> epar display Go up and down the parameter list with the arrow keys. When you are done and want to write the parameters type ':w' (w for write). When you want to quit out of the epar type ':q'. You can write and quit at once with ':wq' You can get voluminous help on any task or package: cl> help display The help files are organized to give you a brief description of each of the parameters first. This is handy once you gain some familiarity with the task and merely want to remember what the various parameters do. Following this summary, you are presented with a more detailed description of task which mentions the parameters in context in the narrative. There are some shortcuts. If you have names or words (strings) or numbers to enter, you can just type the command followed by the strings or numbers IN ORDER. For example, the first parameter of the display task is the image name. Suppose you want to display the image my_glorious_image.fits. You can type cl> display my_glorious_image.fits The second parameter is the frame of the image display (1-4), so you can put my_glorious_image.fits into frame 1 by cl> display my_glorious_image.fits 1 You can also enter the parameters by name, such as cl> display image=my_glorious_image.fits frame=1 This is very handy if you want to change a parameter way down the stack but don't want to list all of the parameters before that. A variant of the above is that if you have boolean parameters (yes or no questions) you can just type the parameter name or an abbreviation and append a '+' for yes or a '-' for no. A very common example of this is the image header command, "imhead". The default is usually to list only a short 1-line header, but this ignores most of the information in the header. If you want to see all of it, you must set the parameter "longheader" to yes. For this it's much easier and faster to just type cl> imheader my_glorious_image.fits lo+ Here's an example that several of us worked with the other night. We wanted to change the default display on M87 so that we could see the jet. Look at the parameters with lpar display. The parameters which control the automatic display are "zscale" and "zrange". If we don't want the automatic display settings, we have to turn these off with "zscale-" (can be abbreviated "zs-") "zrange-" (abbreviated "zr-"). Once we turn these off we have to tell the task what range of data values we want for the display. The parameters which control this are "z1" and "z2", which depend on the image and what you want to look at in the image. We settled on something like this: cl> display M87.fits zr- zs- z1=900 z2=1100 IRAF will ask you for any required parameters (these don't have parentheses around them when you lpar or epar) when you type the command. If the default it gives you is what you want, just hit return. Essential Tasks --------------- imheader Get long or short version of the image header. display Display the image on the display (ds9). imexam Powerful and flexible image quick-look task. Radial profiles, single pixel values, region statistics, surface plots, contour plots, quick photometry. ccdproc Image reduction task (subtract zero, apply flat field) splot Plot a spectrum.