sinfo_bp_sky_config.c

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

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