sinfoni_bp_sky_config.c

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

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