Defines |
#define | CPL_DFS_PRO_CATG "ESO PRO CATG" |
| The name of the Product Category key.
|
#define | CPL_DFS_PRO_SCIENCE "ESO PRO SCIENCE" |
| The name of the Product Science key.
|
#define | CPL_DFS_PRO_TECH "ESO PRO TECH" |
| The name of the Product Tech key.
|
#define | CPL_DFS_PRO_TYPE "ESO PRO TYPE" |
| The name of the Product Type key.
|
Functions |
cpl_error_code | cpl_dfs_save_imagelist (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const cpl_imagelist *imagelist, cpl_type type, const char *recipe, const cpl_propertylist *applist, const char *remregexp, const char *pipe_id, const char *filename) |
| Save an imagelist as a DFS-compliant pipeline product.
|
cpl_error_code | cpl_dfs_save_paf (const char *instrume, const char *recipe, const cpl_propertylist *paflist, const char *filename) |
| Create a new PAF file.
|
cpl_error_code | cpl_dfs_save_propertylist (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const char *recipe, const cpl_propertylist *applist, const char *remregexp, const char *pipe_id, const char *filename) |
| Save a propertylist as a DFS-compliant pipeline product.
|
cpl_error_code | cpl_dfs_save_table (cpl_frameset *allframes, cpl_propertylist *header, const cpl_parameterlist *parlist, const cpl_frameset *usedframes, const cpl_frame *inherit, const cpl_table *table, const cpl_propertylist *tablelist, const char *recipe, const cpl_propertylist *applist, const char *remregexp, const char *pipe_id, const char *filename) |
| Save a table as a DFS-compliant pipeline product.
|
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, const cpl_frame *inherit_frame) |
| Add product keywords to a pipeline product property list.
|
cpl_error_code | cpl_dfs_update_product_header (cpl_frameset *self) |
| Perform any DFS-compliancy required actions (DATAMD5/PIPEFILE update)
|
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 input frames |
parlist | Recipe parameter list |
recid | Recipe name |
pipeline_id | Pipeline unique identifier |
dictionary_id | PRO dictionary identifier |
inherit_frame | Frame from which header information is inherited |
- Returns:
CPL_ERROR_NONE
on success.
- Errors:
CPL_ERROR_NULL_INPUT | An input pointer is NULL . |
CPL_ERROR_DATA_NOT_FOUND | The input framelist contains no input frames or a frame in the input framelist does not specify a file. In the former case the string "Empty set-of-frames" is appended to the error message returned by cpl_error_get_message(). |
CPL_ERROR_ILLEGAL_INPUT | The product frame is not tagged or not grouped as CPL_FRAME_GROUP_PRODUCT . A specified inherit_frame doesn't belong to the input frame list, or it is not in FITS format. |
CPL_ERROR_FILE_NOT_FOUND | A frame in the input framelist specifies a non-existing file. |
CPL_ERROR_BAD_FILE_FORMAT | A frame in the input framelist specifies an invalid file. |
This function checks the header associated to a pipeline product, to ensure that it is DICB compliant. In particular, this function does the following:
- Selects a reference frame from which the primary and secondary keyword information is inherited. The primary information is contained in the FITS keywords ORIGIN, TELESCOPE, INSTRUME, OBJECT, RA, DEC, EPOCH, EQUINOX, RADECSYS, DATE-OBS, MJD-OBS, UTC, LST, PI-COI, OBSERVER, while the secondary information is contained in all the other keywords. If the inherit_frame is just a NULL pointer, both primary and secondary information is inherited from the first frame in the input framelist with group CPL_FRAME_GROUP_RAW, or if no such frames are present the first frame with group CPL_FRAME_GROUP_CALIB. If inherit_frame is non-NULL, the secondary information is inherited from inherit_frame instead.
- 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.
- Copy all the HIERARCH.ESO._ keywords from the primary FITS header of the inherit_frame in framelist, with the exception of the HIERARCH.ESO.DPR._, and of the .PRO._ and .DRS._ keywords if the inherit_frame is a calibration. If those keywords are already present in header, they are overwritten.
- If found, remove the HIERARCH.ESO.DPR._ keywords from header.
- If found, remove the ARCFILE and ORIGFILE keywords from header.
- 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, and PRO.CATG. If those keywords are already present in header, they are overwritten. The keyword PRO.CATG is always set identical to the tag in product_frame.
- Only if missing, add to header the following mandatory keywords from the PRO dictionary: PRO.TYPE, PRO.TECH, and PRO.SCIENCE. The keyword PRO.TYPE will be set to "REDUCED". If the keyword DPR.TECH is found in the header of the first frame, PRO.TECH is given its value, alternatively if the keyword PRO.TECH is found it is copied instead, and if all fails the value "UNDEFINED" is set. Finally, if the keyword DPR.CATG is found in the header of the first frame and is set to "SCIENCE", the boolean keyword PRO.SCIENCE will be set to "true", otherwise it will be copied from an existing PRO.SCIENCE jeyword, while it will be set to "false" in all other cases.
- 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 raw input frames.
- 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:
- Non-FITS files are handled as files with an empty FITS header.