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: 2007/06/06 08:17:33 $ 00023 * $Revision: 1.41 $ 00024 * $Name: uves-4_2_2 $ 00025 * $Log: uves_utils_cpl.h,v $ 00026 * Revision 1.41 2007/06/06 08:17:33 amodigli 00027 * replace tab with 4 spaces 00028 * 00029 * Revision 1.40 2007/04/24 12:50:29 jmlarsen 00030 * Replaced cpl_propertylist -> uves_propertylist which is much faster 00031 * 00032 * Revision 1.39 2007/02/27 14:08:46 jmlarsen 00033 * Extended interface of uves_find_property 00034 * 00035 * Revision 1.38 2007/01/29 12:14:51 jmlarsen 00036 * Added uves_find_property() 00037 * 00038 * Revision 1.37 2007/01/15 08:48:26 jmlarsen 00039 * Exported get_kth function 00040 * 00041 * Revision 1.36 2006/11/06 15:19:42 jmlarsen 00042 * Removed unused include directives 00043 * 00044 * Revision 1.35 2006/09/19 07:17:08 jmlarsen 00045 * Reformatted line 00046 * 00047 * Revision 1.34 2006/09/11 08:19:10 jmlarsen 00048 * Renamed identifier reserved by POSIX 00049 * 00050 * Revision 1.33 2006/09/08 14:06:03 jmlarsen 00051 * Added uves_tools_get_median() 00052 * 00053 * Revision 1.32 2006/08/17 13:56:53 jmlarsen 00054 * Reduced max line length 00055 * 00056 * Revision 1.31 2006/06/13 12:02:21 jmlarsen 00057 * Renamed y0 -> y_0 00058 * 00059 * Revision 1.30 2006/02/21 14:24:45 jmlarsen 00060 * Parameterized behaviour of median filter near image border 00061 * 00062 * Revision 1.29 2006/01/31 08:25:50 jmlarsen 00063 * Renamed uves_fit_gaussian_2d -> uves_fit_gaussian_2d_image 00064 * 00065 * Revision 1.28 2006/01/25 16:13:20 jmlarsen 00066 * Changed interface of gauss.fitting routine 00067 * 00068 * Revision 1.27 2006/01/12 15:41:14 jmlarsen 00069 * Moved gauss. fitting to irplib 00070 * 00071 * Revision 1.26 2005/12/20 08:11:44 jmlarsen 00072 * Added CVS entry 00073 * 00074 */ 00075 #ifndef UVES_UTILS_CPL_H 00076 #define UVES_UTILS_CPL_H 00077 00078 /*----------------------------------------------------------------------------- 00079 Includes 00080 -----------------------------------------------------------------------------*/ 00081 00082 #include <uves_propertylist.h> 00083 #include <cpl.h> 00084 #include <limits.h> 00085 #include <float.h> 00086 #include <stdbool.h> 00087 00088 /*----------------------------------------------------------------------------- 00089 Defines 00090 -----------------------------------------------------------------------------*/ 00091 00092 /*----------------------------------------------------------------------------- 00093 Prototypes 00094 -----------------------------------------------------------------------------*/ 00095 const cpl_property * uves_find_property_const(const uves_propertylist *plist, 00096 const char *name, 00097 int number); 00098 cpl_property * uves_find_property(uves_propertylist *plist, 00099 const char *name, 00100 int number); 00101 00102 cpl_error_code uves_filter_image_median(cpl_image **image, int xwindow, 00103 int ywindow, bool extrapolate_border); 00104 cpl_error_code uves_filter_image_average(cpl_image *image, int radius_x, 00105 int radius_y); 00106 cpl_error_code uves_fit_gaussian_2d_image(const cpl_image *image, 00107 const cpl_image *noise, 00108 int x1, int y_1, 00109 int x2, int y2, 00110 double *x0, double *y_0, 00111 double *sigmax, double *sigmay, 00112 double *amplitude, 00113 double *dx0, double *dy0); 00114 00115 inline double uves_tools_get_median(double *a, int n); 00116 inline double uves_utils_get_kth_double(double * a, 00117 int n, 00118 int k); 00119 00120 00121 #endif 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133
1.5.1