sinfoni_bp_dist_config.c

00001 /* $Id: sinfoni_bp_dist_config.c,v 1.9 2005/06/16 07:22:05 amodigli Exp $
00002  *
00003  * This file is part of the CPL (Common Pipeline Library)
00004  * Copyright (C) 2002 European Southern Observatory
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this library; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019  */
00020 /*
00021  * $Author: amodigli $
00022  * $Date: 2005/06/16 07:22:05 $
00023  * $Revision: 1.9 $
00024  * $Name:  $
00025  */
00026 
00027  /****************************************************************
00028   *           Bad pixel search  (normal method)                  *
00029   ****************************************************************/
00030 #include "sinfoni_bp_dist_config.h"
00031 
00050   /* Bad pixel parameters */
00051 
00052 void
00053  sinfoni_bp_dist_config_add(cpl_parameterlist *list)
00054 {
00055   cpl_parameter *p;
00056 
00057   if (!list) {
00058     return;
00059   }
00060 
00061 
00062 
00063 /* factor of noise within which the pixels are used to fit a straight line 
00064    to the column intensity */
00065   p = cpl_parameter_new_value("sinfoni.bp_dist.sigma_factor",
00066                   CPL_TYPE_DOUBLE,
00067                               "Threshold Sigma Factor: "
00068                               "to remove the column intensity tilt only "
00069                               "pixels which lie within a defined noise"
00070                               "limit are used to fit a straight line",
00071                               "sinfoni.bp_dist",
00072                               2.0);
00073 
00074   cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI, "bp_dist-s_factor");
00075   cpl_parameterlist_append(list, p);
00076 
00077   /* bad pixel search determination method */
00078  p = cpl_parameter_new_enum("sinfoni.bp_dist.method_index",
00079                   CPL_TYPE_INT,
00080                               "Bad pixel Method Index"
00081                               "1: median of nearest neighbors,"
00082                               "2: absolute distances check, "
00083                               "3: mean of nearest spectral neighbors",
00084                               "sinfoni.bp_dist",
00085                               1,
00086                               3,1,2,3);
00087 
00088   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-method_ind");
00089   cpl_parameterlist_append(list, p);
00090 
00091   /* factor of calculated standard deviation beyond which the deviation 
00092      of a pixel value from the median of the 8 nearest neighbors declares 
00093      a pixel as bad */
00094   p = cpl_parameter_new_value("sinfoni.bp_dist.factor",
00095                   CPL_TYPE_DOUBLE,
00096                               "Factor: "
00097            "if |pixel - median| > factor * standard deviation -> "
00098                               "then the pixel value is replaced by "
00099                               "the median of the 8 nearest neighbors",
00100                               "sinfoni.bp_dist",
00101                               999.0);
00102 
00103   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-fct");
00104   cpl_parameterlist_append(list, p);
00105 
00106  /* no of iterations to find bad pix clusters */
00107   /* number of iterations of median filter */
00108   p = cpl_parameter_new_value("sinfoni.bp_dist.iterations",
00109                   CPL_TYPE_INT,
00110                               "Iterations: number of iterations to of median"
00111                               " filtering to find bad pixel clusters",
00112                               "sinfoni.bp_dist",
00113                               8);
00114 
00115   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-it");
00116   cpl_parameterlist_append(list, p);
00117 
00118   /* float 
00119      threshold used in the clean mean percentage of rejection used to reject 
00120      low and high frame */
00121  /* percentage of extreme pixel value to reject when calculating the mean 
00122     and stdev */
00123   p = cpl_parameter_new_range("sinfoni.bp_dist.low_rejection",
00124                   CPL_TYPE_DOUBLE,
00125                               "low_rejection: "
00126                               "percentage of rejected low intensity "
00127                               "pixels before averaging",
00128                               "sinfoni.bp_dist",
00129                               0.1,0.0,1.0);
00130 
00131   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-lo_rej");
00132   cpl_parameterlist_append(list, p);
00133 
00134   /* float 
00135      threshold used in the clean mean percentage of rejection used to reject 
00136      low and high frame */
00137  /* percentage of extreme pixel value to reject when calculating the mean 
00138     and stdev */
00139   p = cpl_parameter_new_range("sinfoni.bp_dist.high_rejection",
00140                   CPL_TYPE_DOUBLE,
00141                               "high_rejection: "
00142                               "percentage of rejected high intensity "
00143                               "pixels before averaging",
00144                               "sinfoni.bp_dist",
00145                               0.1,0.0,1.0);
00146 
00147   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-hi_rej");
00148   cpl_parameterlist_append(list, p);
00149 
00150 
00151   /* position in the frame lower left in X */
00152   /* pixel coordinate of lower left edge of a rectangle zone from which 
00153      image statistics are computed */
00154   p = cpl_parameter_new_range("sinfoni.bp_dist.llx",
00155                   CPL_TYPE_INT,
00156                               "llx: "
00157                               "to compute image statistics on a rectangular"
00158                               "zone of the image the coordinates of the "
00159                               "rectangle are needed:" 
00160                               "lower left x coordinate",
00161                               "sinfoni.bp_dist",
00162                               1350,DET_PIX_MIN,DET_PIX_MAX);
00163   /* 1000 */
00164   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-llx");
00165   cpl_parameterlist_append(list, p);
00166 
00167 
00168 
00169   /* position in the frame lower left in Y */
00170   /* pixel coordinate of lower left edge of a rectangle zone from which 
00171      image statistics are computed */
00172   p = cpl_parameter_new_range("sinfoni.bp_dist.lly",
00173                   CPL_TYPE_INT,
00174                               "lly: "
00175                               "to compute image statistics on a rectangular"
00176                               "zone of the image the coordinates of the "
00177                               "rectangle are needed:" 
00178                               "lower left y coordinate",
00179                               "sinfoni.bp_dist",
00180                               1000,DET_PIX_MIN,DET_PIX_MAX);
00181   /* 1000 */
00182   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-lly");
00183   cpl_parameterlist_append(list, p);
00184 
00185   /* Upper right position in CCD : should be urx */
00186   /* pixel coordinate of upper right edge of a rectangle zone from which 
00187     image statistics are computed */
00188   p = cpl_parameter_new_range("sinfoni.bp_dist.urx",
00189                   CPL_TYPE_INT,
00190                               "urx: "
00191                               "to compute image statistics on a rectangular"
00192                               "zone of the image the coordinates of the "
00193                               "rectangle are needed:" 
00194                               "upper right x coordinate",
00195                               "sinfoni.bp_dist",
00196                               1390,DET_PIX_MIN,DET_PIX_MAX);
00197   /* 1350*/
00198   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-urx");
00199   cpl_parameterlist_append(list, p);
00200 
00201   /* Upper right position in CCD : should be ury */
00202   /* pixel coordinate of upper right edge of a rectangle zone from which 
00203     image statistics are computed */
00204   p = cpl_parameter_new_range("sinfoni.bp_dist.ury",
00205                   CPL_TYPE_INT,
00206                               "ury: "
00207                               "to compute image statistics on a rectangular"
00208                               "zone of the image the coordinates of the "
00209                               "rectangle are needed:" 
00210                               "upper right y coordinate",
00211                               "sinfoni.bp_dist",
00212                               1200,DET_PIX_MIN,DET_PIX_MAX);
00213   /* 1390 */
00214   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-ury");
00215   cpl_parameterlist_append(list, p);
00216 
00217   /* boolean (implemented as integer) useda s a switch */
00218   /* indicates if the values beyond threshold values should be marked 
00219      as bad before proceeding to median filtering */
00220   p = cpl_parameter_new_value("sinfoni.bp_dist.threshold_index",
00221                   CPL_TYPE_BOOL,
00222                               "Threshold Index: "
00223                               "indicator that indicates if the values "
00224                               "beyond a threshold deviation from the mean "
00225                               "are flagged as bad pixels",
00226                               "sinfoni.bp_dist",
00227                               TRUE);
00228 
00229   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-thr_ind");
00230   cpl_parameterlist_append(list, p);
00231 
00232   /* threshold value. Float. Threshold used to find bad pixel */
00233   /* factor to the clean standard deviation to define the threshold 
00234      deviation from the clean mean */
00235   p = cpl_parameter_new_range("sinfoni.bp_dist.mean_factor",
00236                   CPL_TYPE_DOUBLE,
00237                               "Mean Factor: "
00238                               "factor to the clean standard deviation to "
00239                               "define the threshold deviation from the "
00240                               "clean mean",
00241                               "sinfoni.bp_dist",
00242                               999.,0.1,1.e10);
00243 
00244   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-mean_fct");
00245   cpl_parameterlist_append(list, p);
00246 
00247 
00248 
00249   p = cpl_parameter_new_value("sinfoni.bp_dist.min_cut",
00250                   CPL_TYPE_DOUBLE,
00251                               "the minimum value of real data",
00252                               "sinfoni.bp_dist",
00253                               0.1);
00254 
00255   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-min_cut");
00256   cpl_parameterlist_append(list, p);
00257 
00258 
00259   p = cpl_parameter_new_value("sinfoni.bp_dist.max_cut",
00260                   CPL_TYPE_DOUBLE,
00261                               "the minimum value of real data",
00262                               "sinfoni.bp_dist",
00263                               50000.);
00264 
00265   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_dist-max_cut");
00266   cpl_parameterlist_append(list, p);
00267 
00268   return;
00269 
00270 }

Generated on Wed Oct 26 13:08:54 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001