You can select which NDF array components to export to the FITS file, and choose the data type of the data and variance arrays. You can control whether or not to propagate extensions and history information.
The application also accepts NDFs stored as top-level components of an HDS container file.
Both NDF and FITS use the term extension, and they mean different things. Thus to avoid confusion in the descriptions below, the term `sub-file' is used to refer to a FITS IMAGE, TABLE or BINTABLE Header and Data Unit (HDU).
BITPIX values must be enclosed in double quotes and may be a list of comma-separated values to be applied to each conversion in turn. An error results if more values than the number of input NDFs are supplied. If too few are given, the last value in the list is applied to the remainder of the NDFs; thus a single value is applied to all the conversions. The given values must be in the same order as that of the input NDFs. Indirection through a text file may be used. If more than one line is required to enter the information at a prompt then type a "-" at the end of each line where a continuation line is desired. 
The choice of COMP may affect automatic quality masking. See "Quality Masking" for the details.
COMP may be a list of comma-separated values to be applied to each conversion in turn. The list must be enclosed in double quotes. An error results if more values than the number of input NDFs are supplied. If too few are given, the last value in the list is applied to the remainder of the NDFs; thus a single value is applied to all the conversions. The given values must be in the same order as that of the input NDFs. Indirection through a text file may be used. If more than one line is required to enter the information at a prompt then type a "-" at the end of each line where a continuation line is desired. ["A"]
NDF2FITS will not permit you to overwrite an existing FITS file, unless you supply an exclamation mark prefix (suitably escaped if you are using a UNIX shell).
If the component is too long to fit within the header (68 characters), EXTNAME is set to @EXTNAMEF. The full path is then stored in keyword EXTNAMEF using the HEASARC Long-string CONTINUE convention (http://fits.gsfc.nasa.gov/registry/continue_keyword.html).
Each extension or substructure creates a one-row binary table, where the columns of the table correspond to the primitive (non-structure) components. The name of each column is the component name. The column order is the same as the component order. The shapes of multi-dimensional arrays are recorded using the TDIMn keyword, where n is the column number. The HEASARCH convention for specifying the width of character arrays (keyword TFORMn='rAw', where r is the total number of characters in the column and w is the width of an element) is used. The EXTNAME, EXTTYPE, EXTSHAPE and EXTLEVEL keywords (see above) are written to the binary-table header.
Values for FITS keywords generated by the above encodings will always be used in preference to any corresponding keywords found in the FITS extension (even if PROFITS is TRUE). If this is not what is required, the WCS component of the NDF should be erased using the KAPPA command ERASE before running NDF2FITS. Note, if PROFITS is TRUE, then any WCS-related keywords in the FITS extension which are not replaced by keywords derived from the WCS component may appear in the output FITS file. If this causes a problem, then PROFITS should be set to FALSE or the offending keywords removed using KAPPA FITSEDIT for example.
The following PROVENANCE headers are written if parameter PROVENANCE is set to "CADC".
When PROFITS is TRUE any existing provenance keywords in the FITS airlock are not copied to the FITS file.
At present only one product is supported, but others may be added as required.
Standard processing is used except for the 2dF FIBRES extension and its constituent structures. The NDF may be restored from the created FITS file using FITS2NDF. The FIBRES extension converts to the second binary table in the FITS file (the NDF_CLASS extension appears in the first).
To propagate the OBJECT substructure, NDF2FITS creates a binary table of constant width (224 bytes) with one row per fibre. The total number of rows is obtained from component NUM_FIBRES. If a possible OBJECT component is missing from the NDF, a null column is written for that component. The columns inherit the data types of the OBJECT structure's components. Column meanings and units are assigned based upon information in the reference given below.
The FIELD structure components are converted into additional keywords of the same name in the binary-table header, with the exception that components with names longer than eight characters have abbreviated keywords: UNALLOCxxx becomes UNAL-xxx (xxx=OBJ, GUI, or SKY), CONFIGMJD becomes CONFMJD, and xSWITCHOFF becomes xSWTCHOF (x=X or Y). If any FIELD component is missing it is ignored.
Keywords for the extension level, name, and type appear in the binary-table header.
Standard processing is used except for the SMURF-type extension. This contains NDFs such as EXP_TIME and TSYS. Each such NDF is treated like the main NDF except that it is assumed that these extension NDFs have no extensions of their own. FITS airlock information and HISTORY are inherited from the parent NDF. Also the extension keywords are written: EXTNAME gives the path to the NDF, EXTLEVEL records the extension hierarchy level, and EXTTYPE is set to "NDF". Any non-NDF components of the SMURF extension are written to a binary table in the normal fashion.
CONVERT A Format-conversion Package