SPP Reference Manual

CHAPTER 2:
Libraries and Packages: The VOS Interface


The IRAF Virtual Operating System (VOS) comprises several libraries of
procedures that provide the interface to IRAF, permitting an SPP application to access images, cl parameters and so forth. It provides an environment for developing scientific analysis applications. The libraries described here are available to any SPP application without explicitly including the library when linking. Other libraries exist that may be included. In addition, an applications package may create its own library.

Several VOS packages have associated include files which may be used for predefined constants, structures, and other macros. These may be included in code with the <file> syntax (see "Include Files" on page 36). Note that here the term package refers to a set of procedures in a library, not a set of applications tasks available in the IRAF cl.

The VOS procedures are grouped into library packages of related procedures. Most of them deal with input and output of various forms.

The procedures described here represent the normal interface between an SPP program and the IRAF environment. That is, they are the only procedures that should be called. While additional, lower-level, procedures exist in the library, these should not be used. The top-level interface is intended to be stable and well documented. The remainder of the library cannot be guaranteed to remain free of modifications such as changes to the calling sequence. Using lower level procedures in portable, maintainable code represents an interface violation and causes potential maintenance problems.

This chapter describes many of the VOS package library procedures. While every attempt has been made to provide comprehensive and up-to-date information on the VOS packages, there are quite a few libraries and the number of individual procedures is quite large. An exhaustive description of each procedure and its calling sequence is beyond the scope of this reference. In particular, it is not practical to describe each procedure in extensive detail. Nor is there room to fully describe every calling argument to every procedure. However, in many cases it should be clear what the data type and meaning are for most of them. In many cases, they are discussed in the text. Examples are used throughout to demonstrate the most commonly used procedures. Ideally, there would be a complete document for every library package describing each procedure and its calling arguments in detail. An example is gio with a quite complete reference. However, not every package has such complete documentation.

There is usually a table describing the important procedures in a given library package. If there is a variable and equals sign then the procedure is a function. If there is no variable assignment, the procedure is invoked by a call statement. It should be fairly clear what is the data type of the function by the variable name. In many cases, a given procedure is implemented separately for several different SPP data types. That is, there is a separate procedure for each data type. In that case, there is usually a single entry in the table for that family of procedures with the suffix t indicating to specify the data type with the initial of the data type name.

You should refer to the source code for the definitive description of any procedure. The best sources for such information is in the IRAF system itself. Each package resides in a separate directory below the IRAF sys directory, with the same name as the package. This directory contains the source code for the package library procedures. In addition, there is usually a doc directory below this source directory, containing help files or additional documentation. For example, the directory sys$imio contains the source and additional documentation for the imio library. Note also that the IRAF cl defines an environment variable for each library with the same name, imio or fmtio, for example. Therefore, the source to immap() is in imio$immap.x. It is quite instructive to look at the source files as well as the associated documentation. Note however, that these source directories contain all of the library procedures. This includes lower level code, not intended to be called by SPP applications tasks, but by the library procedures themselves.

2.1 - Interaction with the cl -- clio
2.2 - Memory Allocation -- memio
2.3 - Accessing Images -- imio
2.4 - Formatted I/O -- fmtio
2.5 - File I/O -- fio
2.6 - Vector (Array) Operators -- vops
2.7 - Vector Graphics -- gio
2.8 - Terminal I/O -- tty
2.9 - Bit & Byte Operations -- osb
2.10 - Pixel Lists -- plio
2.11 - World Coordinates -- mwcs
2.12 - Miscellaneous -- etc

Generated with CERN WebMaker