sinfo_lamp_flats_config.c

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

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