sinfoni_lamp_flats_config.c

00001 /* $Id: sinfoni_lamp_flats_config.c,v 1.22 2005/07/28 17:12:17 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/07/28 17:12:17 $
00023  * $Revision: 1.22 $
00024  * $Name:  $
00025  */
00026 
00027  /****************************************************************
00028   *   Lamp_Spec Frames Data Reduction Parameter Initialization        *
00029   ****************************************************************/
00030 
00031 #include "sinfoni_lamp_flats_config.h"
00032 
00033 void
00034  sinfoni_lamp_flats_config_add(cpl_parameterlist *list)
00035 {
00036 
00037   cpl_parameter *p;
00038 
00039   if (!list) {
00040     return;
00041   }
00042 
00043   /*Reconstruction */
00044  /* the fraction [0...1] of rejected low intensity pixels when taking 
00045 the average of columns */
00046   p = cpl_parameter_new_range("sinfoni.lamp_flats.low_rejection",
00047                   CPL_TYPE_DOUBLE,
00048                               "lower rejection: "
00049                               "percentage of rejected low intensity "
00050                               "pixels before averaging",
00051                               "sinfoni.lamp_flats",
00052                               0.1,0.0,1.0);
00053 
00054   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-lo_rej");
00055   cpl_parameterlist_append(list, p);
00056 
00057  /* the fraction [0...1] of rejected high intensity pixels when taking 
00058     the average of columns */
00059   p = cpl_parameter_new_range("sinfoni.lamp_flats.high_rejection",
00060                   CPL_TYPE_DOUBLE,
00061                               "high rejection: "
00062                               "percentage of rejected high intensity "
00063                               "pixels before averaging",
00064                               "sinfoni.lamp_flats",
00065                               0.1,0.0,1.0);
00066 
00067   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-hi_rej");
00068   cpl_parameterlist_append(list, p);
00069 
00070 
00071   /* indicator if the bad pixels of the flatfield should be interpolated */
00072   p = cpl_parameter_new_value("sinfoni.lamp_flats.interpol_index",
00073                   CPL_TYPE_BOOL,
00074                               "Interpolation index switch: "
00075                               "indicator if the bad pixels of the flatfield "
00076                               "should be interpolated",
00077                               "sinfoni.lamp_flats",
00078                               FALSE);
00079 
00080 
00081   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-interpol_index");
00082   cpl_parameterlist_append(list, p);
00083 
00084  
00085   /* maximal pixel distance from bad pixel to take valid pixels */
00086   p = cpl_parameter_new_value("sinfoni.lamp_flats.max_rad",
00087                   CPL_TYPE_INT,
00088                               "Max Rad: "
00089                               "maximal pixel distance from bad pixel "
00090                               "to take valid pixels",
00091                               "sinfoni.lamp_flats",
00092                               4);
00093 
00094   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-max_rad");
00095   cpl_parameterlist_append(list, p);
00096 
00097 
00098   /*  indicator if a bad pixel mask should be generated or not */ 
00099   p = cpl_parameter_new_value("sinfoni.lamp_flats.bad_ind",
00100                   CPL_TYPE_BOOL,
00101                               "indicator if a bad pixel mask should be "
00102                               "generated or not",
00103                               "sinfoni.lamp_flats",
00104                               FALSE);
00105 
00106   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-bad_ind");
00107   cpl_parameterlist_append(list, p);
00108 
00109   /*
00110    factor of the sigma noise limit; to remove the column intensity tilt only 
00111    pixels which lie within a defined noise limit are used to fit a straight 
00112    line
00113   */
00114   p = cpl_parameter_new_value("sinfoni.lamp_flats.sigma_factor",
00115                   CPL_TYPE_DOUBLE,
00116                               "Sigma Factor: "
00117                               "factor of the sigma noise limit; "
00118                               "to remove the column intensity tilt only "
00119                               "pixels which lie within a defined noise "
00120                               "limit are used to fit a straight line",
00121                               "sinfoni.lamp_flats",
00122                               5.);
00123 
00124   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-sigma_factor");
00125   cpl_parameterlist_append(list, p);
00126 
00127   /* 
00128    if |pixel - median| > factor * standard deviation -> then the
00129     pixel value is replaced by the median of the 8 nearest neighbors
00130   */
00131   p = cpl_parameter_new_value("sinfoni.lamp_flats.factor",
00132                   CPL_TYPE_DOUBLE,
00133                               "Factor: "
00134                    "if |pixel - median| > factor * standard deviation -> "
00135                    "then the pixel value is replaced by the median of the 8 "
00136                    "nearest neighbors",
00137                               "sinfoni.lamp_flats",
00138                               3.);
00139 
00140   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-factor");
00141   cpl_parameterlist_append(list, p);
00142 
00143   /* number of iterations to of median filtering to find bad pixel clusters */
00144   p = cpl_parameter_new_value("sinfoni.lamp_flats.iterations",
00145                   CPL_TYPE_INT,
00146                               "Iterations: "
00147                               "number of iterations to of median filtering "
00148                               "to find bad pixel clusters",
00149                               "sinfoni.lamp_flats",
00150                               8);
00151 
00152   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-iterations");
00153   cpl_parameterlist_append(list, p);
00154 
00155   /* percentage of rejected low intensity pixels before averaging */
00156   p = cpl_parameter_new_range("sinfoni.lamp_flats.bad_low_rejection",
00157                   CPL_TYPE_DOUBLE,
00158                               "low rejection: "
00159                               "Percentage for bad pixel low rejection",
00160                               "sinfoni.lamp_flats",
00161                               10.,0.,100.);
00162 
00163   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-bad_lo_rej");
00164   cpl_parameterlist_append(list, p);
00165 
00166   /* percentage of rejected high intensity pixels before averaging */
00167   p = cpl_parameter_new_range("sinfoni.lamp_flats.bad_high_rejection",
00168                   CPL_TYPE_DOUBLE,
00169                               "high rejection: "
00170                               "Percentage for bad pixel high rejection",
00171                               "sinfoni.lamp_flats",
00172                               10.,0.,100.);
00173 
00174   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-bad_hi_rej");
00175   cpl_parameterlist_append(list, p);
00176 
00177 
00178   /* to compute image statistics on a rectangular zone of the image
00179      the coordinates of the rectangle are needed
00180   */
00181   /* lower left x coordinate */
00182   p = cpl_parameter_new_range("sinfoni.lamp_flats.llx",
00183                   CPL_TYPE_INT,
00184                               "Lower Lext X corner",
00185                               "sinfoni.lamp_flats",
00186                               1350,DET_PIX_MIN,DET_PIX_MAX);
00187 
00188   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-llx");
00189   cpl_parameterlist_append(list, p);
00190 
00191   /* lower left y coordinate */
00192   p = cpl_parameter_new_range("sinfoni.lamp_flats.lly",
00193                   CPL_TYPE_INT,
00194                               "Lower Lext Y corner",
00195                               "sinfoni.lamp_flats",
00196                               1000,DET_PIX_MIN,DET_PIX_MAX);
00197 
00198   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-lly");
00199   cpl_parameterlist_append(list, p);
00200 
00201   /* upper right x coordinate */
00202   p = cpl_parameter_new_range("sinfoni.lamp_flats.urx",
00203                   CPL_TYPE_INT,
00204                               "Upper right X corner",
00205                               "sinfoni.lamp_flats",
00206                               1390,DET_PIX_MIN,DET_PIX_MAX);
00207 
00208   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-rrx");
00209   cpl_parameterlist_append(list, p);
00210 
00211   /* upper right y coordinate */
00212   p = cpl_parameter_new_range("sinfoni.lamp_flats.ury",
00213                   CPL_TYPE_INT,
00214                               "Upper right Y corner",
00215                               "sinfoni.lamp_flats",
00216                               1200,DET_PIX_MIN,DET_PIX_MAX);
00217 
00218   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-ury");
00219   cpl_parameterlist_append(list, p);
00220 
00221   /* indicator that indicates if the values beyond a threshold deviation */
00222   p = cpl_parameter_new_value("sinfoni.lamp_flats.thresh_ind",
00223                   CPL_TYPE_BOOL,
00224                               "Treshold index: ",
00225                               "sinfoni.lamp_flats",
00226                               FALSE);
00227 
00228 
00229   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-tresh_ind");
00230   cpl_parameterlist_append(list, p);
00231 
00232   /* 
00233   factor to the clean standard deviation to define the threshold deviation
00234   from the clean mean
00235   */
00236   p = cpl_parameter_new_value("sinfoni.lamp_flats.mean_factor",
00237                   CPL_TYPE_DOUBLE,
00238                               "Mean Factor: "
00239                               "factor to the clean standard deviation to "
00240                               "define the threshold deviation "
00241                               "from the clean mean",
00242                               "sinfoni.lamp_flats",
00243                               10.);
00244 
00245   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"lamp_flats-mean_factor");
00246   cpl_parameterlist_append(list, p);
00247 
00248 
00249   /* QC LOG */
00250  /* FPN */
00251 
00252 
00253  p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_xmin1",
00254                   CPL_TYPE_INT,
00255                               "qc_fpn_xmin1",
00256                               "sinfoni.lamp_flats",
00257                               512,DET_PIX_MIN,DET_PIX_MAX);
00258 
00259   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_xmin1");
00260   cpl_parameterlist_append(list, p);
00261   
00262  
00263   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_xmax1",
00264                   CPL_TYPE_INT,
00265                               "qc_fpn_xmax1",
00266                               "sinfoni.lamp_flats",
00267                               1536,DET_PIX_MIN,DET_PIX_MAX);
00268 
00269   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_xmax1");
00270   cpl_parameterlist_append(list, p);
00271 
00272   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_ymin1",
00273                   CPL_TYPE_INT,
00274                               "qc_fpn_ymin1",
00275                               "sinfoni.lamp_flats",
00276                               512,DET_PIX_MIN,DET_PIX_MAX);
00277 
00278   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_ymin1");
00279   cpl_parameterlist_append(list, p);
00280 
00281 
00282   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_ymax1",
00283                   CPL_TYPE_INT,
00284                               "qc_fpn_ymax1",
00285                               "sinfoni.lamp_flats",
00286                               1536,DET_PIX_MIN,DET_PIX_MAX);
00287 
00288   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_ymax1");
00289   cpl_parameterlist_append(list, p);
00290 
00291 
00292 
00293 
00294 
00295 
00296  p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_xmin2",
00297                   CPL_TYPE_INT,
00298                               "qc_fpn_xmin2",
00299                               "sinfoni.lamp_flats",
00300                               1350,DET_PIX_MIN,DET_PIX_MAX);
00301 
00302   cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI, "lamp_flats-qc_fpn_xmin2");
00303   cpl_parameterlist_append(list, p);
00304   
00305  
00306   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_xmax2",
00307                   CPL_TYPE_INT,
00308                               "qc_fpn_xmax2",
00309                               "sinfoni.lamp_flats",
00310                               1390,DET_PIX_MIN,DET_PIX_MAX);
00311 
00312   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_xmax2");
00313   cpl_parameterlist_append(list, p);
00314 
00315   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_ymin2",
00316                   CPL_TYPE_INT,
00317                               "qc_fpn_ymin2",
00318                               "sinfoni.lamp_flats",
00319                               1000,DET_PIX_MIN,DET_PIX_MAX);
00320 
00321   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_ymin2");
00322   cpl_parameterlist_append(list, p);
00323 
00324 
00325   p = cpl_parameter_new_range("sinfoni.lamp_flats.qc_fpn_ymax2",
00326                   CPL_TYPE_INT,
00327                               "qc_fpn_ymax2",
00328                               "sinfoni.lamp_flats",
00329                               1200,DET_PIX_MIN,DET_PIX_MAX);
00330 
00331   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_fpn_ymax2");
00332   cpl_parameterlist_append(list, p);
00333 
00334 
00335 
00336 
00337 
00338   p = cpl_parameter_new_value("sinfoni.lamp_flats.qc_thresh_min",
00339                   CPL_TYPE_INT,
00340                               "qc_thresh_min",
00341                               "sinfoni.lamp_flats",
00342                               0);
00343 
00344   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_thresh_min");
00345   cpl_parameterlist_append(list, p);
00346 
00347 
00348   p = cpl_parameter_new_value("sinfoni.lamp_flats.qc_thresh_max",
00349                   CPL_TYPE_INT,
00350                               "qc_thresh_max",
00351                               "sinfoni.lamp_flats",
00352                               49000);
00353 
00354   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"lamp_flats-qc_thresh_max");
00355   cpl_parameterlist_append(list, p);
00356 
00357 
00358 }

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