To start IRAF, type ecl.
This "Enhanced cl" provides a tcsh-style editing of the line command, a tab completion of file
names, the
possibility of moving through the history using the arrows, and a very
much improved handling of errors in scripts and programs.
Remember that ecl must be
started from the directory where you keep your login.cl file.
The startup message contains useful hints, for instance the current IRAF
version.
Names followed by a dot are packages (ex. adccdrom, arnica, etc.);
names without dot are tasks (ex. apropos, describe, examples).
The prompt is the name of the last package loaded (in the startup
screen, the prompt is "ecl").
| You type: | What happens |
|---|---|
| name_of_package | The package is loaded; prompt changes to the package name. |
| ? | List tasks in the most recently-loaded package. |
| ?? | List all tasks loaded, regardless of package. |
| package | List all packages loaded. |
| ? images | List tasks or subpackages in package images. |
| bye | Exit the current package. |
There are no limitations to the number of packages that can be loaded at any given time.
| Command | Action |
|---|---|
| help task | Show the whole help page for the task. |
| help package | Prints a one-line description of each task or subpackage in the package. If you omit the package name, it will apply to the currently loaded package. |
| phelp task | Like "help task", but allows to move forward and backword through the help file (= help | page). |
| example task | Show only the example section of the task. |
| describe task | Show only the description section. |
| help task opt=source | Show the actual code (useful if you wish to understand in detail how a task works). |
| help package opt=sysdoc | A general description of the package (available for a few, for instance isophote, nebular). |
| help task device=gui | Help is displayed in a nice GUI, which allows to navigate through the IRAF help docs (new in IRAF 2.12.2). |
| help task device=ps
> task.ps help task device=html > task.html |
Help is output in a postscript or an HTML file (new in IRAF 2.12.2) |
The help GUI interface can also be launched by loading the guiapps package and then executing the xhelp task. This should be considered a prototype application for trial use, so it may still have some bugs or inconsistencies (such as hanging the XGterm in a RHEL platform.)
If you do not know what task does what you need, you can use:
| Command | Action |
|---|---|
| apropos <keyword> | Look through a list of IRAF + STSDAS menus to find tasks matching the keyword. Package name is also shown in parenthesis. Notice that depending on when and how the apropos database was built, there might be packages and tasks not included in it. |
| refer <keyword> | Search the help database for tasks related to the keyword. An alternative to apropos. |
The way a task operates is determined by its parameters.
There are two types of parameters:
| required | Must be specified to the task. If not, the task prompts for them. They are always learned, i.e. become the default for the following run. Must be given in the correct order in the command line. |
| hidden | Do not need to be specified. Task will use default values. They might be
learned or not according to how they are set. If specified on command line, the syntax is parameter=value. May be put in any order, but must follow required parameters. |
All parameters of a task can be displayed doing: lpar task:
Three ways to set or tell the task the parameter values:
| Command | Description | Example |
|---|---|---|
| epar task | Edit interactively parameter values. You move through the parameters menu and change them. Exit with :q to save, :q! to discard changes, :go to start task execution. Also, :w file will output the parameter list (in an unfriendly format) on file file.par; :r file.par will read back a saved parameter file. |
epar imarith ...editing... :q |
| task <list of parameters>i | Parameters are specified in the command line | imarith image1 + image2 result title="SUM" pixtype=real |
| set explicitely | Syntax: task.parameter=value | imarith.pixtype=real or imarith.title="SUM" |
Though hidden parameters may seem less important than the required ones, actually they not always are. Before running any task, it is good practice to revise carefully all its parameters and change their settings to suit your needs. (As an example, in the task fitcoords the default value for xorder and yorder is 6. My experience with such task, applied to logn-slit spectra, is that such values produce wild oscillations in the fitted surface, and smaller values, typically 3 or 4, are much better).
Psets
Sometimes, the parameters of a particularly complex task (ex. imexamine),
or which may be common to a set of tasks (as in the package daophot),
are grouped into psets.
To edit the parameters in a pset (ex. imexamine's pset rimexam), do:
cl> epar rimexam or just type
cl> rimexam
Psets can also be modified from inside the parameters of a task using them. For instance, doing epar phot, you can edit the centerpars pset by moving to the "centerp=" line and typing :e.
psets are identified in the package menu by a trailing "@" character. (Load the package daophot or apphot to see quite a few).
Expressions in parameters:
Simple numerical expressions, surrounded by parenthesis, can be given as the
value of a parameter. For instance, we might do:
cl> display.z1=(200-3*60) ; display.z2=(200+3*60)
or
cl> display dev$pix 1 zr- zs- z1=(200-3*60) z2=(200+3*60)
There are several possibilities on how to run a task:
Tasks can be executed in the background, tied together, or their output can be redirected.
Foreign tasks
The login.cl file contains definitions of
commands which are declared as
$foreign. They are
not tasks written outside of the U.S., and for which the CIA and the FBI keep
an eye out, but rather Operating System-level commands that can be used similarly
to IRAF tasks, with arguments, input or output redirected, used with pipes.
However they cannot be used in background, nor have parameter files. Also they may not work well with IRAF pathnames,
compare for instance: cl>
ls images$ with cl>
dir images$
Warning: If you happen to abort a task
(Ctrl-C), type flpr twice to clean up IRAF memory, which
can get corrupted by the abortion.
Sometimes, if IRAF behaves strangely, a couple of flpr might
solve the problem. At times, it may be necessary to logout of IRAF and start
again.
Note:
The standard IRAF installation include some images and files with which to
do experiments, try tasks, etc.
2 images are available: dev$pix.imh and dev$wpix.imh ;
the latter includes the WCS in the header (see Chapter 4).
Also, there is a metacode file, called dev$vdm.gki .
Furthermore, directory scidata$ contains a variety of
HST-related images and tables.