Space Telescope Science Institute
Intro to HST Data Handbooks 8.0 May 2011
Table of Contents Previous Next Index Print

Introduction to the HST Data Handbooks > Chapter 4: IRAF Primer > 4.2 Initiating IRAF

This section explains:
How to set up your IRAF working environment.
We assume that your site has IRAF and STSDAS installed. If not, you should obtain and install the software. See Section 4.4 for details.
Setting Up IRAF in Unix/Linux
Before running IRAF or PyRAF for the first time you need to:
Create an IRAF root directory.
Run “mkiraf” to create a file and a uparm subdirectory.
Users generally name their IRAF home directory “iraf” (also referred to as your IRAF root directory) and put it in their user home directory (i.e., the default directory that you are in when you log in to the system). The IRAF home directory does not need to be in your home directory, nor does it need to be called “iraf”, but you should not put it on a scratch disk that is periodically erased.
If you call your root IRAF directory “iraf”, you can set up IRAF as follows
The “mkiraf” command initializes IRAF by creating a file and a subdirectory called uparm. After typing the “mkiraf” command, you will see something like the following:
% mkiraf
-- creating a new uparm directory
Terminal types: gterm=ttysw+graphics,vt640...
Enter terminal type:
Enter the type of terminal or workstation you will most often use with IRAF. Generic terminal types that will work for most users are:
xgterm for sites that have installed X11 IRAF and IRAF v2.10.3 BETA or later.
xterm for most workstations running under X-Windows.
vt100 for most terminals.
IRAF for other systems, like Mac OSX, can be obtained from the IRAF Web page at:
You can change your terminal type at any time by typing (set term=new_type) during an IRAF session. You can also change your default type by editing the appropriate line in your file.
After you enter your terminal type, you will see the following message before getting your regular prompt:
A new LOGIN.CL file has been created in the current ...
You may wish to review and edit this file to change ...
The file is the startup file used by the IRAF command language (CL). It is similar to the .login file used by Unix. Whenever IRAF starts, it looks for the file. You can edit this file to customize your IRAF environment. In fact, you should look at it to make sure that everything in it is correct. In particular, there is a line starting with “set home =” that tells IRAF where to find your IRAF home directory. You should verify that this statement does, in fact, point to your IRAF directory. If you will be working with standard IRAF format images you should also insert a line saying set imdir = “HDR$”. The imdir setting is ignored when working with GEIS and FITS format images.
The uparm directory will contain your own copies of IRAF task parameters. This directory allows you to customize your IRAF environment by setting certain parameter values as defaults. Once you set up IRAF, you should only have to do it again when you install an updated version of IRAF. It is also a good idea at this time to make sure your standard image size is set to the largest size of the images you may want to display. This is controlled by the stdimage keyword. IRAF will only display images in a visual tool up to this size. To enable image sizes up to 8192 8192, set stdimage equal to imt7.
To start an IRAF session:
Move to your IRAF home directory.
Type cl at the command line.
IRAF starts by displaying several lines of introductory text and then puts a prompt at the bottom of the screen. Figure 4.1 is a sample IRAF startup screen.
Figure 4.1: IRAF Startup Screen
To quit an IRAF session:
Type “logout”.

Table of Contents Previous Next Index Print