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:07 $ 00023 * $Revision: 1.44 $ 00024 * $Name: uves-4_9_1 $ 00025 * $Log: uves_scired_impl.c,v $ 00026 * Revision 1.44 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.42 2008/03/28 08:54:39 amodigli 00030 * IRPLIB_CONCAT2X-->UVES_CONCAT2X 00031 * 00032 * Revision 1.41 2007/06/11 13:28:26 jmlarsen 00033 * Changed recipe contact address to cpl at eso.org 00034 * 00035 * Revision 1.40 2007/06/08 13:06:16 jmlarsen 00036 * Send bug reports to Andrea 00037 * 00038 * Revision 1.39 2007/06/06 08:17:33 amodigli 00039 * replace tab with 4 spaces 00040 * 00041 * Revision 1.38 2007/02/09 13:44:15 jmlarsen 00042 * Moved code to reduce_scired to enable calling from uves_obs_spatred 00043 * 00044 * Revision 1.37 2006/11/06 15:19:42 jmlarsen 00045 * Removed unused include directives 00046 * 00047 * Revision 1.36 2006/10/17 12:33:02 jmlarsen 00048 * Added semicolon at UVES_RECIPE_DEFINE invocation 00049 * 00050 * Revision 1.35 2006/10/09 13:01:13 jmlarsen 00051 * Use macro to define recipe interface functions 00052 * 00053 * Revision 1.34 2006/09/27 15:08:45 jmlarsen 00054 * Fixed doc. bug 00055 * 00056 * Revision 1.33 2006/09/27 13:19:00 jmlarsen 00057 * Factored out scired body to enable calling it from other recipes 00058 * 00059 * Revision 1.32 2006/09/20 15:42:18 jmlarsen 00060 * Implemented MASTER_RESPONSE support 00061 * 00062 * Revision 1.31 2006/09/20 12:53:57 jmlarsen 00063 * Replaced stringcat functions with uves_sprintf() 00064 * 00065 * Revision 1.30 2006/09/20 07:26:43 jmlarsen 00066 * Shortened max line length 00067 * 00068 * Revision 1.29 2006/09/19 14:25:26 jmlarsen 00069 * Propagate FITS keywords from master flat, not science, to WCALIB_FLAT_OBJ 00070 * 00071 * Revision 1.28 2006/09/19 06:55:31 jmlarsen 00072 * Changed interface of uves_frameset to optionally write image statistics kewwords 00073 * 00074 * Revision 1.27 2006/09/06 14:47:05 jmlarsen 00075 * Added commented out code to skip one chip 00076 * 00077 * Revision 1.26 2006/08/24 11:36:37 jmlarsen 00078 * Write recipe start/stop time to header 00079 * 00080 * Revision 1.25 2006/08/22 15:13:15 amodigli 00081 * fix typo 00082 * 00083 * Revision 1.24 2006/08/22 14:18:59 amodigli 00084 * new format for SCI QC key 00085 * 00086 * Revision 1.23 2006/08/18 13:35:42 jmlarsen 00087 * Fixed/changed QC parameter formats 00088 * 00089 * Revision 1.22 2006/08/17 13:56:53 jmlarsen 00090 * Reduced max line length 00091 * 00092 * Revision 1.21 2006/08/17 09:19:19 jmlarsen 00093 * Removed CPL2 code 00094 * 00095 * Revision 1.20 2006/08/11 14:56:05 amodigli 00096 * removed Doxygen warnings 00097 * 00098 * Revision 1.19 2006/08/11 09:00:21 jmlarsen 00099 * Take into account the different meanings of line table 'Y' column 00100 * 00101 * Revision 1.18 2006/08/10 12:35:15 amodigli 00102 * added QC log 00103 * 00104 * Revision 1.17 2006/08/07 14:42:02 jmlarsen 00105 * Implemented on-the-fly correction of a line table when its order numbering 00106 * is inconsistent with the order table (DFS02694) 00107 * 00108 * Revision 1.16 2006/07/14 12:30:34 jmlarsen 00109 * Compute PRO CATG depending on DO CATG 00110 * 00111 * Revision 1.15 2006/07/03 12:46:34 amodigli 00112 * updated description 00113 * 00114 * Revision 1.14 2006/06/16 08:25:45 jmlarsen 00115 * Manually propagate ESO.DET. keywords from 1st/2nd input header 00116 * 00117 * Revision 1.13 2006/06/13 11:57:02 jmlarsen 00118 * Check that calibration frames are from the same chip ID 00119 * 00120 * Revision 1.12 2006/06/06 08:40:10 jmlarsen 00121 * Shortened max line length 00122 * 00123 * Revision 1.11 2006/05/16 12:13:07 amodigli 00124 * added QC log 00125 * 00126 * Revision 1.10 2006/05/12 15:11:15 jmlarsen 00127 * Implemented bad pixel propagation for flux calibration 00128 * 00129 * Revision 1.9 2006/04/24 09:25:34 jmlarsen 00130 * Use FITS convention for coordinates in QC calculation 00131 * 00132 * Revision 1.8 2006/04/20 10:47:39 amodigli 00133 * added qclog 00134 * 00135 * Revision 1.7 2006/04/06 09:48:15 amodigli 00136 * changed uves_frameset_insert interface to have QC log 00137 * 00138 * Revision 1.6 2006/04/06 08:51:04 jmlarsen 00139 * Added flux-calibrated science products 00140 * 00141 * Revision 1.5 2006/03/24 14:46:39 jmlarsen 00142 * Doc. bugfix 00143 * 00144 * Revision 1.4 2006/03/24 13:51:50 jmlarsen 00145 * Changed meaning of VARIANCE_SCIENCE to match MIDAS 00146 * 00147 * Revision 1.3 2006/03/06 09:22:43 jmlarsen 00148 * Added support for reading MIDAS line tables with MIDAS tags 00149 * 00150 * Revision 1.2 2006/03/03 13:54:11 jmlarsen 00151 * Changed syntax of check macro 00152 * 00153 * Revision 1.1 2006/02/03 07:51:04 jmlarsen 00154 * Moved recipe implementations to ./uves directory 00155 * 00156 * Revision 1.48 2006/01/19 08:47:24 jmlarsen 00157 * Inserted missing doxygen end tag 00158 * 00159 * Revision 1.47 2005/12/20 16:10:32 jmlarsen 00160 * Added some documentation 00161 * 00162 * Revision 1.46 2005/12/20 10:33:20 jmlarsen 00163 * Added some doxygen doc. 00164 * 00165 * Revision 1.45 2005/12/19 16:17:55 jmlarsen 00166 * Replaced bool -> int 00167 * 00168 */ 00169 #ifdef HAVE_CONFIG_H 00170 # include <config.h> 00171 #endif 00172 00173 /*----------------------------------------------------------------------------*/ 00180 /*----------------------------------------------------------------------------*/ 00181 00182 /*----------------------------------------------------------------------------- 00183 Includes 00184 -----------------------------------------------------------------------------*/ 00185 00186 #include <uves_reduce_scired.h> 00187 #include <uves_parameters.h> 00188 #include <uves_recipe.h> 00189 #include <uves.h> 00190 #include <uves_error.h> 00191 #include <uves_msg.h> 00192 00193 #include <cpl.h> 00194 00195 /*----------------------------------------------------------------------------- 00196 Functions prototypes 00197 -----------------------------------------------------------------------------*/ 00198 static int 00199 uves_scired_define_parameters(cpl_parameterlist *parameters); 00200 00201 /*----------------------------------------------------------------------------- 00202 Recipe standard code 00203 -----------------------------------------------------------------------------*/ 00204 #define cpl_plugin_get_info uves_scired_get_info 00205 UVES_RECIPE_DEFINE( 00206 UVES_SCIRED_ID, UVES_SCIRED_DOM, uves_scired_define_parameters, 00207 "Jonas M. Larsen", "cpl@eso.org", 00208 uves_scired_desc_short, 00209 uves_scired_desc); 00210 00212 /*----------------------------------------------------------------------------- 00213 Functions code 00214 -----------------------------------------------------------------------------*/ 00215 00216 /*----------------------------------------------------------------------------*/ 00222 /*----------------------------------------------------------------------------*/ 00223 static int 00224 uves_scired_define_parameters(cpl_parameterlist *parameters) 00225 { 00226 return uves_scired_define_parameters_body(parameters, make_str(UVES_SCIRED_ID)); 00227 } 00228 00229 /*----------------------------------------------------------------------------*/ 00236 /*----------------------------------------------------------------------------*/ 00237 static void 00238 UVES_CONCAT2X(UVES_SCIRED_ID,exe)(cpl_frameset *frames, 00239 const cpl_parameterlist *parameters, 00240 const char *starttime) 00241 { 00242 /* Do science reduction while pretending to be 'make_str(UVES_SCIRED_ID)' */ 00243 uves_reduce_scired(frames, parameters, make_str(UVES_SCIRED_ID), starttime); 00244 00245 return; 00246 } 00247 00248