UVES Pipeline Reference Manual  5.4.6
Functions
Interface for reading/writing QC LOG keywords.

Functions

static FILE * uves_paf_print_header (const char *filename, const char *paf_id, const char *paf_desc, const char *login_name, const char *datetime)
 Open a new PAF file, output a default header. More...
 
char * uves_get_rootname (const char *filename)
 computes rootname More...
 
void uves_get_paf_name (const char *in, int paf_no, char **paf)
 get paf file name More...
 
int uves_blank2dot (const char *in, char *ou)
 replace a blank to a dot More...
 
int uves_save_paf (const char *filename, int paf_no, const char *rec_id, const cpl_table *qclog, uves_propertylist *plist, const uves_propertylist *rhead, const char *pro_catg)
 Init QC-LOG table. More...
 
cpl_table * uves_qclog_init (const uves_propertylist *raw_header, enum uves_chip chip)
 Init QC-LOG table. More...
 
int uves_qclog_add_int (cpl_table *table, const char *key_name, const int value, const char *key_help, const char *format)
 Add integer key to QC-LOG table. More...
 
int uves_qclog_add_bool (cpl_table *table, const char *key_name, const char value, const char *key_help, const char *format)
 Add boolean key to QC-LOG table. More...
 
int uves_qclog_add_float (cpl_table *table, const char *key_name, const float value, const char *key_help, const char *format)
 Add float key to QC-LOG table. More...
 
int uves_qclog_add_double (cpl_table *table, const char *key_name, const double value, const char *key_help, const char *format)
 Add double key to QC-LOG table. More...
 
int uves_qclog_add_string (cpl_table *table, const char *key_name, const char *value, const char *key_help, const char *format)
 Add string key to QC-LOG table. More...
 
int uves_qclog_delete (cpl_table **table)
 delete QC-LOG table More...
 
int uves_pfits_put_qc (uves_propertylist *plist, const cpl_table *qclog)
 Add QC-LOG to FITS header. More...
 
void uves_qclog_add_sci (cpl_table *qclog, const uves_propertylist *raw_header, const cpl_image *raw_image, double slit, const cpl_table *info_tbl)
 Write QC parameters related to science reduction. More...
 
void uves_qclog_add_common_wave (const uves_propertylist *raw_header, enum uves_chip chip, cpl_table *qclog)
 Write common QC parameters. More...
 
const char * uves_qclog_get_qc_name (const char *name, bool flames, int trace_number)
 Create QC parameter name. More...
 
int uves_qclog_dump_common (const uves_propertylist *plist, enum uves_chip chip, cpl_table *qclog)
 Create common QC log. More...
 
int uves_qclog_dump_common_wave (const uves_propertylist *plist, enum uves_chip chip, cpl_table *qclog)
 Create common QC log. More...
 

Detailed Description

Function Documentation

static FILE * uves_paf_print_header ( const char *  filename,
const char *  paf_id,
const char *  paf_desc,
const char *  login_name,
const char *  datetime 
)
static

Open a new PAF file, output a default header.

Parameters
filenameName of the file to create.
paf_idPAF identificator.
paf_descPAF description.
login_nameLogin name
datetimeDate
Returns
Opened file pointer.

This function creates a new PAF file with the requested file name. If another file already exists with the same name, it will be overwritten (if the file access rights allow it).

A default header is produced according to the VLT DICB standard. You need to provide an identificator (paf_id) of the producer of the file. Typically, something like "ISAAC/zero_point".

The PAF description (paf_desc) is meant for humans. Typically, something like "Zero point computation results".

This function returns an opened file pointer, ready to receive more data through fprintf's. The caller is responsible for fclose()ing the file.

Definition at line 101 of file uves_qclog.c.

References uves_msg_error.

Referenced by uves_save_paf().

char* uves_get_rootname ( const char *  filename)

computes rootname

Parameters
filenamename of file
Returns
rootname of filename

Definition at line 137 of file uves_qclog.c.

Referenced by uves_get_paf_name().

void uves_get_paf_name ( const char *  in,
int  paf_no,
char **  paf 
)

