VIMOS DRS Reference Manual  2.9.13
Functions
Quality Control Utilities

Functions

cpl_error_code fors_qc_start_group (cpl_propertylist *header, const char *qcdic_version, const char *instrument)
 Initiate a new QC1 group. More...
 
cpl_error_code fors_qc_end_group (void)
 Close current QC1 PAF file. More...
 
cpl_error_code fors_qc_write_string (const char *name, const char *value, const char *comment, const char *instrument)
 Add string parameter to current QC1 group. More...
 
cpl_error_code fors_qc_write_double (const char *name, double value, const char *unit, const char *comment, const char *instrument)
 Add double parameter to current QC1 group. More...
 
cpl_error_code fors_qc_keyword_to_paf (cpl_propertylist *header, const char *name, const char *unit, const char *comment, const char *instrument)
 Copy a keyword value to the currently active QC1 PAF object. More...
 
cpl_error_code fors_qc_write_qc_string (cpl_propertylist *header, const char *name, const char *value, const char *comment, const char *instrument)
 Write a string value to the active QC1 PAF object and to a header. More...
 
cpl_error_code fors_qc_write_qc_double (cpl_propertylist *header, double value, const char *name, const char *unit, const char *comment, const char *instrument)
 Write an integer value to the active QC1 PAF object and to a header. More...
 

Detailed Description

The module collects utility functions for quality control operations.

Function Documentation

cpl_error_code fors_qc_end_group ( void  )

Close current QC1 PAF file.

Returns
CPL_ERROR_NONE on success

The current QC1 PAF object is written to disk file. If no PAF object is present, this is an error: fors_qc_start_group() should be called first. If the PAF file is empty, the PAF object is destroyed, but no PAF file is created.

cpl_error_code fors_qc_keyword_to_paf ( cpl_propertylist *  header,
const char *  name,
const char *  unit,
const char *  comment,
const char *  instrument 
)

Copy a keyword value to the currently active QC1 PAF object.

Parameters
headerPointer to a keyword header.
nameKeyword name.
unitOptional unit to be associated to keyword value.
commentOptional comment to be associated to keyword value.
instrumentInstrument name
Returns
CPL_ERROR_NONE on success

A keyword with the specified name is searched in the header. Its type is determined, then its value is read with the appropriate interface. From the keyword name the corresponding PAF keyword name is derived by removing any "ESO " at keyword name beginning, and replacing blanks with dots (e.g., "ESO TPL ID" becomes "TPL.ID"). Finally, the new PAF keyword, with the same type as the header keyword, is written to the currently active QC1 PAF object. Note that before calling this funtion a QC1 PAF object must be created with a call to fors_qc_start_group().

cpl_error_code fors_qc_start_group ( cpl_propertylist *  header,
const char *  qcdic_version,
const char *  instrument 
)

Initiate a new QC1 group.

Parameters
headerproduct header
qcdic_versiondictionary ID
instrumentinstrument name
Returns
CPL_ERROR_NONE on success

A new PAF object is initiated, with the name depending on the root PAF_ROOT_NAME and the current pafIndex. If the previous QC1 PAF file is found open, this is an error: fors_qc_end_group() should be called first.

cpl_error_code fors_qc_write_double ( const char *  name,
double  value,
const char *  unit,
const char *  comment,
const char *  instrument 
)

Add double parameter to current QC1 group.

Parameters
nameParameter name
valueParameter value
unitParameter unit
commentParameter comment;
instrumentInstrument name
Returns
CPL_ERROR_NONE on success

To the current QC1 PAF object is appended a double parameter. The comment string is mandatory. The parameter unit must be specified, unless the specified parameter is adimensional, otherwise a null pointer should be passed. To the comment string the unit string (if present) will be appended, enclosed in round brackets, and then the string "[@em instrument]". If no PAF object is present, this is an error: fors_qc_start_group() should be called first.

cpl_error_code fors_qc_write_qc_double ( cpl_propertylist *  header,
double  value,
const char *  name,
const char *  unit,
const char *  comment,
const char *  instrument 
)

Write an integer value to the active QC1 PAF object and to a header.

Returns
CPL_ERROR_NONE on success
Parameters
headerProduct header
valueValue to write.
nameQC1 PAF entry name.
unitOptional unit to be associated to value.
commentComment to be associated to value.
instrumentInstrument name

This function writes the header entries directly to the header of the FITS file written to disk, using the qfits_replace_card() call. An entry with the specified name is written to the current QC1 PAF object. From the entry name, the name of the QC keyword that should be written to header is derived prepending the string "ESO " and replacing all '.' with a blank (e.g., "QC.BIAS.MASTER.MEAN" becomes "ESO QC BIAS MASTER MEAN"). Finally, the new keyword is written to the header. Note that before calling this funtion a QC1 PAF object must be created with a call to fors_qc_start_group().

cpl_error_code fors_qc_write_qc_string ( cpl_propertylist *  header,
const char *  name,
const char *  value,
const char *  comment,
const char *  instrument 
)

Write a string value to the active QC1 PAF object and to a header.

Returns
CPL_ERROR_NONE on success
Parameters
headerProduct header
nameQC1 PAF entry name.
valueValue to write.
unitOptional unit to be associated to value.
commentComment to be associated to value.
instrumentInstrument name

An entry with the specified name is written to the current QC1 PAF object. From the entry name, the name of the QC keyword that should be written to header is derived prepending the string "ESO " and replacing all '.' with a blank (e.g., "QC.BIAS.MASTER.MEAN" becomes "ESO QC BIAS MASTER MEAN"). Finally, the new keyword is written to the header. Note that before calling this funtion a QC1 PAF object must be created with a call to fors_qc_start_group().

cpl_error_code fors_qc_write_string ( const char *  name,
const char *  value,
const char *  comment,
const char *  instrument 
)

Add string parameter to current QC1 group.

Parameters
nameParameter name
valueParameter value
commentParameter comment
instrumentInstrument name
Returns
CPL_ERROR_NONE on success

To the current QC1 PAF object is appended a string parameter. If no PAF object is present, this is an error: fors_qc_start_group() should be called first.