uves_qclog.h

00001 /*
00002  * This file is part of the UVES Pipeline
00003  * Copyright (C) 2002, 2003, 2004, 2005 European Southern Observatory
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00018  */
00019 
00020 /*
00021  * $Author: amodigli $
00022  * $Date: 2007/08/30 14:05:19 $
00023  * $Revision: 1.22 $
00024  * $Name: uves-4_2_2 $
00025  * $Log: uves_qclog.h,v $
00026  * Revision 1.22  2007/08/30 14:05:19  amodigli
00027  * moved MAX_NAME_SIZE def to uves_globals.h
00028  *
00029  * Revision 1.21  2007/06/06 08:17:33  amodigli
00030  * replace tab with 4 spaces
00031  *
00032  * Revision 1.20  2007/04/24 14:09:29  jmlarsen
00033  * Removed obsolete log_slitwidth option to uves_qclog_add_common_wave()
00034  *
00035  * Revision 1.19  2007/04/24 12:50:29  jmlarsen
00036  * Replaced cpl_propertylist -> uves_propertylist which is much faster
00037  *
00038  * Revision 1.18  2007/02/26 10:16:42  jmlarsen
00039  * Support not logging slit width
00040  *
00041  * Revision 1.17  2007/01/29 12:11:02  jmlarsen
00042  * Log QC parameters (pos, fwhm, s/n) also for simple extraction
00043  *
00044  * Revision 1.16  2007/01/26 12:33:57  amodigli
00045  * added function for common QC
00046  *
00047  * Revision 1.15  2006/12/07 08:26:21  jmlarsen
00048  * Added uves_pfits_get_readspeed
00049  *
00050  * Revision 1.14  2006/12/01 12:28:18  jmlarsen
00051  * Added function to create QC parameter names
00052  *
00053  * Revision 1.13  2006/10/04 10:59:04  jmlarsen
00054  * Implemented QC.VRAD parameters
00055  *
00056  * Revision 1.12  2006/10/02 08:35:01  jmlarsen
00057  * const bugfix
00058  *
00059  * Revision 1.11  2006/09/19 14:32:43  jmlarsen
00060  * Factored out common code to compute extraction QC parameters
00061  *
00062  * Revision 1.10  2006/08/24 11:38:32  jmlarsen
00063  * Write QC dictionary ID to product header
00064  *
00065  * Revision 1.9  2006/07/14 12:28:02  jmlarsen
00066  * Added function to write common QC parameters
00067  *
00068  * Revision 1.8  2006/06/28 13:27:50  amodigli
00069  * Fixed problem dumping ARCFILE key changing uves_save_paf interface
00070  *
00071  * Revision 1.7  2006/06/22 08:58:33  jmlarsen
00072  * Use correct port number for QC
00073  *
00074  * Revision 1.6  2006/05/05 13:55:45  jmlarsen
00075  * Removed lone CPL_END_DECLS
00076  *
00077  */
00078 
00079 #ifndef UVES_QCLOG_H
00080 #define UVES_QCLOG_H
00081 
00082 #include <uves_propertylist.h>
00083 #include <uves_chip.h>
00084 
00085 #include <cpl.h>
00086 
00087 #include <stdbool.h>
00088 
00089 #define KEY_NAME_PRO_REC1_RAW1_NAME        "ESO PRO REC1 RAW1 NAME"
00090 
00091 #define KEY_NAME_PRO_DRSID                 "ESO PRO REC1 DRS ID"
00092 #define PAF_NAME_PRO_DRSID                 "PRO REC1 DRS ID"
00093 #define KEY_HELP_PRO_DRSID                 "Data Reduction System identifier"
00094 
00095 #define KEY_NAME_PIPE_ID                   "ESO PRO REC1 PIPE ID"
00096 #define PAF_NAME_PIPE_ID                   "PRO REC1 PIPE ID"
00097 #define KEY_HELP_PIPE_ID                   "Pipeline (unique) identifier"
00098 #define KEY_NAME_PIPEFILE                  "PIPEFILE"
00099 #define KEY_HELP_PIPEFILE                  "Filename of data product"
00100 
00101 #define KEY_NAME_QC_DID                    "ESO QC DID"
00102 #define PAF_NAME_QC_DID                    "QC DID"
00103 #define KEY_HELP_QC_DID                    "Data dictionary for QC"
00104 
00105 #define KEY_NAME_PRO_TYPE                  "ESO PRO TYPE"
00106 #define PAF_NAME_PRO_TYPE                  "PRO TYPE"
00107 #define KEY_HELP_PRO_TYPE                  "Product Type"
00108 
00109 #define KEY_NAME_DATE_OBS                  "DATE-OBS"
00110 #define KEY_HELP_DATE_OBS                  "Observing date"
00111 
00112 #define KEY_NAME_PRO_RECID                 "ESO PRO REC1 ID"
00113 #define PAF_NAME_PRO_RECID                 "PRO REC1 ID"
00114 #define KEY_HELP_PRO_RECID                 "Pipeline recipe(unique) identifier"
00115 
00116 #define KEY_NAME_DPR_TYPE                  "ESO DPR TYPE"
00117 #define KEY_NAME_DPR_CATG                  "ESO DPR CATG"
00118 #define KEY_NAME_DPR_TECH                  "ESO DPR TECH"
00119 #define KEY_NAME_PRO_CATG                  "ESO PRO CATG"
00120 #define KEY_NAME_TPL_ID                    "ESO TPL ID"
00121 #define KEY_NAME_ARCFILE                   "ARCFILE"
00122 
00123 #define PAF_NAME_DPR_TYPE                  "DPR TYPE"
00124 #define PAF_NAME_DPR_CATG                  "DPR CATG"
00125 #define PAF_NAME_DPR_TECH                  "DPR TECH"
00126 #define PAF_NAME_PRO_CATG                  "PRO CATG"
00127 #define PAF_NAME_TPL_ID                    "TPL ID"
00128 #define PAF_NAME_PRO_DRSID                 "PRO REC1 DRS ID"
00129 
00130 #define KEY_HELP_DPR_TYPE                  "Observation type"
00131 #define KEY_HELP_DPR_CATG                  "Observation category"
00132 #define KEY_HELP_DPR_TECH                  "Observation technique"
00133 #define KEY_HELP_PRO_CATG                  "Category of pipeline product frame"
00134 #define KEY_HELP_TPL_ID                    "Template sig"
00135 #define KEY_HELP_ARCFILE                   "Archive file name"
00136 #define KEY_HELP_PRO_DRSID                 "Data Reduction System identifier"
00137 
00138 #define PORT_ID(chip) (((chip) == UVES_CHIP_REDL) ? 4 : 1)
00139 
00140 char * uves_get_rootname(const char * filename);
00141 void uves_get_paf_name(const char* in, int paf_no, char** paf);
00142 
00143 int uves_blank2dot(const char * in, char* ou);
00144 
00145 int uves_save_paf(const char* filename, 
00146           int paf_no,
00147                   const char* rec_id,  
00148                   const cpl_table* qclog,
00149                   uves_propertylist*   plist,
00150                   const uves_propertylist*   rhead,
00151                   const char*      pro_catg);
00152 
00153 cpl_table *
00154 uves_qclog_init(const uves_propertylist *raw_header,
00155         enum uves_chip chip);
00156 int
00157 uves_qclog_add_int(cpl_table* table,
00158                  const char* name,  
00159                  const int   value,
00160                  const char* help,
00161          const char* format);
00162 
00163 int
00164 uves_qclog_add_bool(cpl_table* table,
00165                  const char* name,  
00166                  const char  value,
00167                  const char* help,
00168          const char* format);
00169 
00170 
00171 int
00172 uves_qclog_add_float(cpl_table* table,
00173                  const char* name,  
00174                  const float value,
00175                  const char* help,
00176          const char* format);
00177 
00178 
00179 int
00180 uves_qclog_add_double(cpl_table* table,
00181                  const char* name,  
00182                  const double value,
00183                  const char* help,
00184          const char* format);
00185 
00186 
00187 int
00188 uves_qclog_add_string(cpl_table* table,
00189                  const char* name,  
00190                  const char* value,
00191                  const char* help,
00192          const char* format);
00193 
00194 
00195 int uves_qclog_delete(cpl_table** table);
00196 
00197 int uves_pfits_put_qc(uves_propertylist * plist, const cpl_table * qclog);
00198 
00199 void uves_qclog_add_sci(cpl_table *qclog,
00200             const uves_propertylist *raw_header,
00201             const cpl_image *raw_image,
00202             double slit,
00203             const cpl_table *info_tbl);
00204 
00205 void 
00206 uves_qclog_add_common_wave(const uves_propertylist *raw_header,
00207                enum uves_chip chip,
00208                cpl_table *qclog);
00209 
00210 const char *
00211 uves_qclog_get_qc_name(const char *name,
00212                bool flames, int trace_number);
00213 
00214 int
00215 uves_qclog_dump_common(const uves_propertylist *plist,
00216                enum uves_chip chip, 
00217                        cpl_table* qclog);
00218 
00219 int
00220 uves_qclog_dump_common_wave(const uves_propertylist *plist,
00221                     enum uves_chip chip, 
00222                             cpl_table* qclog);
00223 
00224 
00225 #endif

Generated on Mon Apr 21 10:56:56 2008 for UVES Pipeline Reference Manual by  doxygen 1.5.1