1 Introduction

If life were simple there would only be one data format, but in reality there are numerous formats for storing n-dimensional astronomical data associated with various software packages. In Starlink we have not been immune to this, having the original INTERIM BDF, HDS IMAGE format, and FIGARO DSTs to name but three. However, Starlink is now taking the novel approach of supporting different packages sharing a common data format—the NDF1 (Extensible n-Dimensional-data format)—which most Starlink packages are already using.

The purpose of Convert is the interchange of data files to and from the NDF. Thus it enables astronomers to select the best applications from a variety of packages, including those originating abroad like IRAF. In addition it assists packages that wish to move to using the NDF.

Convert is available from all three UNIX platforms supported by Starlink. The supported conversions are currently as follows:


Converts a text file to an NDF.


Converts an Asterix data cube into a standard NDF.


Converts a direct-access unformatted file to an NDF.


Converts a Figaro (Version 2) DST file to an NDF.


Converts FITS files into NDFs.


Converts an image in GASP format to an NDF.


Converts an image in GIF format to an NDF.


Converts an IRAF image to an NDF.


Converts an IRCAM data file to a series of NDFs.


Converts a FITS tape to one or more NDFs.


Converts an NDF to a text file.


Converts an NDF to a direct-access unformatted file.


Converts an NDF to a Figaro (Version 2) DST file.


Converts an NDF to a FITS file.


Converts a two-dimensional NDF into a GASP image.


Converts an NDF to a GIF file.


Converts an NDF to an IRAF image.


Converts an NDF to a PGM format.


Converts an NDF to a TIFF file.


Converts an NDF to a sequential unformatted file.


Converts a SPECX map into a simple data cube, or SPECX data files to individual spectra.


Converts an image in TIFF format to an NDF.


Converts a sequential unformatted file to an NDF.


In addition there are FITS readers within Kappa (see SUN/95) which will convert FITS files and tapes to NDFs. These are more tolerant of ‘almost FITS’ files, but lack support for IMAGE and BINTABLE extensions.

IDL procedures for handling NDFs and other methods of converting NDFs to IDL format are described in Appendix B of this document.

Starting up the Convert package will also set up defaults for the automatic NDF conversion facilities (described in Section 3) to enable applications which use the NDF library to read and write most of the file formats handled by the Convert package, and some others.

The various formats supported by Convert do not have one-to-one correspondence and therefore in general it is not possible to apply a forward and reverse conversion and finish with a duplicate of the initial data file. This hysteresis is particularly likely when starting with an NDF, since many simpler formats have no way of storing certain NDF data items, like variance and axis widths. However, if you are dealing with a simple file containing just a data array and linear axis centres, then it should be possible to avoid loss of information except with GIF and TIFF formats which will reduce the absolute data values to 256 greyscale levels.

Note – the input data file is not deleted or altered in any way.

1See SUN/33 for an introduction to the NDF.