sinfo_bp_norm_config.c

00001 /* $Id: sinfo_bp_norm_config.c,v 1.4 2007/06/06 07:10:45 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: 2007/06/06 07:10:45 $
00023  * $Revision: 1.4 $
00024  * $Name: HEAD $
00025  */
00026 
00027 #ifdef HAVE_CONFIG_H
00028 #  include <config.h>
00029 #endif
00030  /****************************************************************
00031   *           Bad pixel search  (normal method)                  *
00032   ****************************************************************/
00033 #include "sinfo_bp_norm_config.h"
00052   /* Bad pixel parameters */
00053 
00054 void
00055  sinfo_bp_norm_config_add(cpl_parameterlist *list)
00056 {
00057   cpl_parameter *p;
00058 
00059   if (!list) {
00060     return;
00061   }
00062 
00063 
00064  
00065 
00066 /* factor of noise within which the pixels are used to fit a straight line 
00067    to the column intensity */
00068   p = cpl_parameter_new_value("sinfoni.bp_norm.sigma_factor",
00069                   CPL_TYPE_DOUBLE,
00070                               "Threshold Sigma Factor: "
00071                               "to remove the column intensity tilt only "
00072                               "pixels which lie within a defined noise"
00073                               "limit are used to fit a straight line",
00074                               "sinfoni.bp_noise",
00075                               5.0);
00076 
00077   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-s_factor");
00078   cpl_parameterlist_append(list, p);
00079 
00080   /* bad pixel search determination method */
00081  p = cpl_parameter_new_enum("sinfoni.bp_norm.method_index",
00082                   CPL_TYPE_INT,
00083                               "Bad pixel Method Index"
00084                               "1: median of nearest neighbors,"
00085                               "2: absolute distances check, "
00086                               "3: mean of nearest spectral neighbors",
00087                               "sinfoni.bp_norm",
00088                               1,
00089                               3,1,2,3);
00090 
00091   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-method_ind");
00092   cpl_parameterlist_append(list, p);
00093 
00094   /* factor of calculated standard deviation beyond which the deviation 
00095      of a pixel value from the median of the 8 nearest neighbors declares 
00096      a pixel as bad */
00097   p = cpl_parameter_new_value("sinfoni.bp_norm.factor",
00098                   CPL_TYPE_DOUBLE,
00099                               "Factor: "
00100            "if |pixel - median| > factor * standard deviation -> "
00101                               "then the pixel value is replaced by "
00102                               "the median of the 8 nearest neighbors",
00103                               "sinfoni.bp_norm",
00104                               10.0);
00105 
00106   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-fct");
00107   cpl_parameterlist_append(list, p);
00108 
00109  /* no of iterations to find bad pix clusters */
00110   /* number of iterations of sinfo_median filter */
00111   p = cpl_parameter_new_value("sinfoni.bp_norm.iterations",
00112                   CPL_TYPE_INT,
00113                               "Iterations: number of iterations to of median"
00114                               " filtering to find bad pixel clusters",
00115                               "sinfoni.bp_norm",
00116                               8);
00117 
00118   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-it");
00119   cpl_parameterlist_append(list, p);
00120 
00121   /* float 
00122      threshold used in the clean mean percentage of rejection used to reject 
00123      low and high frame */
00124  /* percentage of extreme pixel value to reject when calculating the mean 
00125     and stdev */
00126   p = cpl_parameter_new_range("sinfoni.bp_norm.low_rejection",
00127                   CPL_TYPE_DOUBLE,
00128                               "low_rejection: "
00129                               "percentage of rejected low intensity "
00130                               "pixels before averaging",
00131                               "sinfoni.bp_norm",
00132                               0.1,0.0,1.0);
00133 
00134   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-lo_rej");
00135   cpl_parameterlist_append(list, p);
00136 
00137   /* float 
00138      threshold used in the clean mean percentage of rejection used to reject 
00139      low and high frame */
00140  /* percentage of extreme pixel value to reject when calculating the mean 
00141     and stdev */
00142   p = cpl_parameter_new_range("sinfoni.bp_norm.high_rejection",
00143                   CPL_TYPE_DOUBLE,
00144                               "high_rejection: "
00145                               "percentage of rejected high intensity "
00146                               "pixels before averaging",
00147                               "sinfoni.bp_norm",
00148                               0.1,0.0,1.0);
00149 
00150   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-hi_rej");
00151   cpl_parameterlist_append(list, p);
00152 
00153 
00154   /* position in the frame lower left in X */
00155   /* pixel coordinate of lower left sinfo_edge of a rectangle zone from which 
00156      image statistics are computed */
00157   p = cpl_parameter_new_range("sinfoni.bp_norm.llx",
00158                   CPL_TYPE_INT,
00159                               "llx: "
00160                               "to compute image statistics on a rectangular"
00161                               "zone of the image the coordinates of the "
00162                               "rectangle are needed:" 
00163                               "lower left x coordinate",
00164                               "sinfoni.bp_norm",
00165                               270,DET_PIX_MIN,DET_PIX_MAX);
00166 
00167   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-llx");
00168   cpl_parameterlist_append(list, p);
00169 
00170 
00171 
00172   /* position in the frame lower left in Y */
00173   /* pixel coordinate of lower left sinfo_edge of a rectangle zone from which 
00174      image statistics are computed */
00175   p = cpl_parameter_new_range("sinfoni.bp_norm.lly",
00176                   CPL_TYPE_INT,
00177                               "lly: "
00178                               "to compute image statistics on a rectangular"
00179                               "zone of the image the coordinates of the "
00180                               "rectangle are needed:" 
00181                               "lower left y coordinate",
00182                               "sinfoni.bp_norm",
00183                               LLY,DET_PIX_MIN,DET_PIX_MAX);
00184 
00185   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-lly");
00186   cpl_parameterlist_append(list, p);
00187 
00188   /* Upper right position in CCD : should be urx */
00189   /* pixel coordinate of upper right sinfo_edge of a rectangle zone from which 
00190     image statistics are computed */
00191   p = cpl_parameter_new_range("sinfoni.bp_norm.urx",
00192                   CPL_TYPE_INT,
00193                               "urx: "
00194                               "to compute image statistics on a rectangular"
00195                               "zone of the image the coordinates of the "
00196                               "rectangle are needed:" 
00197                               "upper right x coordinate",
00198                               "sinfoni.bp_norm",
00199                               310,DET_PIX_MIN,DET_PIX_MAX);
00200 
00201   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-urx");
00202   cpl_parameterlist_append(list, p);
00203 
00204   /* Upper right position in CCD : should be ury */
00205   /* pixel coordinate of upper right sinfo_edge of a rectangle zone from which 
00206     image statistics are computed */
00207   p = cpl_parameter_new_range("sinfoni.bp_norm.ury",
00208                   CPL_TYPE_INT,
00209                               "ury: "
00210                               "to compute image statistics on a rectangular"
00211                               "zone of the image the coordinates of the "
00212                               "rectangle are needed:" 
00213                               "upper right y coordinate",
00214                               "sinfoni.bp_norm",
00215                               URY,DET_PIX_MIN,DET_PIX_MAX);
00216 
00217   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-ury");
00218   cpl_parameterlist_append(list, p);
00219 
00220   /* boolean (implemented as integer) useda s a switch */
00221   /* indicates if the values beyond threshold values should be marked 
00222      as bad before proceeding to sinfo_median filtering */
00223   p = cpl_parameter_new_value("sinfoni.bp_norm.threshold_index",
00224                   CPL_TYPE_BOOL,
00225                               "Threshold Index: "
00226                               "indicator that indicates if the values "
00227                               "beyond a threshold deviation from the mean "
00228                               "are flagged as bad pixels",
00229                               "sinfoni.bp_norm",
00230                               TRUE);
00231 
00232   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-thr_ind");
00233   cpl_parameterlist_append(list, p);
00234 
00235   /* threshold value. Float. Threshold used to find bad pixel */
00236   /* factor to the clean standard deviation to define the threshold 
00237      deviation from the clean mean */
00238   p = cpl_parameter_new_range("sinfoni.bp_norm.mean_factor",
00239                   CPL_TYPE_DOUBLE,
00240                               "Mean Factor: "
00241                               "factor to the clean standard deviation to "
00242                               "define the threshold deviation from the "
00243                               "clean mean",
00244                               "sinfoni.bp_norm",
00245                               100.,0.1,1.e10);
00246 
00247   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-mean_fct");
00248   cpl_parameterlist_append(list, p);
00249 
00250 
00251 
00252   p = cpl_parameter_new_value("sinfoni.bp_norm.min_cut",
00253                   CPL_TYPE_DOUBLE,
00254                               "the minimum value of real data",
00255                               "sinfoni.bp_norm",
00256                               0.0);
00257 
00258   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-min_cut");
00259   cpl_parameterlist_append(list, p);
00260 
00261 
00262   p = cpl_parameter_new_value("sinfoni.bp_norm.max_cut",
00263                   CPL_TYPE_DOUBLE,
00264                               "the minimum value of real data",
00265                               "sinfoni.bp_norm",
00266                               50000.);
00267 
00268   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"bp_norm-max_cut");
00269   cpl_parameterlist_append(list, p);
00270 
00271   return;
00272 
00273 }

Generated on 3 Mar 2013 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1