sinfo_bp_dist_config.c

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

Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1