This example demonstrates a simple session using IRAF. It covers: converting a FITS image to the IRAF OIF format, displaying an image and calculating statistics for an image. It also introduces the IRAF on-line help system and displaying and setting IRAF task parameters.
The FITS image used in this example is available as file:
/star/examples/sg12/ccdimage.fit
If you intend to work through the example using this image you should make a copy of it in your IRAF directory. Alternatively, you may prefer to use a FITS image of your own.
). 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>').
). If you are using IRAF version 2.11
this step is not strictly necessary as this version of IRAF can access
FITS files directly. However, it is included here in order to
keep the example consistent for versions 2.10 and 2.11. In addition,
you might find the OIF format more convenient for subsequent operations.
You should also note that the command to perform the conversion is
slightly different in the two versions. FITS file ccdimage.fit
(or an alternative) should be available in your IRAF directory.
Type either:
rfits ccdimage.fit 1 ccdframe
rfits ccdimage.fit 0 ccdframe
A line similar to the following should be displayed:
File: ccdframe KAPPA - Cadd Size = 384 x 256
File ccdframe.imh should be created in your IRAF directory and file ccdframe.pix in the pixels directory (probably subdirectory pixels if you have used the loginuser.cl file supplied with this document). From the IRAF command language you can show the files in the current directory with command dir, change to a new directory with cd and list a text file with cat; these commands behave similarly to the equivalent Unix commands. You can use these commands to check that the header and pixel files have been created. When you are satisfied that all is well, make your IRAF directory your current directory again.
imhead ccdframe
display ccdframe 1
The image should be displayed in the SAOTNG window. You can use the various buttons in the SAOTNG window to customise the display.
imstat ccdframe
Output similar to the following should be listed:
# IMAGE NPIX MEAN STDDEV MIN MAX
ccdframe 98304 508. 308.3 330. 31988.
help imstat
A description of the command and its various parameters will be
displayed. Some brief details of the IRAF on-line help are given in
Section
, below. So far, we have been specifying information
to IRAF tasks by giving mandatory parameters on the command line. IRAF
tasks also have so-called `hidden' parameters which adopt a default value
if you do not specify them. You can show the current value of all the
parameters of a task using the command lpar. For example:
lpar imstat
The output should be something like:
images = "ccdframe" Images
(fields = "image,npix,mean,stddev,min,max") Fields to be printed
(lower = INDEF) Lower cutoff for pixel values
(upper = INDEF) Upper cutoff for pixel values
(binwidth = 0.1) Bin width of histogram in sigma
(format = yes) Format output and print column labels?
(mode = "ql")
The parameters enclosed in brackets are hidden (in this case this is all of them except images).
imstat.fields = "mean,stddev,skew,kurtosis"
If imstat is run again:
imstat ccdframe
the output should now be:
# MEAN STDDEV SKEW KURTOSIS
508. 308.3 62.03 4728.
In addition to setting parameter values from the command line they can also be edited using task epar; see the Beginner's Guide[1] for further details.
logout
To leave IRAF.
An Introduction to IRAF