There are some IRAF tasks that are particularly important, as they allow to do a quick assessment of the nature and quality of the data, or to do a variety of operations. Here is a list of the main tasks (Some, such as display and imheader, have already been described in a previous chapter).
The task imexamine allows to do quite a lot of different
measurements on an image.
It is one of the more complex tasks, as it has a big number of command
keystrokes and task parameters, grouped in psets.
The following table lists just a few of its possibilites:
| Keystroke | Action |
|---|---|
| m | Statistic of a region around the cursor |
| r | radial profile of the star under the cursor; measures center, FWHM. etc. |
| h | histogram of a region around the cursor |
| s / e | surface / contour plot |
| c / l | column / line plot |
Parameters are grouped into 9 pset, which can be edited to change
parameter values.
Parameters can also be set interactively using the so called column
commands, of the form :ncstat 10 (number of columns used in statistics
is set to 10).
imexamine allows to print logical, physical and
world coordinates. In the latter case, xformat=%H and yformat=%h return
the correct sexigesimal notation for RA and Dec (if the image contains the relevant
and correct WCS keywords).
You can also load directly the image in the DS9 display, and the use imexamine.
This what they say in the DS9 website:
"Due to the unique relationship between DS9 and IRAF, if you use the imexamine
task, you can take advantage of a special feature of DS9. Instead of loading the image from IRAF with the display
task, load the image directly into DS9. Then, from the cl prompt, invoke imexamine without a filename. IRAF will
ask DS9 for the current filename and use it for analysis. This approach provides serveral advantages over
previous methods. First, it will work with compound fits images such as mosaics, data cubes, and rgb images.
Second, the image diplays includes true image data and WCS information, not the approximated data from IRAF."
It is a useful task for removing interactively cosmic ray events, if the automated
tasks fails or produce unsatisfactory results. For instance:
cl> imedit image.fits c_image.fits
logfile="imed.log"
edit "image.fits", output is "c_image.fits", all cursor commands
are stored into file "imed.log".
cl> imedit image.imh "" cursor="imex.cur" xord=1
yord=1
edit "image.fits" in place (output image will have same name, old image
is lost), commands are read from file "imex.cur", set polynomial order
to 1,1 when interpolating across bad regions.
The task imexpr is a powerful image calculator.
It accepts complicated operations, with built-in functions and logical
expressions. Also values of image keywords may be used.
A few examples are in order:
The task splot is, in a sense, the analogue of imexam for spectral data. It allows to do various types of measurements and processing on a spectrum. Some of the most important cursor keystrokes are:
| Keystroke | Action |
|---|---|
| k | fit a gaussian to a line profile |
| d | deblend a group or blend of lines into single components; several functional forms are allowed. |
| f | perform arithmetic operations on the spectrum |
| t | fit a function to the spectrum. Might be used to normalize by or subtract the continuum |
| # | select new line or aperture |
Task sections (and the similar but less powerful task files)
is very useful to check or produce file and image lists.
It can handle also image sections, as well as the Unix-like notation to
restrict the list to a given alphabetical range.
Its typical use is to produce a @file which in turn is passed as input
or output to another task.
As usual, a few examples are in order to clarify:
The task files is similar, but can't use image sections, nor the "![..]" range notation.
In general, it is preferable to use "@files" than image templates
(i.e. wildcards) as input to IRAF tasks, as there is no guarantee that
image templates are expanded in the same order. For instance:
cl> imarith gal*.fits -
back*.fits sub//gal*.fits
"gal*.fits" and "back*.fits" might be expanded in a different
order, thus losing the correct pairing between the two images lists.
Task hselect can be used to select a subset of images satisfying
specific criteria. For instance, we may want to get a list of all images
taken in the V filter, or those with exposure time = 0 (biases), or whose title
contains the string "NGC 5555". We can also decide which keywords
from the header we want to appear in the output list.
As usual, a few examples can better illustrate its usage:
Other operators are != not equal, || or, >= greater or equal, etc. Type help hedit for more info on conditional expressions, functions and image keywords in general.