next up previous 65
Next: Installing Starlink software in IRAF
Up: Worked Examples
Previous: On-line help


Using Starlink Packages From IRAF

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.

  1. If you are not already running IRAF then start it (see Section [*]). 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>').

  2. The first step is to load the Figaro package. Simply type:

    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
    
    $\vdots$

    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>.

  3. Now reload the Figaro package by typing figaro. Once the package is loaded simple statistics of an image can be displayed by typing:

    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.

  4. On-line help information is available for the Figaro tasks, as it is for the standard ones. To obtain help on istat simply type:

    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")
    

  5. In addition to the quantities calculated automatically istat may also optionally calculate the median value of the image. Type:

    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.



Subsections

next up previous 65
Next: Installing Starlink software in IRAF
Up: Worked Examples
Previous: On-line help

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