uves_qclog.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 #ifndef UVES_QCLOG_H
00083 #define UVES_QCLOG_H
00084
00085 #include <uves_propertylist.h>
00086 #include <uves_chip.h>
00087
00088 #include <cpl.h>
00089
00090 #include <stdbool.h>
00091
00092 #define KEY_NAME_PRO_REC1_RAW1_NAME "ESO PRO REC1 RAW1 NAME"
00093
00094 #define KEY_NAME_PRO_DRSID "ESO PRO REC1 DRS ID"
00095 #define PAF_NAME_PRO_DRSID "PRO REC1 DRS ID"
00096 #define KEY_HELP_PRO_DRSID "Data Reduction System identifier"
00097
00098 #define KEY_NAME_PIPE_ID "ESO PRO REC1 PIPE ID"
00099 #define PAF_NAME_PIPE_ID "PRO REC1 PIPE ID"
00100 #define KEY_HELP_PIPE_ID "Pipeline (unique) identifier"
00101 #define KEY_NAME_PIPEFILE "PIPEFILE"
00102 #define KEY_HELP_PIPEFILE "Filename of data product"
00103
00104 #define KEY_NAME_QC_DID "ESO QC DID"
00105 #define PAF_NAME_QC_DID "QC DID"
00106 #define KEY_HELP_QC_DID "Data dictionary for QC"
00107
00108 #define KEY_NAME_PRO_TYPE "ESO PRO TYPE"
00109 #define PAF_NAME_PRO_TYPE "PRO TYPE"
00110 #define KEY_HELP_PRO_TYPE "Product Type"
00111
00112 #define KEY_NAME_DATE_OBS "DATE-OBS"
00113 #define KEY_HELP_DATE_OBS "Observing date"
00114
00115 #define KEY_NAME_PRO_RECID "ESO PRO REC1 ID"
00116 #define PAF_NAME_PRO_RECID "PRO REC1 ID"
00117 #define KEY_HELP_PRO_RECID "Pipeline recipe(unique) identifier"
00118
00119 #define KEY_NAME_DPR_TYPE "ESO DPR TYPE"
00120 #define KEY_NAME_DPR_CATG "ESO DPR CATG"
00121 #define KEY_NAME_DPR_TECH "ESO DPR TECH"
00122 #define KEY_NAME_PRO_CATG "ESO PRO CATG"
00123 #define KEY_NAME_TPL_ID "ESO TPL ID"
00124 #define KEY_NAME_ARCFILE "ARCFILE"
00125
00126 #define PAF_NAME_DPR_TYPE "DPR TYPE"
00127 #define PAF_NAME_DPR_CATG "DPR CATG"
00128 #define PAF_NAME_DPR_TECH "DPR TECH"
00129 #define PAF_NAME_PRO_CATG "PRO CATG"
00130 #define PAF_NAME_TPL_ID "TPL ID"
00131 #define PAF_NAME_PRO_DRSID "PRO REC1 DRS ID"
00132
00133 #define KEY_HELP_DPR_TYPE "Observation type"
00134 #define KEY_HELP_DPR_CATG "Observation category"
00135 #define KEY_HELP_DPR_TECH "Observation technique"
00136 #define KEY_HELP_PRO_CATG "Category of pipeline product frame"
00137 #define KEY_HELP_TPL_ID "Template sig"
00138 #define KEY_HELP_ARCFILE "Archive file name"
00139 #define KEY_HELP_PRO_DRSID "Data Reduction System identifier"
00140
00141 #define PORT_ID(chip) (((chip) == UVES_CHIP_REDL) ? 4 : 1)
00142
00143 char * uves_get_rootname(const char * filename);
00144 void uves_get_paf_name(const char* in, int paf_no, char** paf);
00145
00146 int uves_blank2dot(const char * in, char* ou);
00147
00148 int uves_save_paf(const char* filename,
00149 int paf_no,
00150 const char* rec_id,
00151 const cpl_table* qclog,
00152 uves_propertylist* plist,
00153 const uves_propertylist* rhead,
00154 const char* pro_catg);
00155
00156 cpl_table *
00157 uves_qclog_init(const uves_propertylist *raw_header,
00158 enum uves_chip chip);
00159 int
00160 uves_qclog_add_int(cpl_table* table,
00161 const char* name,
00162 const int value,
00163 const char* help,
00164 const char* format);
00165
00166 int
00167 uves_qclog_add_bool(cpl_table* table,
00168 const char* name,
00169 const char value,
00170 const char* help,
00171 const char* format);
00172
00173
00174 int
00175 uves_qclog_add_float(cpl_table* table,
00176 const char* name,
00177 const float value,
00178 const char* help,
00179 const char* format);
00180
00181
00182 int
00183 uves_qclog_add_double(cpl_table* table,
00184 const char* name,
00185 const double value,
00186 const char* help,
00187 const char* format);
00188
00189
00190 int
00191 uves_qclog_add_string(cpl_table* table,
00192 const char* name,
00193 const char* value,
00194 const char* help,
00195 const char* format);
00196
00197
00198 int uves_qclog_delete(cpl_table** table);
00199
00200 int uves_pfits_put_qc(uves_propertylist * plist, const cpl_table * qclog);
00201
00202 void uves_qclog_add_sci(cpl_table *qclog,
00203 const uves_propertylist *raw_header,
00204 const cpl_image *raw_image,
00205 double slit,
00206 const cpl_table *info_tbl);
00207
00208 void
00209 uves_qclog_add_common_wave(const uves_propertylist *raw_header,
00210 enum uves_chip chip,
00211 cpl_table *qclog);
00212
00213 const char *
00214 uves_qclog_get_qc_name(const char *name,
00215 bool flames, int trace_number);
00216
00217 int
00218 uves_qclog_dump_common(const uves_propertylist *plist,
00219 enum uves_chip chip,
00220 cpl_table* qclog);
00221
00222 int
00223 uves_qclog_dump_common_wave(const uves_propertylist *plist,
00224 enum uves_chip chip,
00225 cpl_table* qclog);
00226
00227
00228 #endif