00001 /* * 00002 * This file is part of the ESO UVES Pipeline * 00003 * Copyright (C) 2004,2005 European Southern Observatory * 00004 * * 00005 * This library 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:09 $ 00023 * $Revision: 1.56 $ 00024 * $Name: uves-4_9_1 $ 00025 * $Log: uves_wavecal_impl.c,v $ 00026 * Revision 1.56 2010/09/24 09:32:09 amodigli 00027 * put back QFITS dependency to fix problem spot by NRI on FIBER mode (with MIDAS calibs) data 00028 * 00029 * Revision 1.54 2008/03/28 08:54:57 amodigli 00030 * IRPLIB_CONCAT2X-->UVES_CONCAT2X 00031 * 00032 * Revision 1.53 2007/06/11 13:28:26 jmlarsen 00033 * Changed recipe contact address to cpl at eso.org 00034 * 00035 * Revision 1.52 2007/06/08 13:06:16 jmlarsen 00036 * Send bug reports to Andrea 00037 * 00038 * Revision 1.51 2007/06/06 08:17:33 amodigli 00039 * replace tab with 4 spaces 00040 * 00041 * Revision 1.50 2007/05/09 14:48:06 jmlarsen 00042 * Read slitlength from header 00043 * 00044 * Revision 1.49 2007/02/09 13:44:42 jmlarsen 00045 * Use defines for recipe id 00046 * 00047 * Revision 1.48 2006/12/07 08:30:19 jmlarsen 00048 * Support different slit for UVES, FLAMES 00049 * 00050 * Revision 1.47 2006/11/13 12:42:55 jmlarsen 00051 * Factored out common UVES/FLAMES wavecal code 00052 * 00053 * Revision 1.37 2006/11/06 15:19:41 jmlarsen 00054 * Removed unused include directives 00055 * 00056 * Revision 1.36 2006/10/25 07:21:52 jmlarsen 00057 * Documentation bug fix 00058 * 00059 * Revision 1.35 2006/10/24 14:02:38 jmlarsen 00060 * Factored out common UVES/FLAMES code 00061 * 00062 * Revision 1.34 2006/10/17 12:33:02 jmlarsen 00063 * Added semicolon at UVES_RECIPE_DEFINE invocation 00064 * 00065 * Revision 1.33 2006/10/09 13:01:13 jmlarsen 00066 * Use macro to define recipe interface functions 00067 * 00068 * Revision 1.32 2006/09/20 12:53:57 jmlarsen 00069 * Replaced stringcat functions with uves_sprintf() 00070 * 00071 * Revision 1.31 2006/09/19 14:31:10 jmlarsen 00072 * uves_insert_frame(): use bitmap to specify which image statistics keywords must be computed 00073 * 00074 * Revision 1.30 2006/09/19 06:55:11 jmlarsen 00075 * Changed interface of uves_frameset to optionally write image statistics kewwords 00076 * 00077 * Revision 1.29 2006/08/24 11:36:37 jmlarsen 00078 * Write recipe start/stop time to header 00079 * 00080 * Revision 1.28 2006/08/18 13:35:42 jmlarsen 00081 * Fixed/changed QC parameter formats 00082 * 00083 * Revision 1.27 2006/08/11 14:56:05 amodigli 00084 * removed Doxygen warnings 00085 * 00086 * Revision 1.26 2006/08/07 11:35:35 jmlarsen 00087 * Disabled parameter environment variable mode 00088 * 00089 * Revision 1.25 2006/07/14 12:19:28 jmlarsen 00090 * Support multiple QC tests per product 00091 * 00092 * Revision 1.24 2006/07/03 14:20:39 jmlarsen 00093 * Exclude bad pixels from order tracing 00094 * 00095 * Revision 1.23 2006/07/03 13:09:24 amodigli 00096 * adjusted description display layout 00097 * 00098 * Revision 1.22 2006/07/03 12:46:34 amodigli 00099 * updated description 00100 * 00101 * Revision 1.21 2006/06/22 12:13:10 amodigli 00102 * removed ESO prefix 00103 * 00104 * Revision 1.20 2006/06/22 06:44:06 amodigli 00105 * added some QC param 00106 * 00107 * Revision 1.19 2006/06/16 08:25:34 jmlarsen 00108 * Do the order tracing on non-median filtered frame 00109 * 00110 * Revision 1.18 2006/06/13 11:57:02 jmlarsen 00111 * Check that calibration frames are from the same chip ID 00112 * 00113 * Revision 1.17 2006/06/08 11:40:50 amodigli 00114 * added check to have output order table as input guess, if provided 00115 * 00116 * Revision 1.16 2006/06/08 08:42:53 jmlarsen 00117 * Added support for computing Hough transform on image subwindow 00118 * 00119 * Revision 1.15 2006/06/07 13:06:28 jmlarsen 00120 * Changed doxygen tag addtogroup -> defgroup 00121 * 00122 * Revision 1.14 2006/06/07 09:01:28 amodigli 00123 * added some doc 00124 * 00125 * Revision 1.13 2006/06/06 08:40:10 jmlarsen 00126 * Shortened max line length 00127 * 00128 * Revision 1.12 2006/05/09 15:42:00 amodigli 00129 * added QC log 00130 * 00131 * Revision 1.11 2006/05/08 15:41:32 amodigli 00132 * added order table chopping (commented out) 00133 * 00134 * Revision 1.10 2006/05/05 13:55:17 jmlarsen 00135 * Minor doc update 00136 * 00137 * Revision 1.9 2006/04/20 10:47:39 amodigli 00138 * added qclog 00139 * 00140 * Revision 1.8 2006/04/06 09:48:15 amodigli 00141 * changed uves_frameset_insert interface to have QC log 00142 * 00143 * Revision 1.7 2006/04/06 08:46:40 jmlarsen 00144 * Changed default polynomial degrees to auto 00145 * 00146 * Revision 1.6 2006/03/24 14:04:14 jmlarsen 00147 * Changed background subtraction sample density default parameter value 00148 * 00149 * Revision 1.5 2006/03/09 10:53:41 jmlarsen 00150 * Changed default bivariate degrees to MIDAS values 00151 * 00152 * Revision 1.4 2006/03/03 13:54:11 jmlarsen 00153 * Changed syntax of check macro 00154 * 00155 * Revision 1.3 2006/02/28 09:15:22 jmlarsen 00156 * Minor update 00157 * 00158 * Revision 1.2 2006/02/21 14:26:54 jmlarsen 00159 * Minor changes 00160 * 00161 * Revision 1.1 2006/02/03 07:46:30 jmlarsen 00162 * Moved recipe implementations to ./uves directory 00163 * 00164 * Revision 1.63 2006/01/19 08:47:24 jmlarsen 00165 * Inserted missing doxygen end tag 00166 * 00167 * Revision 1.62 2006/01/05 14:31:31 jmlarsen 00168 * Checking for guess DRS table before guess order table 00169 * 00170 * Revision 1.61 2005/12/20 16:10:32 jmlarsen 00171 * Added some documentation 00172 * 00173 * Revision 1.60 2005/12/19 16:17:55 jmlarsen 00174 * Replaced bool -> int 00175 * 00176 */ 00177 #ifdef HAVE_CONFIG_H 00178 # include <config.h> 00179 #endif 00180 00181 /*----------------------------------------------------------------------------*/ 00188 /*----------------------------------------------------------------------------*/ 00189 00190 /*----------------------------------------------------------------------------- 00191 Includes 00192 -----------------------------------------------------------------------------*/ 00193 00194 #include <uves_wavecal_body.h> 00195 #include <uves_recipe.h> 00196 #include <uves.h> 00197 #include <uves_error.h> 00198 00199 #include <cpl.h> 00200 00201 /*----------------------------------------------------------------------------- 00202 Forward declarations 00203 -----------------------------------------------------------------------------*/ 00204 static int uves_wavecal_define_parameters(cpl_parameterlist *parameters); 00205 00206 /*----------------------------------------------------------------------------- 00207 Recipe standard code 00208 -----------------------------------------------------------------------------*/ 00209 #define cpl_plugin_get_info uves_wavecal_get_info 00210 UVES_RECIPE_DEFINE( 00211 UVES_WAVECAL_ID, UVES_WAVECAL_DOM, uves_wavecal_define_parameters, 00212 "Jonas M. Larsen", "cpl@eso.org", 00213 uves_wavecal_desc_short, 00214 uves_wavecal_desc); 00215 00216 /*----------------------------------------------------------------------------- 00217 Functions code 00218 -----------------------------------------------------------------------------*/ 00220 /*----------------------------------------------------------------------------*/ 00226 /*----------------------------------------------------------------------------*/ 00227 static int 00228 uves_wavecal_define_parameters(cpl_parameterlist *parameters) 00229 { 00230 double slit_length_in_pixels = -1; /* Use header value */ 00231 return uves_wavecal_define_parameters_body(parameters, make_str(UVES_WAVECAL_ID), 00232 slit_length_in_pixels); 00233 } 00234 00235 /*----------------------------------------------------------------------------*/ 00243 /*----------------------------------------------------------------------------*/ 00244 static void 00245 UVES_CONCAT2X(UVES_WAVECAL_ID,exe)(cpl_frameset *frames, 00246 const cpl_parameterlist *parameters, 00247 const char *starttime) 00248 { 00249 bool flames = false; 00250 00251 uves_wavecal_exe_body(frames, flames, make_str(UVES_WAVECAL_ID), 00252 parameters, starttime); 00253 }