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.
char * uves_get_rootname (const char *filename)
 computes rootname
void uves_get_paf_name (const char *in, int paf_no, char **paf)
 get paf file name
int uves_blank2dot (const char *in, char *ou)
 replace a blank to a dot
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.
cpl_table * uves_qclog_init (const uves_propertylist *raw_header, enum uves_chip chip)
 Init QC-LOG table.
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.
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.
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.
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.
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.
int uves_qclog_delete (cpl_table **table)
 delete QC-LOG table
int uves_pfits_put_qc (uves_propertylist *plist, const cpl_table *qclog)
 Add QC-LOG to FITS header.
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.
void uves_qclog_add_common_wave (const uves_propertylist *raw_header, enum uves_chip chip, cpl_table *qclog)
 Write common QC parameters.
const char * uves_qclog_get_qc_name (const char *name, bool flames, int trace_number)
 Create QC parameter name.
int uves_qclog_dump_common (const uves_propertylist *plist, enum uves_chip chip, cpl_table *qclog)
 Create common QC log.
int uves_qclog_dump_common_wave (const uves_propertylist *plist, enum uves_chip chip, cpl_table *qclog)
 Create common QC log.

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:
filename Name of the file to create.
paf_id PAF identificator.
paf_desc PAF description.
login_name Login name
datetime Date
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:
filename name 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:
in product name
paf_no paf file number
paf output 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:
in input string
ou output 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:
filename input filename. This is the filename of the associated recipe product
paf_no paf 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_id input recipe id
qclog QC parameters table
plist property list
rhead reference frame header
pro_catg product 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_header input FITS header
chip CCD 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:
table QC-LOG table
key_name QC-LOG key name
value QC-LOG key value
key_help QC-LOG key help
format QC-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:
table QC-LOG table
key_name QC-LOG key name
value QC-LOG key value
key_help QC-LOG key help
format QC-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:
table QC-LOG table
key_name QC-LOG key name
value QC-LOG key value
key_help QC-LOG key help
format QC-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:
table QC-LOG table
key_name QC-LOG key name
value QC-LOG key value
key_help QC-LOG key help
format QC-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:
table QC-LOG table
key_name QC-LOG key name
value QC-LOG key value
key_help QC-LOG key help
format QC-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:
table QC-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:
plist propertylist (FITS header)
qclog QC-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:
qclog QC table to write to
raw_header input frame FITS header
raw_image input science image
slit extraction slit length (pixels)
info_tbl containing the previously computed parameters

Definition at line 803 of file uves_qclog.c.

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

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_header raw frame FITS header
chip CCD chip
qclog QC 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:
name last part of QC name
flames FLAMES?
trace_number for 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:
name last part of QC name
flames FLAMES?
trace_number for 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().


Generated on 9 Mar 2012 for UVES Pipeline Reference Manual by  doxygen 1.6.1