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 02110-1301 USA * 00018 */ 00019 00020 /* 00021 * $Author: amodigli $ 00022 * $Date: 2008/03/28 08:53:56 $ 00023 * $Revision: 1.44 $ 00024 * $Name: uves-3_9_0 $ 00025 * $Log: uves_mflat_impl.c,v $ 00026 * Revision 1.44 2008/03/28 08:53:56 amodigli 00027 * IRPLIB_CONCAT2X-->UVES_CONCAT2X 00028 * 00029 * Revision 1.43 2007/10/17 07:19:29 amodigli 00030 * fixed compilation bug due to a typo 00031 * 00032 * Revision 1.42 2007/10/05 16:01:45 amodigli 00033 * using proces_chip parameter to process or not a given RED chip 00034 * 00035 * Revision 1.41 2007/06/11 13:28:26 jmlarsen 00036 * Changed recipe contact address to cpl at eso.org 00037 * 00038 * Revision 1.40 2007/06/08 13:06:16 jmlarsen 00039 * Send bug reports to Andrea 00040 * 00041 * Revision 1.39 2007/06/06 08:17:33 amodigli 00042 * replace tab with 4 spaces 00043 * 00044 * Revision 1.38 2007/02/09 13:38:54 jmlarsen 00045 * Enable calling from uves_mkmaster_sflat 00046 * 00047 * Revision 1.37 2006/12/08 07:41:43 jmlarsen 00048 * Minor doc. change 00049 * 00050 * Revision 1.36 2006/11/15 15:02:14 jmlarsen 00051 * Implemented const safe workarounds for CPL functions 00052 * 00053 * Revision 1.34 2006/11/15 14:04:08 jmlarsen 00054 * Removed non-const version of parameterlist_get_first/last/next which is already 00055 * in CPL, added const-safe wrapper, unwrapper and deallocator functions 00056 * 00057 * Revision 1.33 2006/11/15 08:57:32 amodigli 00058 * clearer message on slit FF encoder positions 00059 * 00060 * Revision 1.32 2006/11/13 12:45:32 jmlarsen 00061 * Count SFLAT sets from 1 rather than 0 00062 * 00063 * Revision 1.31 2006/11/06 15:19:41 jmlarsen 00064 * Removed unused include directives 00065 * 00066 * Revision 1.30 2006/11/03 14:57:44 jmlarsen 00067 * Changed message 00068 * 00069 * Revision 1.29 2006/10/17 12:33:02 jmlarsen 00070 * Added semicolon at UVES_RECIPE_DEFINE invocation 00071 * 00072 * Revision 1.28 2006/10/09 13:01:13 jmlarsen 00073 * Use macro to define recipe interface functions 00074 * 00075 * Revision 1.27 2006/09/27 13:20:51 jmlarsen 00076 * Factored out flat reduction 00077 * 00078 * Revision 1.26 2006/09/19 14:31:20 jmlarsen 00079 * uves_insert_frame(): use bitmap to specify which image statistics keywords must be computed 00080 * 00081 * Revision 1.25 2006/09/19 06:55:58 jmlarsen 00082 * Changed interface of uves_frameset to optionally write image statistics kewwords 00083 * 00084 * Revision 1.24 2006/09/14 08:46:51 jmlarsen 00085 * Added support for TFLAT, SCREEN_FLAT frames 00086 * 00087 * Revision 1.23 2006/08/24 11:36:37 jmlarsen 00088 * Write recipe start/stop time to header 00089 * 00090 * Revision 1.22 2006/08/17 13:56:53 jmlarsen 00091 * Reduced max line length 00092 * 00093 * Revision 1.21 2006/08/11 14:56:05 amodigli 00094 * removed Doxygen warnings 00095 * 00096 * Revision 1.20 2006/07/14 12:19:28 jmlarsen 00097 * Support multiple QC tests per product 00098 * 00099 * Revision 1.19 2006/07/03 13:09:24 amodigli 00100 * adjusted description display layout 00101 * 00102 * Revision 1.18 2006/07/03 13:02:18 jmlarsen 00103 * Threshold to zero after bias subtraction 00104 * 00105 * Revision 1.17 2006/06/16 08:25:45 jmlarsen 00106 * Manually propagate ESO.DET. keywords from 1st/2nd input header 00107 * 00108 * Revision 1.16 2006/06/13 11:57:02 jmlarsen 00109 * Check that calibration frames are from the same chip ID 00110 * 00111 * Revision 1.15 2006/06/01 14:21:27 amodigli 00112 * frm --> frm_tmp, dup --> frm_dup 00113 * 00114 * Revision 1.14 2006/06/01 12:02:56 jmlarsen 00115 * Return proper error_code in the function uves_mflat 00116 * 00117 * Revision 1.13 2006/05/22 10:01:04 amodigli 00118 * fixed some bug in msflat generation 00119 * 00120 * Revision 1.12 2006/05/22 06:47:15 amodigli 00121 * fixed some bugs on msflat 00122 * 00123 * Revision 1.10 2006/05/19 13:07:52 amodigli 00124 * modified to support SFLATs 00125 * 00126 * Revision 1.9 2006/05/17 09:58:25 amodigli 00127 * fixed warning 00128 * 00129 * Revision 1.8 2006/05/17 09:56:36 amodigli 00130 * fixed syntax bug 00131 * 00132 * Revision 1.7 2006/05/17 09:54:55 amodigli 00133 * added supposr SFLATs 00134 * 00135 * Revision 1.6 2006/05/09 07:42:18 amodigli 00136 * added QC-LOG 00137 * 00138 * Revision 1.5 2006/04/06 12:57:43 jmlarsen 00139 * Added support for IFLAT, DFLAT -> MASTER_IFLAT, MASTER_DFLAT frames 00140 * 00141 * Revision 1.4 2006/04/06 09:48:15 amodigli 00142 * changed uves_frameset_insert interface to have QC log 00143 * 00144 * Revision 1.3 2006/04/06 08:37:48 jmlarsen 00145 * Support reading MASTER_PDARK 00146 * 00147 * Revision 1.2 2006/03/24 14:15:18 jmlarsen 00148 * Save intermediate result to disk 00149 * 00150 * Revision 1.1 2006/02/03 07:46:30 jmlarsen 00151 * Moved recipe implementations to ./uves directory 00152 * 00153 * Revision 1.39 2006/01/19 08:47:24 jmlarsen 00154 * Inserted missing doxygen end tag 00155 * 00156 * Revision 1.38 2005/12/19 16:17:55 jmlarsen 00157 * Replaced bool -> int 00158 * 00159 */ 00160 00161 #ifdef HAVE_CONFIG_H 00162 # include <config.h> 00163 #endif 00164 00165 /*----------------------------------------------------------------------------*/ 00172 /*----------------------------------------------------------------------------*/ 00173 00174 /*----------------------------------------------------------------------------- 00175 Includes 00176 -----------------------------------------------------------------------------*/ 00177 00178 #include <uves_reduce_mflat.h> 00179 00180 #include <uves_parameters.h> 00181 #include <uves_recipe.h> 00182 #include <uves.h> 00183 #include <uves_error.h> 00184 00185 #include <cpl.h> 00186 00187 /*----------------------------------------------------------------------------- 00188 Functions prototypes 00189 -----------------------------------------------------------------------------*/ 00190 00191 static int uves_mflat_define_parameters(cpl_parameterlist *parameters); 00192 00193 /*----------------------------------------------------------------------------- 00194 Recipe standard code 00195 -----------------------------------------------------------------------------*/ 00196 #define cpl_plugin_get_info uves_mflat_get_info 00197 UVES_RECIPE_DEFINE( 00198 UVES_MFLAT_ID, UVES_MFLAT_DOM, uves_mflat_define_parameters, 00199 "Jonas M. Larsen", "cpl@eso.org", 00200 "Creates the master flat field frame", 00201 uves_mflat_desc); 00202 00204 /*----------------------------------------------------------------------------- 00205 Functions code 00206 ----------------------------------------------------------------------------*/ 00207 /*----------------------------------------------------------------------------*/ 00213 /*----------------------------------------------------------------------------*/ 00214 static int 00215 uves_mflat_define_parameters(cpl_parameterlist *parameters) 00216 { 00217 return uves_mflat_define_parameters_body(parameters, 00218 make_str(UVES_MFLAT_ID)); 00219 } 00220 00221 /*----------------------------------------------------------------------------*/ 00230 /*----------------------------------------------------------------------------*/ 00231 static void 00232 UVES_CONCAT2X(UVES_MFLAT_ID,exe)(cpl_frameset *frames, 00233 const cpl_parameterlist *parameters, 00234 const char *starttime) 00235 { 00236 uves_mflat_exe_body(frames, parameters, starttime, make_str(UVES_MFLAT_ID)); 00237 return; 00238 } 00239
1.5.1