00001 /* 00002 * This file is part of the ESO UVES Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program 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:02 $ 00023 * $Revision: 1.13 $ 00024 * $Name: uves-4_9_1 $ 00025 * $Log: uves_backsub.h,v $ 00026 * Revision 1.13 2010/09/24 09:32:02 amodigli 00027 * put back QFITS dependency to fix problem spot by NRI on FIBER mode (with MIDAS calibs) data 00028 * 00029 * Revision 1.11 2007/06/06 08:17:33 amodigli 00030 * replace tab with 4 spaces 00031 * 00032 * Revision 1.10 2007/05/22 11:29:39 jmlarsen 00033 * Removed MIDAS flag for good 00034 * 00035 * Revision 1.9 2007/04/24 12:50:29 jmlarsen 00036 * Replaced cpl_propertylist -> uves_propertylist which is much faster 00037 * 00038 * Revision 1.8 2007/03/28 11:38:23 jmlarsen 00039 * Killed MIDAS flag, removed dead code 00040 * 00041 * Revision 1.7 2006/08/17 13:56:52 jmlarsen 00042 * Reduced max line length 00043 * 00044 * Revision 1.6 2006/03/24 13:54:24 jmlarsen 00045 * Use different smoothing default values depending on type of frame (flat or science) 00046 * 00047 * Revision 1.5 2006/02/28 09:15:22 jmlarsen 00048 * Minor update 00049 * 00050 * Revision 1.4 2005/12/19 16:17:56 jmlarsen 00051 * Replaced bool -> int 00052 * 00053 */ 00054 #ifndef UVES_BACKSUB_H 00055 #define UVES_BACKSUB_H 00056 00057 /*----------------------------------------------------------------------------- 00058 Includes 00059 -----------------------------------------------------------------------------*/ 00060 00061 #include <uves_utils_polynomial.h> 00062 #include <uves_chip.h> 00063 00064 #include <cpl.h> 00065 #include <stdbool.h> 00066 00067 /*----------------------------------------------------------------------------- 00068 Typedefs 00069 -----------------------------------------------------------------------------*/ 00070 00071 typedef enum {BM_MEDIAN, 00072 BM_MINIMUM, 00073 BM_NO} background_measure_method; 00074 00075 /*----------------------------------------------------------------------------- 00076 Defines 00077 -----------------------------------------------------------------------------*/ 00078 00079 /*----------------------------------------------------------------------------- 00080 Prototypes 00081 -----------------------------------------------------------------------------*/ 00082 00083 cpl_parameterlist *uves_backsub_define_parameters(void); 00084 00085 background_measure_method 00086 uves_get_bm_method(const cpl_parameterlist *parameters, 00087 const char *context, const char *subcontext); 00088 00089 cpl_error_code uves_backsub_smooth(cpl_image *image, int RADX, int RADY, int ITER); 00090 cpl_error_code uves_backsub_poly(cpl_image *image, 00091 const cpl_table *orders, 00092 const polynomial *order_locations, 00093 background_measure_method BM_METHOD, 00094 int NPOINTS, 00095 int radius_y, 00096 int DEGX, 00097 int DEGY, 00098 double KAPPA); 00099 00100 cpl_error_code uves_backsub_spline(cpl_image *image, const uves_propertylist *raw_header, 00101 const cpl_table *ordertable, 00102 const polynomial *order_locations, 00103 const cpl_parameterlist *parlist, 00104 const char *context, 00105 enum uves_chip chip, 00106 bool flat_field, 00107 cpl_image **background); 00108 #endif