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