next up previous 65
Next: Subsequent IRAF sessions
Up: Worked Examples
Previous: Additional examples


Starting IRAF

Starting IRAF for the first time is non-trivial and hence this example is provided as an illustration of the procedure. The example is broadly correct, and works in Edinburgh. However, some of the details, in particular the file locations, may be different at your site. You should check the details at your site with your site manager.

An additional complication is that IRAF has various ways of displaying two-dimensional images (such as the CCD frames), none of which can be considered standard. Some of the common alternatives are to use either SAOTNG, its predecessor SAOIMAGE (see SUN/166[11]) or XIMTOOL. SAOTNG and SAOIMAGE are separate image display applications which are not part of IRAF (though, obviously, they can display IRAF images). SAOIMAGE works correctly with IRAF version 2.10, but there seem to be problems with using it with version 2.11. Hence SAOTNG is used in the current example. It is also worth noting that when using IRAF you will not always need to display two-dimensional images, though in practice you usually will. Consequently setting up SAOTNG is integrated with the instructions here. The IRAF Beginner's Guide[1] covers starting IRAF for the first time, but not all the details of setting up an image display.

The procedure is as follows.

  1. In order to use IRAF you need a `base' or `root' directory which will contain various configuration files, sub-directories and probably your IRAF data files. This directory is your `IRAF home directory' and you need to decide where it is going to be located and what it is going to be called. For example, we might decide that our IRAF directory is going to be:

    /home/acd/iraf

    This directory will be used in this example, though if you are working through it you should substitute your own chosen IRAF directory.

  2. You will probably need to add a one or more lines to your shell login script. If you run the `tc' shell then this script is file .tcshrc; if you run the `c' shell it is file .cshrc. In either case it is located in your home directory. The details will depend on how IRAF has been set up at your site. At Edinburgh the following line should be added:

    source  /net/reaxp02/packages2/iraf211/jbin/login

    See your site manager for the details at your site. It is probably most convenient to put these lines at the end of the file.

  3. Either log out and log in again or source your .tcshrc (or .cshrc) file.

  4. If you have not already done so, create your own IRAF directory and move to it (for example, mkdir iraf followed by cd iraf).

  5. Type:

    mkiraf

    You will be prompted for the terminal type; reply xgterm. Subdirectory uparm will be created in your IRAF directory, as will file login.cl. The latter is the IRAF start up script. It contains various options and defaults which you can change, but you should not need to do so.

  6. Customisations can be made in file login.cl, but are better put in a separate file, which must be called loginuser.cl. (It is better to put customisations in loginuser.cl than in login.cl because the latter is overwritten when mkiraf is executed whereas the former is not.) An example loginuser.cl file is available as file:

    /star/examples/sg12/loginuser.cl

    You can simply copy this file to your IRAF directory. (It configures IRAF to handle the large headers often associated with fibre spectroscopy data and specifies that the pixel files associated with bulk datasets, such as images or spectra, are to be kept in subdirectory pixels of the IRAF home directory. Section [*] gives some notes on how to specify the directory in which the pixel files are to be kept.)

  7. Start SAOTNG ready for use with IRAF. Type:

    saotng &

    The `&' is, of course, simply to run SAOTNG as a detached process, which is more convenient.

  8. Create an xgterm window:

    xgterm &

    A new window with a distinctive appearance is created. You will use this window to run IRAF. You can run IRAF from your normal login window, but using an xgterm window allows you to make better use of the workstation or X-terminal graphics.

    Depending on the configuration options in place at your site the xgterm window might be created without a scroll bar. If so, and you want to add a scroll bar (which is often useful), then from the xgterm window hold down the Ctrl key and simultaneously click on the right mouse button. A window containing a list of options should appear; simply click on the scrollbar item and a scroll bar should be added to the window.

  9. Move to the xgterm window and type:

    cl

    An introductory message should be displayed and the prompt should change to `cl>'. You are now running the IRAF command language and ready to issue IRAF commands. See the Beginner's Guide[1] for an introduction to the commands available and Section [*] for a simple example.

    As a quick check that the image display is working correctly type:

    display  dev$pix  1

    An IRAF test image of the spiral galaxy M51 should appear in the SAOTNG display.

    Type logout to leave the IRAF command language and return to the Unix shell prompt.



Subsections

next up previous 65
Next: Subsequent IRAF sessions
Up: Worked Examples
Previous: Additional examples

An Introduction to IRAF
Starlink Guide 12
R. Morris, G.J. Privett & A.C. Davenhall
2nd December 1999
E-mail:ussc@star.rl.ac.uk

Copyright © 2008 Science and Technology Facilities Council