Main Page | Modules | Alphabetical List | Class List | Directories | Class Members

DFS related functions


Functions

cpl_error_code cpl_dfs_setup_product_header (cpl_propertylist *header, const cpl_frame *product_frame, const cpl_frameset *framelist, const cpl_parameterlist *parlist, const char *recid, const char *pipeline_id, const char *dictionary_id)
 Add product keywords to a pipeline product property list.

Function Documentation

cpl_error_code cpl_dfs_setup_product_header cpl_propertylist header,
const cpl_frame product_frame,
const cpl_frameset framelist,
const cpl_parameterlist parlist,
const char *  recid,
const char *  pipeline_id,
const char *  dictionary_id
 

Add product keywords to a pipeline product property list.

Parameters:
header Property list where keywords must be written
product_frame Frame describing the product
framelist List of frames including all raw input frames
parlist Recipe parameter list
recid Recipe name
pipeline_id Pipeline unique identifier
dictionary_id PRO dictionary identifier
Returns:
CPL_ERROR_NONE on success.
Errors:
CPL_ERROR_NULL_INPUT Any of the input argumnents is a NULL pointer.
CPL_ERROR_DATA_NOT_FOUND The input framelist does not contain any input file. A call to the function cpl_error_get_where() would return the string "cpl_dfs_setup_product_header/set-of-frames".
CPL_ERROR_FILE_NOT_FOUND Any file listed in the input set-of-frames doesn't exist.
CPL_ERROR_UNSPECIFIED This error would be caused by any unexpected incompatibility within the CPL, and it should be immediately reported to the CPL Team.

This function checks the header associated to a pipeline product, to ensure that it is DICB compliant. In particular, this function does the following:

  1. Copy to header, if they are present, the following primary FITS keywords from the first input frame in the framelist: ORIGIN, TELESCOPE, INSTRUME, OBJECT, RA, DEC, EPOCH, EQUINOX, RADECSYS, DATE-OBS, MJD-OBS, UTC, LST, PI-COI, OBSERVER. If those keywords are already present in the header property list, they are overwritten only in case they have the same type. If any of these keywords are present with an unexpected type, a warning is issued, but the keywords are copied anyway (provided that the above conditions are fulfilled), and no error is set.

  1. Copy all the HIERARCH.ESO._ keywords from the primary FITS header of the first input frame in framelist, with the exception of the HIERARCH.ESO.DPR._, and of the .PRO._ and .DRS._ keywords if the first input frame is a calibration. If those keywords are already present in header, they are overwritten.

  1. If found, remove the HIERARCH.ESO.DPR._ keywords from header.

  1. If found, remove the ARCFILE and ORIGFILE keywords from header.

  1. Add to header the following mandatory keywords from the PRO dictionary: PIPEFILE, PRO.DID, PRO.REC1.ID, PRO.REC1.DRS.ID, PRO.REC1.PIPE.ID, PRO.CATG, and PRO.TYPE. If those keywords are already present in header, they are overwritten. The keyword PRO.TYPE is always given the value "REDUCED".

  1. Check the existence of the keyword PRO.DATANCOM in header. If this keyword is missing, one is added, with the value of the total number of input frames.

  1. Add to header the keywords PRO.REC1.RAW1.NAME, PRO.REC1.RAW1.CATG, PRO.REC1.CAL1.NAME, PRO.REC1.CAL1.CATG, to describe the content of the input set-of-frames.

See the DICB PRO dictionary to have details on the mentioned PRO keywords.

Note:
The first input frame in framelist is the first raw frame in framelist. If there are no raw frames in input, then the first calibration frame is taken. Non-FITS files are handled as files with an empty FITS header.


Generated on Mon Sep 26 14:38:18 2005 for Common Pipeline Library Reference Manual by  doxygen 1.4.1