FTS1_SDSCF

Creates a SCAR description file from a FITS table-format headers

Description:

This routine searches for the mandatory FITS-Tables-format header cards stored in a buffer, and their values are returned, if they are present. Should an item be missing or have an unsupported value an error is reported, a bad status is set and the routine exits. This version supports mandatory descriptors that are not in the correct order.

There are two methods of opening the FACTS description file. The first associates the file with a parameter. Unfortunately, FIO filename parameters cannot be given dynamic values. Therefore, the name of the table in the header card images is presented, and the naming rule for an FACTS description file given. The user has to type in the file name, when prompted for the FACTS file to be created for ADC(/SCAR) usage. However, in the alternative, automatic mode, the supplied file name is used with the DSCF prefix to open the FACTS file without recourse to the parameter system. Information in the FITS headers is transferred to this description file. The mandatory FACTS parameters for a sequential disk file are written plus EPOCH, VERSION, NRECORDS and AUTHOR where these are known. These are followed by FACTS records describing the fields in the table, and the ENDFIELD record. Finally all the comment lines in the FITS header are copied, in order, to the FACTS file. Blank comment entries are inserted in the

The syntax of the field s format descriptor is checked to see that it is standard.

Invocation

CALL FTS1_SDSCF( NCARD, HEADER, SCARD, PNDSCF, AUTO, TABNAM, : DSCFNM, NDIM, AXIS, STATUS )

Arguments

NCARD = INTEGER (Given)
The number of card images in the header.
HEADER( NCARD ) = CHARACTER ( ) (Given)
The buffer containing the table-format FITS header.
SCARD = INTEGER (Given)
The number of the card from where the searches of the header will begin. This is needed because the headers make contain a dummy header prior to an extension.
PNDSCF = CHARACTER ( ) (Given)
The parameter name used to create and associate the FACTS description file. It is only used when %AUTO is false.
AUTO = LOGICAL (Given)
If true the supplied file name is used to open the file rather than obtaining the file name via the parameter system.
TABNAM = CHARACTER ( ) (Given and Returned)
The name of the table file. It is read if %AUTO is true and written when %AUTO is false.
DSCFNM = CHARACTER ( ) (Returned)
The name of the description file.
NDIM = INTEGER (Returned)
The number of active dimensions.
AXIS( DAT__MXDIM ) = INTEGER (Returned)
The dimensions of the data array.
STATUS = INTEGER (Given and Returned)
Global status value.

Notes: