UVES Pipeline Reference Manual  5.4.6
uves_physmod_impl.c
1 /* *
2  * This file is part of the ESO UVES Pipeline *
3  * Copyright (C) 2004,2005 European Southern Observatory *
4  * *
5  * This library 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.38 $
24  * $Name: not supported by cvs2svn $
25  * $Log: not supported by cvs2svn $
26  * Revision 1.36 2008/03/28 08:54:22 amodigli
27  * IRPLIB_CONCAT2X-->UVES_CONCAT2X
28  *
29  * Revision 1.35 2007/06/11 13:28:26 jmlarsen
30  * Changed recipe contact address to cpl at eso.org
31  *
32  * Revision 1.34 2007/06/06 08:17:33 amodigli
33  * replace tab with 4 spaces
34  *
35  * Revision 1.33 2007/02/09 13:39:51 jmlarsen
36  * Use defines for recipe id
37  *
38  * Revision 1.32 2006/11/06 15:19:41 jmlarsen
39  * Removed unused include directives
40  *
41  * Revision 1.31 2006/10/24 14:12:16 jmlarsen
42  * Parametrized recipe id to support FLAMES recipe
43  *
44  * Revision 1.30 2006/10/19 13:53:25 jmlarsen
45  * Changed guess line table tag to LINE_GUESS_TAB
46  *
47  * Revision 1.29 2006/10/17 12:33:02 jmlarsen
48  * Added semicolon at UVES_RECIPE_DEFINE invocation
49  *
50  * Revision 1.28 2006/10/11 12:22:36 amodigli
51  * now the stability check consist only i the msrawxy and the table comparison, as in MIDAS
52  *
53  * Revision 1.27 2006/10/09 13:01:13 jmlarsen
54  * Use macro to define recipe interface functions
55  *
56  * Revision 1.26 2006/09/19 14:31:38 jmlarsen
57  * uves_insert_frame(): use bitmap to specify which image statistics keywords must be computed
58  *
59  * Revision 1.25 2006/09/19 06:55:39 jmlarsen
60  * Changed interface of uves_frameset to optionally write image statistics kewwords
61  *
62  * Revision 1.24 2006/08/24 11:36:37 jmlarsen
63  * Write recipe start/stop time to header
64  *
65  * Revision 1.23 2006/08/18 13:35:42 jmlarsen
66  * Fixed/changed QC parameter formats
67  *
68  * Revision 1.22 2006/08/17 13:56:53 jmlarsen
69  * Reduced max line length
70  *
71  * Revision 1.21 2006/08/11 14:56:05 amodigli
72  * removed Doxygen warnings
73  *
74  * Revision 1.20 2006/08/07 11:35:35 jmlarsen
75  * Disabled parameter environment variable mode
76  *
77  * Revision 1.19 2006/08/01 14:42:34 amodigli
78  * fixed bugs getting raw header from master formatcheck
79  *
80  * Revision 1.18 2006/07/31 06:29:26 amodigli
81  * added QC on stability test
82  *
83  * Revision 1.17 2006/07/28 14:51:26 amodigli
84  * fixed some bugs on improper table selection
85  *
86  * Revision 1.16 2006/07/14 12:19:28 jmlarsen
87  * Support multiple QC tests per product
88  *
89  * Revision 1.15 2006/07/03 12:46:34 amodigli
90  * updated description
91  *
92  * Revision 1.14 2006/06/28 13:28:29 amodigli
93  * improved output
94  *
95  * Revision 1.13 2006/06/20 09:06:39 amodigli
96  * correct input tag info in man page
97  *
98  * Revision 1.12 2006/06/16 08:25:45 jmlarsen
99  * Manually propagate ESO.DET. keywords from 1st/2nd input header
100  *
101  * Revision 1.11 2006/06/13 11:57:02 jmlarsen
102  * Check that calibration frames are from the same chip ID
103  *
104  * Revision 1.10 2006/06/07 13:06:28 jmlarsen
105  * Changed doxygen tag addtogroup -> defgroup
106  *
107  * Revision 1.9 2006/06/07 09:01:28 amodigli
108  * added some doc
109  *
110  * Revision 1.8 2006/05/08 15:42:16 amodigli
111  * allow to specify order column label
112  *
113  * Revision 1.7 2006/04/20 10:47:39 amodigli
114  * added qclog
115  *
116  * Revision 1.6 2006/04/07 07:11:12 jmlarsen
117  * Minor doc. fix
118  *
119  * Revision 1.5 2006/04/06 09:48:15 amodigli
120  * changed uves_frameset_insert interface to have QC log
121  *
122  * Revision 1.4 2006/04/06 08:42:19 jmlarsen
123  * Changed indentation
124  *
125  * Revision 1.3 2006/03/03 13:54:11 jmlarsen
126  * Changed syntax of check macro
127  *
128  * Revision 1.2 2006/02/28 09:15:22 jmlarsen
129  * Minor update
130  *
131  * Revision 1.1 2006/02/03 07:46:30 jmlarsen
132  * Moved recipe implementations to ./uves directory
133  *
134  * Revision 1.66 2006/01/25 10:09:18 jmlarsen
135  * Added doxygen end marker
136  *
137  * Revision 1.65 2006/01/20 10:36:25 amodigli
138  *
139  * Fixed warings from doxigen
140  *
141  * Revision 1.64 2006/01/19 10:03:06 amodigli
142  * Fixed leaks
143  *
144  * Revision 1.62 2006/01/16 13:52:58 jmlarsen
145  * Removed memory leak
146  *
147  * Revision 1.61 2006/01/16 08:01:57 amodigli
148  *
149  * Added stability check
150  *
151  * Revision 1.60 2006/01/13 13:43:15 jmlarsen
152  * Removed memory leak
153  *
154  * Revision 1.59 2006/01/13 09:54:42 amodigli
155  * Fixed some bugs: improved agreement with MIDAS version
156  *
157  * Revision 1.58 2006/01/09 15:23:06 jmlarsen
158  * Removed some warnings
159  *
160  * Revision 1.57 2006/01/09 14:05:42 amodigli
161  * Fixed doxigen warnings
162  *
163  * Revision 1.56 2006/01/03 16:57:13 amodigli
164  * Fixed bug
165  *
166  * Revision 1.55 2006/01/03 14:47:53 amodigli
167  *
168  * Added uves_physmod_chop_otab.h .c to match MIDAS
169  *
170  * Revision 1.54 2005/12/19 16:17:55 jmlarsen
171  * Replaced bool -> int
172  *
173  */
174 #ifdef HAVE_CONFIG_H
175 # include <config.h>
176 #endif
177 
178 /*----------------------------------------------------------------------------*/
186 /*----------------------------------------------------------------------------*/
187 
188 /*-----------------------------------------------------------------------------
189  Includes
190  -----------------------------------------------------------------------------*/
191 
192 #include <uves.h>
193 #include <uves_physmod_body.h>
194 #include <uves_recipe.h>
195 #include <uves_error.h>
196 
197 #include <cpl.h>
198 
199 /*-----------------------------------------------------------------------------
200  Defines
201  -----------------------------------------------------------------------------*/
202 /*-----------------------------------------------------------------------------
203  Functions prototypes
204  ----------------------------------------------------------------------------*/
205 static int uves_physmod_define_parameters(cpl_parameterlist *parameters);
206 
207 /*-----------------------------------------------------------------------------
208  Recipe standard code
209  -----------------------------------------------------------------------------*/
210 #define cpl_plugin_get_info uves_physmod_get_info
211 UVES_RECIPE_DEFINE(
212  UVES_PHYSMOD_ID, UVES_PHYSMOD_DOM, uves_physmod_define_parameters,
213  "Andrea Modigliani", "cpl@eso.org",
214  uves_physmod_desc_short,
215  uves_physmod_desc);
216 
218 /*-----------------------------------------------------------------------------
219  Functions code
220  -----------------------------------------------------------------------------*/
221 /*----------------------------------------------------------------------------*/
227 /*----------------------------------------------------------------------------*/
228 static int
229 uves_physmod_define_parameters(cpl_parameterlist *parameters)
230 {
231  return uves_physmod_define_parameters_body(parameters, make_str(UVES_PHYSMOD_ID));
232 }
233 
234 /*----------------------------------------------------------------------------*/
242 /*----------------------------------------------------------------------------*/
243 static void
244 UVES_CONCAT2X(UVES_PHYSMOD_ID,exe)(cpl_frameset *frames,
245  const cpl_parameterlist *parameters,
246  const char *starttime)
247 {
248  bool flames = false;
249  uves_physmod_exe_body(frames, flames, make_str(UVES_PHYSMOD_ID),
250  parameters, starttime);
251 }