ASTR 4880 Computer Lab Session 6

Log in to your astro1 account, change to your iraf directory, open an xgterm window, and type cl to start IRAF. For the first part of this exercise, you may wish to create a new directory, inside your IRAF directory, with mkdir, and change to that directory with cd.

Practice with the IRAF task graph

Although spreadsheet applications such as Excel can make nice graphs for some purposes, specialized graphics software may provide additional capabilities, as well as greater control over the format of the resulting graph. In this session, we'll explore the capabilities of the IRAF task graph. Use of this task is not required for Lab 2, but it may be needed in the future.

For practice, I've prepared a small data set consisting of measurements of the position of a Th-Ar emission line from a spectrum taken with our older CCD camera CCD1. A liquid nitrogen-cooled camera, it was our workhorse from late 1993 through early 2007, when CCD3 was placed in service. Copy this file to your current directory as follows:

copy /mnt/vol01/ndm/iraf/course/F2009/ccd1stability1.txt ./

In order to graph data points with error bars, we'll plot the points first and then overplot the error bars, using the same data values but a different symbol.

Now, at the IRAF command prompt, type epar graph and set up the task parameters as follows. See help graph for additional information.* The important parameters (which you may want to change in the course of this session) are:

PACKAGE = plot
TASK = graph

input = ccd* list of images or list files to be graphed
(pointmo= yes) plot points instead of lines?
(marker = box) point marker character?
(szmarke= 0.01) marker size (0 for list input)
(xlabel = UT (h)) x-axis label
(ylabel = Position (microns)) y-axis label
(overplo= no) overplot on existing plot?
(append = no) append to existing plot?
(device = stdgraph) output device
(round = yes) round axes to nice values?

Now we'll overplot the error bars. The following listing includes only the task parameters for graph that need to be changed.

(marker = vebar) point marker character?
(szmarke= 0.05) marker size (0 for list input)
(overplo= yes) overplot on existing plot?

Data reduction, continued

Change back to the original data directory in your iraf directory.

Two sessions ago, we introduced the aperture definition and spectrum extraction portions of the data reduction process. As the end product, we obtained a one-dimensional graph of pixel count values (ADUs) versus pixel number for file number 29, a spectrum of Deneb. You should have in your current directory two files whose name contains the number 29 and with extensions .hhh and .hhd, respectively. Please preview that file with splot for my inspection.

If you made a serious mistake in generating that file, you will not be able to continue with this evening's session. In that case, so that you will have a correct file to work with, please issue one or both of the following commands. If you need to give the file a new name, type that new name instead of ./ in the command below.

imcopy /mnt/vol01/ndm/CCD3/20090831/29bx.hhh ./

imcopy /mnt/vol01/ndm/CCD3/20090831/ ./

In this session, we will explore the following data reduction steps. Remember that, when you carry out these steps for an assignment, you will be working with different images, which you will have processed correctly.
  1. Create normalized flat lamp spectrum with task normflat
  2. Divide stellar spectrum by flat lamp spectrum with imarith
  3. Extract a Th-Ar spectrum with the flat as a reference
After doing step 3, we will be ready to carry out the wavelength calibration of the stellar spectrum.

*There is no obstacle against having two login windows open with IRAF on astro1 at the same time. If you are trying to learn to use a new task, it is often helpful to have the task parameter open in your xgterm window while simultaneously being logged on in your xterm window, starting IRAF there, and displaying help for the same task. Just be careful not to attempt graphics operations in the xterm window, only the xgterm window.

Return to ASTR 4880 home page

Latest update (by NDM): 11/15/09 20:30