SPECX is able to deal with spectral line maps - i.e. data cubes - as well as with single spectra. As the average size of data sets has increased, so have demands on memory and i/o associated with cube handling, and it has been necessary to modify significantly the way in which SPECX does this.
SPECX maintains the map in two forms. The permanent form is the mapfile. This consists of a single header (the ``prototype header") representing the invariant information describing the spectra, followed by the individual spectra for each point. Because spectral line maps are often only sparsely sampled, the data are stored sequentially in the order they are added to the map, with an index block to describe where in the file the data for each map point are to be found. This index block is consulted whenever a spectrum is taken from the mapfile, and modified whenever a spectrum is added or deleted.
Given that there is only one header, it follows that all points in the map will be described as if they have the same integration time, velocity resolution etc.
In order to obtain faster access to the data, SPECX also maintains a temporary form of the map whenever a map file is opened. This is a 3-D array, known as the cube, which is resident in virtual memory (and in physical memory also if the working set is large enough). The INDEX array from the map file contains information concerning where in the mapfile each spectrum came from, or whether it has been interpolated from those around it (or is even not present at all). This is therefore used to control whether or not certain areas of the map are contoured. SPECX is full of tricky stuff to maintain the mapfile in parallel with the cube - thus once the cube is loaded i/o is confined to modifying small parts of the map file in response to the various operations on the map itself. Interpolated data are never stored in the map file, but can be obtained relatively quickly on demand.