UVES Pipeline Reference Manual  5.4.0
uves_qclog.h
1 /*
2  * This file is part of the UVES Pipeline
3  * Copyright (C) 2002, 2003, 2004, 2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 
20 /*
21  * $Author: amodigli $
22  * $Date: 2010-09-24 09:32:07 $
23  * $Revision: 1.24 $
24  * $Name: not supported by cvs2svn $
25  *
26  */
27 
28 #ifndef UVES_QCLOG_H
29 #define UVES_QCLOG_H
30 
31 #include <uves_propertylist.h>
32 #include <uves_globals.h>
33 #include <uves_chip.h>
34 
35 #include <cpl.h>
36 
37 #include <stdbool.h>
38 
39 #define KEY_NAME_PRO_REC1_RAW1_NAME "ESO PRO REC1 RAW1 NAME"
40 
41 #define KEY_NAME_PRO_DRSID "ESO PRO REC1 DRS ID"
42 #define PAF_NAME_PRO_DRSID "PRO REC1 DRS ID"
43 #define KEY_HELP_PRO_DRSID "Data Reduction System identifier"
44 
45 #define KEY_NAME_PIPE_ID "ESO PRO REC1 PIPE ID"
46 #define PAF_NAME_PIPE_ID "PRO REC1 PIPE ID"
47 #define KEY_HELP_PIPE_ID "Pipeline (unique) identifier"
48 #define KEY_NAME_PIPEFILE "PIPEFILE"
49 #define KEY_HELP_PIPEFILE "Filename of data product"
50 
51 #define KEY_NAME_QC_DID "ESO QC DID"
52 #define PAF_NAME_QC_DID "QC DID"
53 #define KEY_HELP_QC_DID "Data dictionary for QC"
54 
55 #define KEY_NAME_PRO_TYPE "ESO PRO TYPE"
56 #define PAF_NAME_PRO_TYPE "PRO TYPE"
57 #define KEY_HELP_PRO_TYPE "Product Type"
58 
59 #define KEY_NAME_DATE_OBS "DATE-OBS"
60 #define KEY_HELP_DATE_OBS "Observing date"
61 
62 #define KEY_NAME_PRO_RECID "ESO PRO REC1 ID"
63 #define PAF_NAME_PRO_RECID "PRO REC1 ID"
64 #define KEY_HELP_PRO_RECID "Pipeline recipe(unique) identifier"
65 
66 #define KEY_NAME_DPR_TYPE "ESO DPR TYPE"
67 #define KEY_NAME_DPR_CATG "ESO DPR CATG"
68 #define KEY_NAME_DPR_TECH "ESO DPR TECH"
69 #define KEY_NAME_PRO_CATG "ESO PRO CATG"
70 #define KEY_NAME_TPL_ID "ESO TPL ID"
71 #define KEY_NAME_ARCFILE "ARCFILE"
72 
73 #define PAF_NAME_DPR_TYPE "DPR TYPE"
74 #define PAF_NAME_DPR_CATG "DPR CATG"
75 #define PAF_NAME_DPR_TECH "DPR TECH"
76 #define PAF_NAME_PRO_CATG "PRO CATG"
77 #define PAF_NAME_TPL_ID "TPL ID"
78 #define PAF_NAME_PRO_DRSID "PRO REC1 DRS ID"
79 
80 #define KEY_HELP_DPR_TYPE "Observation type"
81 #define KEY_HELP_DPR_CATG "Observation category"
82 #define KEY_HELP_DPR_TECH "Observation technique"
83 #define KEY_HELP_PRO_CATG "Category of pipeline product frame"
84 #define KEY_HELP_TPL_ID "Template sig"
85 #define KEY_HELP_ARCFILE "Archive file name"
86 #define KEY_HELP_PRO_DRSID "Data Reduction System identifier"
87 
88 #define PORT_ID(chip) (((chip) == UVES_CHIP_REDL) ? 4 : 1)
89 
90 char * uves_get_rootname(const char * filename);
91 void uves_get_paf_name(const char* in, int paf_no, char** paf);
92 
93 int uves_blank2dot(const char * in, char* ou);
94 
95 int uves_save_paf(const char* filename,
96  int paf_no,
97  const char* rec_id,
98  const cpl_table* qclog,
99  uves_propertylist* plist,
100  const uves_propertylist* rhead,
101  const char* pro_catg);
102 
103 cpl_table *
104 uves_qclog_init(const uves_propertylist *raw_header,
105  enum uves_chip chip);
106 int
107 uves_qclog_add_int(cpl_table* table,
108  const char* name,
109  const int value,
110  const char* help,
111  const char* format);
112 
113 int
114 uves_qclog_add_bool(cpl_table* table,
115  const char* name,
116  const char value,
117  const char* help,
118  const char* format);
119 
120 
121 int
122 uves_qclog_add_float(cpl_table* table,
123  const char* name,
124  const float value,
125  const char* help,
126  const char* format);
127 
128 
129 int
130 uves_qclog_add_double(cpl_table* table,
131  const char* name,
132  const double value,
133  const char* help,
134  const char* format);
135 
136 
137 int
138 uves_qclog_add_string(cpl_table* table,
139  const char* name,
140  const char* value,
141  const char* help,
142  const char* format);
143 
144 
145 int uves_qclog_delete(cpl_table** table);
146 
147 int uves_pfits_put_qc(uves_propertylist * plist, const cpl_table * qclog);
148 
149 void uves_qclog_add_sci(cpl_table *qclog,
150  const uves_propertylist *raw_header,
151  const cpl_image *raw_image,
152  double slit,
153  const cpl_table *info_tbl);
154 
155 void
157  enum uves_chip chip,
158  cpl_table *qclog);
159 
160 const char *
161 uves_qclog_get_qc_name(const char *name,
162  bool flames, int trace_number);
163 
164 int
166  enum uves_chip chip,
167  cpl_table* qclog);
168 
169 int
171  enum uves_chip chip,
172  cpl_table* qclog);
173 
174 
175 #endif