Quality Control Utilities


Functions

cpl_error_code mos_qc_start_group (const char *qcdic_version, const char *instrument)
 Initiate a new QC1 group.
cpl_error_code mos_qc_end_group ()
 Close current QC1 PAF file.
cpl_error_code mos_qc_write_string (const char *name, const char *value, const char *comment, const char *instrument)
 Add string parameter to current QC1 group.
cpl_error_code mos_qc_write_double (const char *name, double value, const char *unit, const char *comment, const char *instrument)
 Add double parameter to current QC1 group.
cpl_error_code mos_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.
cpl_error_code mos_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.

Detailed Description

The module collects utility functions for quality control operations.

Function Documentation

cpl_error_code mos_qc_end_group  ) 
 

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: mos_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 mos_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:
header Pointer to a keyword header.
name Keyword name.
unit Optional unit to be associated to keyword value.
comment Optional comment to be associated to keyword value.
instrument Instrument 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 mos_qc_start_group().

cpl_error_code mos_qc_start_group const char *  qcdic_version,
const char *  instrument
 

Initiate a new QC1 group.

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 it's found open, this is an error: mos_qc_end_group() should be called first.

cpl_error_code mos_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:
name Parameter name
value Parameter value
unit Parameter unit
comment Parameter comment;
instrument Instrument 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: mos_qc_start_group() should be called first.

cpl_error_code mos_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:
header Product header
value Value to write.
name QC1 PAF entry name.
unit Optional unit to be associated to value.
comment Comment to be associated to value.
instrument Instrument 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 mos_qc_start_group().

cpl_error_code mos_qc_write_string const char *  name,
const char *  value,
const char *  comment,
const char *  instrument
 

Add string parameter to current QC1 group.

Parameters:
name Parameter name
value Parameter value
comment Parameter comment
instrument Instrument 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: mos_qc_start_group() should be called first.


Generated on Wed Mar 14 14:50:48 2007 for MOS DRS Reference Manual by  doxygen 1.4.6