It is often useful to utilise data from other wavelengths or instruments (either for a comparison or for an
external mask). In the following example, the FITS file called file.fits
is converted to NDF format as
file.sdf
using the Starlink package Convert. Note that the .sdf
file extension NDF may be omitted to save
typing.
FITS files from certain recognised sources have special rules applied when converting from FITS to NDF, as described
in the documentation for fits2ndf. For FITS files from other sources, the primary array in the FITS file is stored as the
main NDF in the output file. Any FITS extensions present in the FITS file will be placed into NDF extensions called
FITS_EXT_<n>,
where n
counts from one for the first FITS extension. To see a list of the extension NDFs in fred.sdf
, do:
When running a Kappa ot smurf command, you can refer to these extension just as they are listed above. So for instance:
Alternatively, you can copy the NDF into its own separate file:
If one of the extensions contains a variance array that you would like to as the Variance
component of the main
NDF, a command like the following will do that:
The fits2ndf command offers a way of mapping FITS extensions to familiar NDF array components
DATA, VARIANCE, and QUALITY through the EXTABLE
file, avoiding the ndfcopy and possible
setvar steps.
You can convert an NDF to a FITS file using the command ndf2fits: