FORS Pipeline Reference Manual
4.12.5
|
Macros | |
#define | cleanup |
Functions | |
cpl_error_code | fors_header_write_string (cpl_propertylist *header, const char *name, const char *value, const char *comment) |
Write a string value to the active QC1 PAF object and to a header. More... | |
cpl_error_code | fors_header_write_double (cpl_propertylist *header, double value, const char *name, const char *unit, const char *comment) |
Write an integer value to the active QC1 PAF object and to a header. More... | |
cpl_error_code | fors_header_write_int (cpl_propertylist *header, int value, const char *name, const char *unit, const char *comment) |
cpl_error_code | fors_qc_start_group (cpl_propertylist *header, const char *qcdic_version, const char *instrument) |
Initiate a new QC1 group. More... | |
void | fors_qc_write_group_heading (const cpl_frame *raw_frame, const char *pro_catg, const char *instrument) |
Initiate a new QC1 group and log basic QC. 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_string_chat (const char *name, const char *value, const char *comment, const char *instrument) |
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_write_int (const char *name, int value, const char *unit, const char *comment, const char *instrument) |
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... | |
cpl_error_code | fors_qc_write_qc_int (cpl_propertylist *header, int value, const char *name, const char *unit, const char *comment, const char *instrument) |
Variables | |
const char *const | fors_qc_dic_version = "2.0" |
static ForsPAF * | pafFile = NULL |
static int | pafIndex = 0 |
The module collects utility functions for quality control operations.
#define cleanup |
cpl_error_code fors_header_write_string | ( | cpl_propertylist * | header, |
const char * | name, | ||
const char * | value, | ||
const char * | comment | ||
) |
Write a string value to the active QC1 PAF object and to a header.
CPL_ERROR_NONE
on successheader | Product header |
name | QC1 PAF entry name. |
value | Value to write. |
unit | Optional unit to be associated to value. |
comment | Comment to be associated to value. |
instrument | Instrument 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().
Definition at line 78 of file fors_header.c.
cpl_error_code fors_header_write_double | ( | cpl_propertylist * | header, |
double | value, | ||
const char * | name, | ||
const char * | unit, | ||
const char * | comment | ||
) |
Write an integer value to the active QC1 PAF object and to a header.
CPL_ERROR_NONE
on successheader | 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 fors_qc_start_group().
Definition at line 131 of file fors_header.c.
cpl_error_code fors_qc_start_group | ( | cpl_propertylist * | header, |
const char * | qcdic_version, | ||
const char * | instrument | ||
) |
Initiate a new QC1 group.
header | product header |
qcdic_version | dictionary ID |
instrument | instrument name |
CPL_ERROR_NONE
on successA 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.
Definition at line 77 of file fors_qc.c.
References fors_qc_write_qc_string(), and newForsPAF().
Referenced by test_qc(), and vimos_calib_impl().
void fors_qc_write_group_heading | ( | const cpl_frame * | raw_frame, |
const char * | pro_catg, | ||
const char * | instrument | ||
) |
Initiate a new QC1 group and log basic QC.
raw_frame | input frame |
pro_catg | product category |
instrument | instrument name |
This function logs common QC parameters.
Definition at line 115 of file fors_qc.c.
References assure, fors_qc_keyword_to_paf(), and fors_qc_write_string().
cpl_error_code fors_qc_end_group | ( | void | ) |
Close current QC1 PAF file.
CPL_ERROR_NONE
on successThe 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.
Definition at line 200 of file fors_qc.c.
References deleteForsPAF(), forsPAFIsEmpty(), and forsPAFWrite().
Referenced by test_qc(), and vimos_calib_impl().
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.
name | Parameter name |
value | Parameter value |
comment | Parameter comment |
instrument | Instrument name |
CPL_ERROR_NONE
on successTo 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.
Definition at line 235 of file fors_qc.c.
References forsPAFAppendString().
Referenced by fors_qc_keyword_to_paf(), fors_qc_write_group_heading(), fors_qc_write_qc_string(), test_qc(), and vimos_calib_impl().
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.
name | Parameter name |
value | Parameter value |
unit | Parameter unit |
comment | Parameter comment; |
instrument | Instrument name |
CPL_ERROR_NONE
on successTo 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.
Definition at line 321 of file fors_qc.c.
References forsPAFAppendDouble().
Referenced by fors_qc_keyword_to_paf(), fors_qc_write_qc_double(), and test_qc().
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.
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 |
CPL_ERROR_NONE
on successA 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().
Definition at line 425 of file fors_qc.c.
References fors_qc_write_double(), and fors_qc_write_string().
Referenced by fors_qc_write_group_heading(), test_qc(), and vimos_calib_impl().
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.
CPL_ERROR_NONE
on successheader | Product header |
name | QC1 PAF entry name. |
value | Value to write. |
unit | Optional unit to be associated to value. |
comment | Comment to be associated to value. |
instrument | Instrument 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().
Definition at line 535 of file fors_qc.c.
References fors_qc_write_string().
Referenced by fors_qc_start_group().
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.
CPL_ERROR_NONE
on successheader | 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 fors_qc_start_group().
Definition at line 604 of file fors_qc.c.
References fors_qc_write_double().
Referenced by vimos_calib_impl().