3 Data Storage

 3.1 Internal Data Storage
 3.2 Data Storage on Disk

3.1 Internal Data Storage

On being read in, data are stored in the ‘current’ X,Y arrays, which have space reserved for up to 200,000 pairs of points. By default — or, in some cases, by compulsion — most operations (e.g. plotting) are carried out on data stored in these arrays. Data can be saved for later use by ‘PUSH’ing them onto a ‘STACK’, which can be thought of as a series of X,Y arrays. The STACK contents can be inspected using SL (‘Stack List’), deleted using DEL, and brought into the ‘current’ arrays using POP. Up to 200 stack entries, or 800,000 points, are allowed.

3.2 Data Storage on Disk

The contents of the current array can be written to a disk file using the WRITE command, and the contents of the stack can be written using the SAVE command. These files can either be standard Starlink “NDF” structures (see SUN/33), or alternatively files containing unformatted data in the original DIPSO format used prior to version 3.00.

The USENDF command allows the user to select which format to use. All commands which read or write data to or from the current arrays or stack are influenced by the USENDF command setting unless the description of the command in appendixA says otherwise.

Use of NDF structures enables data files created by DIPSO to be used by other Starlink packages (and vice-versa). It also enables data files to be transferred freely from one operating system to another without needing to do a format conversion for each one. NDF structures are contained within disk files which have the file extension “.sdf”. When referring to an NDF, do not include the file type or an error will result. Think of it this way; an NDF is an object contained within a disk file. The NDF and the disk file in which it is contained are separate entities and can in principle have different names. When asked for an NDF you give the name of the NDF, not the name of the disk file. It just so happens that at the moment an NDF named “my_data” will be contained in a disk file called “my_data.sdf” but this may not always be the case.

In addition, columns of values can be read from FITS binary or ascii tables into the current arrays.