### MTFITS2NDF

Converts FITS magnetic tape files into NDFs.

#### Description:

This application converts files from a FITS tape into NDFs by using shell commands mt and dd to position the tape and convert the selected tape files into FITS disk files and then using FITS2NDF to produce the NDFs. The intermediate FITS files may be saved.

#### Usage:

mtfits2ndf in out block=n [of=fits_file] [$<$fits2ndf_pars$>$]

#### Parameters:

The FITS blocking factor, i.e. the block size on the tape is this value multiplied by the standard FITS block size. The suggested default is 10.
The name of a tape device. For correct tape positioning, a no-rewind device must be used. The device name may have file specifiers appended, separated by commas and enclosed in []. The file specifiers indicate which files from the tape are to be processed. For example: [2] indicates the second file on the tape. [4-6] indicates files 4 to 6. [5-] indicates file 5 to the last file on the tape. [1,3-5,7-] indicates files 1,3,4,5, and 7 to the end of the tape. If no file specifiers are given, all files on the tape will be processed.
Name(prefix) of the intermediate FITS file(s) copied from the tape. Only set this if you want to save the intermediate FITS file(s). If a number of files are being produced, the name should contain a *, which will be replaced by the corresponding FITS tape file number. If OF is not specified, mtf2ndf*.fits will be used and deleted. (See also "Notes").
##### OUT = NDF (Write)
The name of the NDF(s) to be produced by FITS2NDF. This is passed to FITS2NDF but only a single element string can be specified—it can contain the matching patterns allowed for FITS2NDF, for example "*".
##### $<$fits2ndf_pars$>$
Other parameters will be passed to FITS2NDF—see the description of FITS2NDF.

#### Notes:

• This application is a tcsh script which calls an ADAM A-task. CONVERT startup sets alias mtfits2ndf to ‘tcsh mtfits2ndf.tcsh’, and tcsh must be on the user’s PATH.
• The string specified for the intermediate FITS file name(s) will be presented as the IN parameter for the FITS2NDF call. All files matching the string will be used, whether or not they were produced in this run. (See the FITS2NDF description for details.)

#### Examples:

mtfits2ndf /dev/nst0[2] f256 block=10 fmtcnv=f
This converts the second file on the tape on device /dev/nst0 to an NDF called f256. The FITS blocking factor of the tape is 10. As a result of the parameters passed to FITS2NDF, the data type of the NDF’s data array matches that of the FITS primary data array, a FITS extension is created in f256, and FITS sub-files are propagated to NDF extensions.
mtfits2ndf /dev/nst0 * block=1 of=ral256_*.fit
Will convert each file on the tape on device /dev/nst0 (with a blocking factor of 1) to FITS disk files named ral256_*.fit, where * is replaced by each tape file number. The FITS files will be converted to NDFs named ral256_* and retained.
mtfits2ndf
The user is prompted for the input device, the output NDF name and the FITS blocking factor. All other parameters are defaulted.

#### References

NASA Office of Standards and Technology, 1997, A User’s Guide for the Flexible Image Transport System (FITS), Version 4.0.

NASA Office of Standards and Technology, 1999, Definition of the Flexible Image Transport System (FITS).

#### Deficiencies

Facilities for naming multiple output files are limited. The command is not available from ICL, nor as an option in the automatic (on-the-fly) conversion system. Extensions within a FITS file may not be specified. However, it is possible to pass an EXTABLE parameter to the FITS2NDF operation to select extensions. Only tape devices for which the mt and dd commands will work may be used.

#### Related Applications

Kappa: FITSDIN, FITSIN; CONVERT: FITS2NDF.