Converts an NDF to an IRAF image


This application converts an NDF to an IRAF image. See the "Notes" for details of the conversion.


ndf2iraf in out [fillbad]


IN = NDF (Read)
The input NDF data structure. The suggested default is the current NDF if one exists, otherwise it is the current value.
The value used to replace bad pixels in the NDF’s data array before it is copied to the IRAF file. A null value (!) means no replacements are to be made. This parameter is ignored if there are no bad values. [0]
The name of the output IRAF image. Two files are produced with the same name but different extensions. The ".pix" file contains the data array, and ".imh" is the associated header file that may contain a copy of the NDF’s FITS extension. The suggested default is the current value.
If TRUE, the contents of the FITS extension of the NDF are merged with the header information derived from the standard NDF components. See the "Notes" for details of the merger. [TRUE]
If TRUE, any NDF history records are written to the primary FITS header as HISTORY cards. These follow the mandatory headers and any merged FITS-extension headers (see parameter PROFITS). [TRUE]


ndf2iraf abell119 a119
Converts an NDF called abell119 into the IRAF image comprising the pixel file a119.pix and the header file a119.imh. If there are any bad values present they are copied verbatim to the IRAF image.
ndf2iraf abell119 a119 noprohis
As the previous example, except that NDF HISTORY records are not transferred to the headers in a119.imh.
ndf2iraf qsospe qsospe fillbad=0
Converts the NDF called qsospe to an IRAF image comprising the pixel file qsospe.imh and the header file qsospe.pix. Any bad values in the data array are replaced by zero.
ndf2iraf qsospe qsospe fillbad=0 profits=f
As the previous example, except that any FITS airlock information in the NDF are not transferred to the headers in qsospe.imh.


The rules for the conversion are as follows:

Related Applications

Convert: IRAF2NDF.


The IMFORT routines refuse to overwrite an IRAF image if an image with the same name exists. The application then aborts.

Some of the routines required for accessing the IRAF header image are written in SPP. Macros are used to find the start of the header line section, this constitutes an ‘Interface violation’ as these macros are not part of the IMFORT interface specification. It is possible that these may be changed in the future, so beware.


IRAF User Handbook Volume 1A: A User’s Guide to FORTRAN Programming in IRAF, the IMFORT Interface, by Doug Tody.

Implementation Status: