This example shows a simple session using a Starlink package from within IRAF. It covers loading the package and calculating statistics for an image.
Several Starlink packages are available from within IRAF, of which the principal ones are KAPPA (see SUN/95[5]) and Figaro (see SUN/86[14]). When used from within the IRAF command language these packages behave in most respects like `native' IRAF packages: they can read and write IRAF OIF format data files and their parameters can be displayed and controlled using the usual mechanisms of the IRAF command language. Tasks in the Starlink packages can be intermixed freely with the standard IRAF tasks (again, just like `native' IRAF packages). There are a few differences between Starlink and `native' IRAF tasks, principally in the way that graphics are displayed; see SUN/217[3] for details.
This example uses the Figaro application istat to display the statistics of an image in order to compare and contrast it with the standard IRAF application imstat used in the previous example. The IRAF OIF image ccdframe which was used in the previous example will also be used again here.
). Subsequent commands should be issued from
the window which is running the IRAF command language (that is, the
one with the prompt set to `cl>').
figaro
A list similar to the following should be displayed:
abconv cset fscrunch ilog lxset sfit abline cspike fwconv image lyset slice adjoin delobj gauss imult mask soft
Also the prompt should be reset to `fi>'. The list comprises
all the commands in the Figaro package. If instead of the list of
commands you get an error message like:
ERROR: task `figaro' not found
then Figaro has not been installed in the version of IRAF available
at your site. Section
below gives a few hints on
how to proceed in this case.
However, assuming that the package loaded successfully, then all the Figaro tasks are now available, in addition to the basic IRAF tasks. Here Figaro is behaving just like a `native' IRAF package. For any IRAF package, native or Starlink, you can:
Any number of packages can be loaded simultaneously. All the commands in all the loaded packages are available. Packages are hierarchical, with packages having sub-packages inside 'em, and so ad infinitum (as the poet almost had it). Typing bye removes the most recently loaded package or sub-package. For example, type:
bye
Figaro will be removed and the prompt will be reset to cl>.
istat ccdframe
Output similar to the following should be listed:
Y-range 1 to 256 X-range 1 to 384 Total (over 98304.0 pixels) = 4.9943E+7 Max = 31988 in pixel (332,108) Min = 330 in pixel (1,256) Mean = 508.05 Sigma = 308.263
Compare this output with that produced by imstat in the previous example. As in this case, Starlink applications are usually somewhat more verbose than standard IRAF tasks.
help istat
A description of the command and its various parameters will be displayed. Again as for the standard tasks, the parameters of Figaro applications can be shown in the usual way:
lpar istat
The output should be something like:
image = "" (IMage) Name of image to examine
ystart = *! (YStart) First Y value to be used
yend = *! (YEnd) Last Y value to be used
xstart = *! (XStart) First X value to be used
xend = *! (XEnd) Last X value to be used
(pass2 = no) (PAss2) Pass twice through data for better sigm
(median = no) (MEDian) Calculate median as well as other stat
(stat_total = 0.)
(stat_max = 0.)
(stat_min = 0.)
(stat_mean = 0.)
(stat_sigma = 0.)
(stat_size = 0.)
(stat_xmax = 0.)
(stat_xmin = 0.)
(stat_ymax = 0.)
(stat_ymin = 0.)
(stat_xstart = 0.)
(stat_xend = 0.)
(stat_ystart = 0.)
(stat_yend = 0.)
(stat_median = 0.)
(mode = "ql")
istat.median = yes
Now run istat again:
istat ccdframe
The output should now be:
Y-range 1 to 256 X-range 1 to 384 Total (over 98304.0 pixels) = 4.9943E+7 Max = 31988 in pixel (332,108) Min = 330 in pixel (1,256) Mean = 508.05 Sigma = 308.263 Median 494
Note that the median is now calculated and displayed.
An Introduction to IRAF