00001 #ifndef SINFO_DETLIN_H 00002 #define SINFO_DETLIN_H 00003 /* 00004 * This file is part of the ESO SINFONI Pipeline 00005 * Copyright (C) 2004,2005 European Southern Observatory 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00020 */ 00021 00022 /******************************************************************************* 00023 * E.S.O. - VLT project 00024 * 00025 * "@(#) $Id: sinfo_detlin.h,v 1.5 2007/06/06 07:10:45 amodigli Exp $" 00026 * 00027 * who when what 00028 * -------- -------- ---------------------------------------------- 00029 * amodigli 04/01/06 created 00030 */ 00031 00032 /************************************************************************ 00033 * sinfo_detlin.h 00034 * detector linearity routines 00035 * to search for static bad pixels 00036 *---------------------------------------------------------------------- 00037 */ 00038 00039 /* 00040 * header files 00041 */ 00042 #include "sinfo_image_ops.h" 00043 00044 /*---------------------------------------------------------------------------- 00045 * Function ANSI C prototypes 00046 *--------------------------------------------------------------------------*/ 00066 cpl_imagelist * 00067 sinfo_new_fit_intensity_course(cpl_imagelist * flatStack, 00068 int order, 00069 float loReject, 00070 float hiReject ) ; 00071 00072 00073 00093 cpl_image * 00094 sinfo_new_search_bad_pixels(cpl_imagelist * coeffs, 00095 double threshSigmaFactor, 00096 double nonlinearThresh, 00097 float loReject, 00098 float hiReject ) ; 00099 00117 cpl_image * 00118 sinfo_new_search_bad_pixels_via_noise( cpl_imagelist * darks, 00119 float threshSigmaFactor, 00120 float loReject, 00121 float hiReject ) ; 00122 00123 00124 /* 00125 @name sinfo_new_count_bad_pixels() 00126 @memo this routine counts the number of bad pixels 00127 @param bad bad pixel mask 00128 @return number of bad pixels. 00129 */ 00130 00131 int 00132 sinfo_new_count_bad_pixels ( cpl_image * bad ) ; 00133 00134 00135 /* 00136 @name sinfo_new_abs_dist_image() 00137 @param image, a threshold parameter 00138 @result resulting image 00139 @doc filter, calculates the absolute distances of the nearest neighbors 00140 for an image by using the 8 closest pixels of every pixel. 00141 The values in the output image are determined according 00142 to the values of the input parameter. 00143 If fmedian = 0: always replace by abs. distances 00144 if fmedian < 0: replace by abs. distances if |median_dist - dist| > 00145 -fmedian 00146 if fmedian > 0: replace by abs. distances (fmedian as a factor of 00147 the square root of the distance itself) 00148 if |median_dist - dist| >= fmedian * sqrt ( dist ) 00149 This can be used to consider photon noise. 00150 This considers a dependence of the differences on the 00151 pixel values themselves. 00152 @note it is assumed that most of the 8 nearest neighbor pixels 00153 are not bad pixels! blank pixels are not replaced! 00154 */ 00155 00156 00157 cpl_image * 00158 sinfo_new_abs_dist_image(cpl_image * im, float fmedian ) ; 00159 00160 00183 cpl_image * 00184 sinfo_new_mean_image_in_spec(cpl_image * im, float fmedian ) ; 00185 00208 cpl_image * 00209 sinfo_new_local_median_image(cpl_image * im, 00210 float fmedian, 00211 float loReject, 00212 float hiReject, 00213 int half_box_size ) ; 00214 00215 00216 #endif