get paf file name

Parameters
inproduct name
paf_nopaf file number
pafoutput paf file name

Definition at line 165 of file uves_qclog.c.

References uves_get_rootname().

Referenced by uves_save_paf().

int uves_blank2dot ( const char *  in,
char *  ou 
)

replace a blank to a dot

Parameters
ininput string
ououtput string

Definition at line 189 of file uves_qclog.c.

Referenced by uves_save_paf().

int uves_save_paf ( const char *  filename,
int  paf_no,
const char *  rec_id,
const cpl_table *  qclog,
uves_propertylist plist,
const uves_propertylist rhead,
const char *  pro_catg 
)

Init QC-LOG table.

Parameters
filenameinput filename. This is the filename of the associated recipe product
paf_nopaf file number, counting from zero. The paf filename is created from the 'filename' and from this number. (This is to support several paf files for one recipe product).
rec_idinput recipe id
qclogQC parameters table
plistproperty list
rheadreference frame header
pro_catgproduct category
Returns
a cpl_table with 0 rows and proper structure to do hold QC-LOG keys

Definition at line 225 of file uves_qclog.c.

References uves_blank2dot(), uves_get_datetime_iso8601(), uves_get_paf_name(), uves_msg, uves_msg_error, uves_paf_print_header(), uves_pfits_get_arcfile(), uves_pfits_get_dpr_catg(), uves_pfits_get_dpr_tech(), uves_pfits_get_dpr_type(), uves_pfits_get_rec1raw1name(), uves_pfits_get_templateid(), uves_propertylist_contains(), and uves_propertylist_get_string().

cpl_table* uves_qclog_init ( const uves_propertylist raw_header,
enum uves_chip  chip 
)

Init QC-LOG table.

Parameters
raw_headerinput FITS header
chipCCD chip
Returns
a cpl_table with proper structure to do hold QC-LOG keys and QC parameters common to all recipes

Definition at line 410 of file uves_qclog.c.

References check_nomsg, uves_msg_debug, uves_msg_warning, uves_pfits_get_binx(), uves_pfits_get_biny(), uves_pfits_get_chip_name(), uves_pfits_get_gratname(), uves_pfits_get_insmode(), uves_pfits_get_inspath(), uves_pfits_get_readspeed(), uves_propertylist_contains(), uves_qclog_add_int(), uves_qclog_add_string(), and uves_remove_string_prefix().

Referenced by uves_reduce_mflat(), and uves_reduce_scired().

int uves_qclog_add_int ( cpl_table *  table,
const char *  key_name,
const int  value,
const char *  key_help,
const char *  format 
)

Add integer key to QC-LOG table.

Parameters
tableQC-LOG table
key_nameQC-LOG key name
valueQC-LOG key value
key_helpQC-LOG key help
formatQC-LOG key format
Returns
0 after successfull keyword addition

Definition at line 521 of file uves_qclog.c.

Referenced by uves_mflat_qclog(), uves_qclog_add_sci(), uves_qclog_init(), uves_wavecal_identify(), and uves_wavecal_search().

int uves_qclog_add_bool ( cpl_table *  table,
const char *  key_name,
const char  value,
const char *  key_help,
const char *  format 
)

Add boolean key to QC-LOG table.

Parameters
tableQC-LOG table
key_nameQC-LOG key name
valueQC-LOG key value
key_helpQC-LOG key help
formatQC-LOG key format
Returns
0 after successfull keyword addition

Definition at line 561 of file uves_qclog.c.

int uves_qclog_add_float ( cpl_table *  table,
const char *  key_name,
const float  value,
const char *  key_help,
const char *  format 
)

Add float key to QC-LOG table.

Parameters
tableQC-LOG table
key_nameQC-LOG key name
valueQC-LOG key value
key_helpQC-LOG key help
formatQC-LOG key format
Returns
0 after successfull keyword addition

Definition at line 600 of file uves_qclog.c.

int uves_qclog_add_double ( cpl_table *  table,
const char *  key_name,
const double  value,
const char *  key_help,
const char *  format 
)

