This module is a bag of related fits classes and global functions.
The following functionality is available:
<Type> data_array [NAXIS1][NAXIS2]...[NAXISN]For a PrimaryArray, dims() gives the number of dimensions and dim(i) gives the value of the i-th dimension WARNING! Multi-dimensional arrays are stored in FORTRAN order, NOT in C order. Options on the store, copy, and move functions exist to convert from one order to the other, if that is necessary.
It is important to understand the proper sequence of operations with respect to I/O and data access. For input, the `read()' functions allocate an internal buffer of the appropriate size, if not already allocated, as well as reading and converting data; a `read()' function must be performed prior to accessing the data, i. e. before executing any `()', `data()', `copy()', or `move()' function. For output, the `store()' function similarly allocates an internal buffer before transfering data, and must be executed prior to any data access or `write()' function. Note: If you call any version of store(), do not call set_next().
Writing portions of an array at a time, rather than the entire array, is a special case. The `set_next()' function is provided for this purpose. It declares the intention to write out the next N elements and must be executed prior to any `data()' function. It allocates a buffer of appropriate size, if not already allocated. Again, via the `data()' functions, one accesses the array as if the entire array were in memory. The `write()' function always writes the number of current elements in the internal buffer. The sequence of operations for each portion of the array written would be:
Please note that the NOST has deprecated the Random Group datastructure, it has been replaced by the much more powerfull BINTABLE extension.
You may want to look at the individual header files to see whether you might not prefer to include only the header files you really need; it may be more efficient to do so.