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: 2011/05/09 08:43:08 $ 00023 * $Revision: 1.4 $ 00024 * $Name: uves-5_0_0 $ 00025 */ 00026 00027 #ifdef HAVE_CONFIG_H 00028 # include <config.h> 00029 #endif 00030 00031 /*----------------------------------------------------------------------------*/ 00038 /*----------------------------------------------------------------------------*/ 00039 00040 /*----------------------------------------------------------------------------- 00041 Includes 00042 -----------------------------------------------------------------------------*/ 00043 00044 #include <uves_reduce_mflat_combine.h> 00045 00046 #include <uves_parameters.h> 00047 #include <uves_recipe.h> 00048 #include <uves.h> 00049 #include <uves_error.h> 00050 00051 #include <cpl.h> 00052 00053 /*----------------------------------------------------------------------------- 00054 Functions prototypes 00055 -----------------------------------------------------------------------------*/ 00056 00057 static int uves_mflat_combine_define_parameters(cpl_parameterlist *parameters); 00058 00059 /*----------------------------------------------------------------------------- 00060 Recipe standard code 00061 -----------------------------------------------------------------------------*/ 00062 #define cpl_plugin_get_info uves_mflat_combine_get_info 00063 UVES_RECIPE_DEFINE( 00064 UVES_MFLAT_COMBINE_ID, UVES_MFLAT_COMBINE_DOM, uves_mflat_combine_define_parameters, 00065 "Andrea Modigliani", "cpl@eso.org", 00066 "Combines the master flat field and the master dflat frames", 00067 uves_mflat_combine_desc); 00068 00070 /*----------------------------------------------------------------------------- 00071 Functions code 00072 ----------------------------------------------------------------------------*/ 00073 /*----------------------------------------------------------------------------*/ 00079 /*----------------------------------------------------------------------------*/ 00080 static int 00081 uves_mflat_combine_define_parameters(cpl_parameterlist *parameters) 00082 { 00083 /* TODO define params */ 00084 if (uves_define_global_parameters(parameters) != CPL_ERROR_NONE) 00085 { 00086 return -1; 00087 } 00088 00089 00090 const char *context = "uves"; 00091 const char *name = ""; 00092 char *full_name = NULL; 00093 cpl_parameter *p; 00094 00095 { 00096 name = "order_threshold"; 00097 full_name = uves_sprintf("%s.%s", context, name); 00098 uves_parameter_new_range(p, full_name, 00099 CPL_TYPE_INT, 00100 "Order where master flats are collated ", 00101 context, 00102 7,5,9); 00103 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, name); 00104 cpl_parameterlist_append(parameters, p); 00105 cpl_free(full_name); 00106 } 00107 00108 return 0; 00109 } 00110 00111 /*----------------------------------------------------------------------------*/ 00120 /*----------------------------------------------------------------------------*/ 00121 static void 00122 UVES_CONCAT2X(UVES_MFLAT_COMBINE_ID,exe)(cpl_frameset *frames, 00123 const cpl_parameterlist *parameters, 00124 const char *starttime) 00125 { 00126 uves_mflat_combine_exe_body(frames, parameters, starttime, make_str(UVES_MFLAT_COMBINE_ID)); 00127 return; 00128 } 00129