Add double key to QC-LOG table.

Parameters
tableQC-LOG table
key_nameQC-LOG key name
valueQC-LOG key value
key_helpQC-LOG key help
formatQC-LOG key format
Returns
0 after successfull keyword addition

Definition at line 641 of file uves_qclog.c.

Referenced by tflat_qclog(), uves_qclog_add_common_wave(), uves_qclog_add_sci(), uves_qclog_dump_common(), uves_qclog_dump_common_wave(), and verify_calibration().

int uves_qclog_add_string ( cpl_table *  table,
const char *  key_name,
const char *  value,
const char *  key_help,
const char *  format 
)

Add string key to QC-LOG table.

Parameters
tableQC-LOG table
key_nameQC-LOG key name
valueQC-LOG key value
key_helpQC-LOG key help
formatQC-LOG key format
Returns
0 after successfull keyword addition

Definition at line 683 of file uves_qclog.c.

Referenced by scired_qclog(), tflat_qclog(), uves_mflat_qclog(), uves_qclog_dump_common(), and uves_qclog_init().

int uves_qclog_delete ( cpl_table **  table)

delete QC-LOG table

Parameters
tableQC-LOG table
Returns
0 after successfull delete

Definition at line 716 of file uves_qclog.c.

Referenced by uves_reduce_mflat(), uves_reduce_mflat_combine(), and uves_reduce_scired().

int uves_pfits_put_qc ( uves_propertylist plist,
const cpl_table *  qclog 
)

Add QC-LOG to FITS header.

Parameters
plistpropertylist (FITS header)
qclogQC-LOG table
Returns
0 after successfull keywords addition, -1 if not

Definition at line 735 of file uves_qclog.c.

References uves_msg_error, uves_propertylist_contains(), and uves_propertylist_set_comment().

void uves_qclog_add_sci ( cpl_table *  qclog,
const uves_propertylist raw_header,
const cpl_image *  raw_image,
double  slit,
const cpl_table *  info_tbl 
)

Write QC parameters related to science reduction.

Parameters
qclogQC table to write to
raw_headerinput frame FITS header
raw_imageinput science image
slitextraction slit length (pixels)
info_tblcontaining the previously computed parameters

Definition at line 803 of file uves_qclog.c.

References check, check_nomsg, uves_baryvel(), uves_msg_debug, uves_qclog_add_double(), and uves_qclog_add_int().

Referenced by scired_qclog().

void uves_qclog_add_common_wave ( const uves_propertylist raw_header,
enum uves_chip  chip,
cpl_table *  qclog 
)

Write common QC parameters.

Parameters
raw_headerraw frame FITS header
chipCCD chip
qclogQC table to write to

This function writes some QC parameters which are common for several recipes/QC-tests.

Definition at line 942 of file uves_qclog.c.

References check_nomsg, uves_pfits_get_gratwlen(), uves_pfits_get_slitwidth(), uves_pfits_get_tempcam(), uves_qclog_add_double(), and uves_remove_string_prefix().

const char* uves_qclog_get_qc_name ( const char *  name,
bool  flames,
int  trace_number 
)

Create QC parameter name.

Parameters
namelast part of QC name
flamesFLAMES?
trace_numberfor FLAMES only
Returns
newly allocated QC name string

Definition at line 985 of file uves_qclog.c.

Referenced by test_qc_name().

int uves_qclog_dump_common ( const uves_propertylist plist,
enum uves_chip  chip,
cpl_table *  qclog 
)
int uves_qclog_dump_common_wave ( const uves_propertylist plist,
enum uves_chip  chip,
cpl_table *  qclog 
)

Create common QC log.

Parameters
namelast part of QC name
flamesFLAMES?
trace_numberfor FLAMES only
Returns
newly allocated QC name string

Definition at line 1166 of file uves_qclog.c.

References check_nomsg, uves_pfits_get_gratwlen(), uves_pfits_get_slitwidth(), uves_pfits_get_tempcam(), and uves_qclog_add_double().