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: 2010/09/24 09:32:07 $
00023  * $Revision: 1.24 $
00024  * $Name: uves-5_0_0 $
00025  * $Log: uves_qclog.h,v $
00026  * Revision 1.24  2010/09/24 09:32:07  amodigli
00027  * put back QFITS dependency to fix problem spot by NRI on FIBER mode (with MIDAS calibs) data
00028  *
00029  * Revision 1.22  2007/08/30 14:05:19  amodigli
00030  * moved MAX_NAME_SIZE def to uves_globals.h
00031  *
00032  * Revision 1.21  2007/06/06 08:17:33  amodigli
00033  * replace tab with 4 spaces
00034  *
00035  * Revision 1.20  2007/04/24 14:09:29  jmlarsen
00036  * Removed obsolete log_slitwidth option to uves_qclog_add_common_wave()
00037  *
00038  * Revision 1.19  2007/04/24 12:50:29  jmlarsen
00039  * Replaced cpl_propertylist -> uves_propertylist which is much faster
00040  *
00041  * Revision 1.18  2007/02/26 10:16:42  jmlarsen
00042  * Support not logging slit width
00043  *
00044  * Revision 1.17  2007/01/29 12:11:02  jmlarsen
00045  * Log QC parameters (pos, fwhm, s/n) also for simple extraction
00046  *
00047  * Revision 1.16  2007/01/26 12:33:57  amodigli
00048  * added function for common QC
00049  *
00050  * Revision 1.15  2006/12/07 08:26:21  jmlarsen
00051  * Added uves_pfits_get_readspeed
00052  *
00053  * Revision 1.14  2006/12/01 12:28:18  jmlarsen
00054  * Added function to create QC parameter names
00055  *
00056  * Revision 1.13  2006/10/04 10:59:04  jmlarsen
00057  * Implemented QC.VRAD parameters
00058  *
00059  * Revision 1.12  2006/10/02 08:35:01  jmlarsen
00060  * const bugfix
00061  *
00062  * Revision 1.11  2006/09/19 14:32:43  jmlarsen
00063  * Factored out common code to compute extraction QC parameters
00064  *
00065  * Revision 1.10  2006/08/24 11:38:32  jmlarsen
00066  * Write QC dictionary ID to product header
00067  *
00068  * Revision 1.9  2006/07/14 12:28:02  jmlarsen
00069  * Added function to write common QC parameters
00070  *
00071  * Revision 1.8  2006/06/28 13:27:50  amodigli
00072  * Fixed problem dumping ARCFILE key changing uves_save_paf interface
00073  *
00074  * Revision 1.7  2006/06/22 08:58:33  jmlarsen
00075  * Use correct port number for QC
00076  *
00077  * Revision 1.6  2006/05/05 13:55:45  jmlarsen
00078  * Removed lone CPL_END_DECLS
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

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