CVG_PCADC

Writes CADC-style provenance records to the current FITS header

Description:

This creates headers in the current FITS header that record the number and names of all the immediate parents in the supplied NDG provenance structure. It also records the number of root parents—those without ancestors—and their observation identifiers from component OBIDSS within the MORE component of the supplied provenance structure. These are the observations.

The names follow CADC convention as follows. For the immediate parents:

PRVCNT = _INTEGER / Number of parents PRV1 = _CHAR / Name of the first parent PRV2 = _CHAR / Name of the second parent : : : : : : PRVn = _CHAR / Name of the PRVCNTth parent

for the root provenance: OBSCNT = _INTEGER / Number of root-ancestor headers OBS1 = _CHAR / First observation identifier : : : : : : OBSn = _CHAR / OBSCNTth observation identifier

and the output file name: FILEID = _CHAR / Filename

The above headers are prefaced by a blank header and a title " Provenance:" comment.

The PRODUCT keyword s value is modified for FITS extensions. It has _ <extname > appended where <extname > is the lowercase name of the standard EXTNAME keyword.

Invocation

CALL CVG_PCADC( IPROV, FUNIT, STATUS )

Arguments

IPROV = INTEGER (Given)
The identifier of the PROVENANCE that is to be written to the FITS headers. If NDG__NULL is supplied, no provenance is stored in the header, but the PRODUCT keyword is still updated.
FUNIT = INTEGER (Given)
The logical unit number of the output FITS file.
STATUS = INTEGER (Given and Returned)
The global status.

Notes:

Prior Requirements

The FITS file must already be open. The current HDU in the FITS file should be the primary and the standard headers should be present.