UVES Pipeline Reference Manual  5.4.0
uves_orderpos_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:05 $
23  * $Revision: 1.44 $
24  * $Name: not supported by cvs2svn $
25  * $Log: not supported by cvs2svn $
26  * Revision 1.42 2008/03/28 08:54:16 amodigli
27  * IRPLIB_CONCAT2X-->UVES_CONCAT2X
28  *
29  * Revision 1.41 2007/06/11 13:28:26 jmlarsen
30  * Changed recipe contact address to cpl at eso.org
31  *
32  * Revision 1.40 2007/06/08 13:06:16 jmlarsen
33  * Send bug reports to Andrea
34  *
35  * Revision 1.39 2007/06/06 08:17:33 amodigli
36  * replace tab with 4 spaces
37  *
38  * Revision 1.38 2007/02/09 13:39:13 jmlarsen
39  * Use defines for recipe id
40  *
41  * Revision 1.37 2006/11/06 15:19:41 jmlarsen
42  * Removed unused include directives
43  *
44  * Revision 1.36 2006/10/25 07:21:52 jmlarsen
45  * Documentation bug fix
46  *
47  * Revision 1.35 2006/10/24 14:02:38 jmlarsen
48  * Factored out common UVES/FLAMES code
49  *
50  * Revision 1.34 2006/10/17 12:33:02 jmlarsen
51  * Added semicolon at UVES_RECIPE_DEFINE invocation
52  *
53  * Revision 1.33 2006/10/09 13:01:13 jmlarsen
54  * Use macro to define recipe interface functions
55  *
56  * Revision 1.32 2006/09/20 12:53:57 jmlarsen
57  * Replaced stringcat functions with uves_sprintf()
58  *
59  * Revision 1.31 2006/09/19 14:31:10 jmlarsen
60  * uves_insert_frame(): use bitmap to specify which image statistics keywords must be computed
61  *
62  * Revision 1.30 2006/09/19 06:55:11 jmlarsen
63  * Changed interface of uves_frameset to optionally write image statistics kewwords
64  *
65  * Revision 1.29 2006/08/24 11:36:37 jmlarsen
66  * Write recipe start/stop time to header
67  *
68  * Revision 1.28 2006/08/18 13:35:42 jmlarsen
69  * Fixed/changed QC parameter formats
70  *
71  * Revision 1.27 2006/08/11 14:56:05 amodigli
72  * removed Doxygen warnings
73  *
74  * Revision 1.26 2006/08/07 11:35:35 jmlarsen
75  * Disabled parameter environment variable mode
76  *
77  * Revision 1.25 2006/07/14 12:19:28 jmlarsen
78  * Support multiple QC tests per product
79  *
80  * Revision 1.24 2006/07/03 14:20:39 jmlarsen
81  * Exclude bad pixels from order tracing
82  *
83  * Revision 1.23 2006/07/03 13:09:24 amodigli
84  * adjusted description display layout
85  *
86  * Revision 1.22 2006/07/03 12:46:34 amodigli
87  * updated description
88  *
89  * Revision 1.21 2006/06/22 12:13:10 amodigli
90  * removed ESO prefix
91  *
92  * Revision 1.20 2006/06/22 06:44:06 amodigli
93  * added some QC param
94  *
95  * Revision 1.19 2006/06/16 08:25:34 jmlarsen
96  * Do the order tracing on non-median filtered frame
97  *
98  * Revision 1.18 2006/06/13 11:57:02 jmlarsen
99  * Check that calibration frames are from the same chip ID
100  *
101  * Revision 1.17 2006/06/08 11:40:50 amodigli
102  * added check to have output order table as input guess, if provided
103  *
104  * Revision 1.16 2006/06/08 08:42:53 jmlarsen
105  * Added support for computing Hough transform on image subwindow
106  *
107  * Revision 1.15 2006/06/07 13:06:28 jmlarsen
108  * Changed doxygen tag addtogroup -> defgroup
109  *
110  * Revision 1.14 2006/06/07 09:01:28 amodigli
111  * added some doc
112  *
113  * Revision 1.13 2006/06/06 08:40:10 jmlarsen
114  * Shortened max line length
115  *
116  * Revision 1.12 2006/05/09 15:42:00 amodigli
117  * added QC log
118  *
119  * Revision 1.11 2006/05/08 15:41:32 amodigli
120  * added order table chopping (commented out)
121  *
122  * Revision 1.10 2006/05/05 13:55:17 jmlarsen
123  * Minor doc update
124  *
125  * Revision 1.9 2006/04/20 10:47:39 amodigli
126  * added qclog
127  *
128  * Revision 1.8 2006/04/06 09:48:15 amodigli
129  * changed uves_frameset_insert interface to have QC log
130  *
131  * Revision 1.7 2006/04/06 08:46:40 jmlarsen
132  * Changed default polynomial degrees to auto
133  *
134  * Revision 1.6 2006/03/24 14:04:14 jmlarsen
135  * Changed background subtraction sample density default parameter value
136  *
137  * Revision 1.5 2006/03/09 10:53:41 jmlarsen
138  * Changed default bivariate degrees to MIDAS values
139  *
140  * Revision 1.4 2006/03/03 13:54:11 jmlarsen
141  * Changed syntax of check macro
142  *
143  * Revision 1.3 2006/02/28 09:15:22 jmlarsen
144  * Minor update
145  *
146  * Revision 1.2 2006/02/21 14:26:54 jmlarsen
147  * Minor changes
148  *
149  * Revision 1.1 2006/02/03 07:46:30 jmlarsen
150  * Moved recipe implementations to ./uves directory
151  *
152  * Revision 1.63 2006/01/19 08:47:24 jmlarsen
153  * Inserted missing doxygen end tag
154  *
155  * Revision 1.62 2006/01/05 14:31:31 jmlarsen
156  * Checking for guess DRS table before guess order table
157  *
158  * Revision 1.61 2005/12/20 16:10:32 jmlarsen
159  * Added some documentation
160  *
161  * Revision 1.60 2005/12/19 16:17:55 jmlarsen
162  * Replaced bool -> int
163  *
164  */
165 #ifdef HAVE_CONFIG_H
166 # include <config.h>
167 #endif
168 
169 /*----------------------------------------------------------------------------*/
176 /*----------------------------------------------------------------------------*/
177 
178 /*-----------------------------------------------------------------------------
179  Includes
180  -----------------------------------------------------------------------------*/
181 
182 #include <uves_orderpos_body.h>
183 #include <uves_recipe.h>
184 #include <uves.h>
185 #include <uves_error.h>
186 
187 #include <cpl.h>
188 
189 /*-----------------------------------------------------------------------------
190  Forward declarations
191  -----------------------------------------------------------------------------*/
192 static int uves_orderpos_define_parameters(cpl_parameterlist *parameters);
193 
194 /*-----------------------------------------------------------------------------
195  Recipe standard code
196  -----------------------------------------------------------------------------*/
197 #define cpl_plugin_get_info uves_orderpos_get_info
198 UVES_RECIPE_DEFINE(
199  UVES_ORDERPOS_ID, UVES_ORDERPOS_DOM, uves_orderpos_define_parameters,
200  "Jonas M. Larsen", "cpl@eso.org",
201  uves_orderpos_desc_short,
202  uves_orderpos_desc);
203 
204 /*-----------------------------------------------------------------------------
205  Functions code
206  -----------------------------------------------------------------------------*/
208 /*----------------------------------------------------------------------------*/
214 /*----------------------------------------------------------------------------*/
215 static int
216 uves_orderpos_define_parameters(cpl_parameterlist *parameters)
217 {
218  return uves_orderpos_define_parameters_body(parameters, make_str(UVES_ORDERPOS_ID));
219 }
220 
221 /*----------------------------------------------------------------------------*/
229 /*----------------------------------------------------------------------------*/
230 static void
231 UVES_CONCAT2X(UVES_ORDERPOS_ID,exe)(cpl_frameset *frames,
232  const cpl_parameterlist *parameters,
233  const char *starttime)
234 {
235  bool flames = false;
236  uves_orderpos_exe_body(frames, flames, make_str(UVES_ORDERPOS_ID),
237  parameters, starttime);
238 }