The design of the HSTIO interface is based on two principles: adequate modeling and encapsulation. The high-level data structures form a complete representation of basic instrument data and all associated keywords, as well as meaningful groups of these data and keywords, thus forming an adequate model of data from the instruments. The I/O functions include all functions needed to support these high-level data structures, including translating between the external disk representation and the internal data structures. Implementation details are carefully concealed within these I/O functions, thus employing the principle of encapsulation.
There are two important consequences of this design: flexibility in usage and flexibility in implementation. First, by encapsulating all I/O operations within the HSTIO interface, the pipeline calibrations can be written in the form of pure algorithms, with no operating system dependencies. Furthermore, since these algorithms are being implemented in a widely available standard language (ANSI C), they are easily used in other environments or even translated into other languages. Second, encapsulation also allows alternative implementations of the I/O functions without impacting the calibration algorithms. The low-level I/O functions are currently implemented using IRAF, but they do not have to be. A preliminary version already exists implementing the low-level functions using FITS C++ classes with no use of IRAF whatever. This is completely transparent to the calibration algorithms using these functions and data structures.