sinfoni_objnod_config.c

00001 /* $Id: sinfoni_objnod_config.c,v 1.23 2005/10/11 13:13:14 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/10/11 13:13:14 $
00023  * $Revision: 1.23 $
00024  * $Name:  $
00025  */
00026 
00027  /****************************************************************
00028   *   Objnod Frames Data Reduction Parameter Initialization        *
00029   ****************************************************************/
00030 
00031 #include "sinfoni_objnod_config.h"
00032 
00033 void
00034  sinfoni_objnod_config_add(cpl_parameterlist *list)
00035 {
00036 
00037   cpl_parameter *p;
00038 
00039   if (!list) {
00040     return;
00041   }
00042 
00043 
00044 
00045 
00046   /* Science */
00047   p = cpl_parameter_new_enum("sinfoni.objnod.autojitter_method",
00048                   CPL_TYPE_INT,
00049                               "Method to reduce autojitter template frames "
00050                               "Raw frames are object only exposures. "
00051                               "object-fake_sky pairs are generated. "
00052                               "0: no sky for all objects ",
00053                               "1: fake_sky is next object, "
00054                               "2: fake_sky is median of all objects "
00055                               "sinfoni.objnod",
00056                                1,3,0,1,2);
00057 
00058   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-aj_method");
00059   cpl_parameterlist_append(list, p);
00060 
00061 
00062   /* Science */
00063   p = cpl_parameter_new_value("sinfoni.objnod.scales_sky",
00064                   CPL_TYPE_BOOL,
00065                               "Spatial median (sky) subtraction from cube: "
00066                               "(If autojitter_method==1),"
00067                               "indicates if the spatial median of each plane "
00068                               "should be subtracted (TRUE) or not (FALSE) "
00069                               "from each cube plane",
00070                               "sinfoni.objnod",
00071                               TRUE);
00072 
00073   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-scales_sky");
00074   cpl_parameterlist_append(list, p);
00075 
00076 
00077 
00078   /* Science */
00079   p = cpl_parameter_new_value("sinfoni.objnod.ks_clip",
00080                   CPL_TYPE_BOOL,
00081                               "Kappa-sigma clipping of coadded cube: "
00082                               "indicates if a kappa-sigma clipping "
00083                               "should be performed (TRUE) or not (FALSE) "
00084                               "on each plane of the coadded cube",
00085                               "sinfoni.objnod",
00086                               TRUE);
00087 
00088   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-ks_clip");
00089   cpl_parameterlist_append(list, p);
00090 
00091 
00092   p = cpl_parameter_new_value("sinfoni.objnod.kappa",
00093                   CPL_TYPE_DOUBLE,
00094                               "kappa value for kappa-sigma clipping "
00095                               "of coadded cube",
00096                               "sinfoni.objnod",
00097                               2.0);
00098 
00099   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-kappa");
00100   cpl_parameterlist_append(list, p);
00101 
00102 
00103 
00104   /*x-pixel size of the final combined data cube, must lie between 64 and 128 */
00105   p = cpl_parameter_new_value("sinfoni.objnod.size_x",
00106                   CPL_TYPE_INT,
00107                               "Cube x size: "
00108                               "x-pixel size of the final combined data cube,"
00109                               "must lie between 64 and 128. If 0 it is computed automatically",
00110                               "sinfoni.objnod",
00111                               0);
00112 
00113   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-size_x");
00114   cpl_parameterlist_append(list, p);
00115 
00116 
00117   /*y-pixel size of the final combined data cube, must lie between 64 and 128 */
00118   p = cpl_parameter_new_value("sinfoni.objnod.size_y",
00119                   CPL_TYPE_INT,
00120                               "Cube y size: "
00121                               "y-pixel size of the final combined data cube,"
00122                               "must lie between 64 and 128.If 0 it is computed automatically",
00123                               "sinfoni.objnod",
00124                               0);
00125 
00126   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-size_y");
00127   cpl_parameterlist_append(list, p);
00128 
00129   /*Resampling */
00130  /* number of coefficients for the polynomial interpolation */
00131   p = cpl_parameter_new_value("sinfoni.objnod.n_coeffs",
00132                   CPL_TYPE_INT,
00133                               "number of coefficients for the polynomial "
00134                               "interpolation ",
00135                               "sinfoni.objnod",
00136                                3);
00137 
00138   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-no_coeffs");
00139   cpl_parameterlist_append(list, p);
00140 
00141 
00142   /* Calibration */
00143   /* indicates if the halogen lamp features from flatfielding should be 
00144      corrected for or not */
00145   /*
00146   p = cpl_parameter_new_value("sinfoni.objnod.halo_correct_index",
00147                   CPL_TYPE_BOOL,
00148                               "Halo Correct Index: "
00149                               "indicates if the halogen lamp features from "
00150                               "flatfielding should be corrected for (TRUE) "
00151                               "or not (FALSE)",
00152                               "sinfoni.objnod",
00153                               FALSE);
00154 
00155   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-halo_corr_ind");
00156   cpl_parameterlist_append(list, p);
00157   */
00158 
00159   /* Cube Creation */
00160   /*indicates if the slitlet distances are determined by a north-south-test 
00161      (yes) or slitlet edge fits (no)
00162   */
00163   p = cpl_parameter_new_value("sinfoni.objnod.nord_south_index",
00164                   CPL_TYPE_BOOL,
00165                               "Nord South Index Switch: "
00166                               "indicates if the slitlet distances are "
00167                               "determined by a north-south-test (TRUE) "
00168                               "or slitlet edge fits (FALSE)",
00169                               "sinfoni.objnod",
00170                               TRUE);
00171 
00172 
00173   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-ns_ind");
00174   cpl_parameterlist_append(list, p);
00175 
00176   /* Fine tuning */
00177   /* Method */
00178   p = cpl_parameter_new_enum("sinfoni.objnod.fine_tuning_method",
00179                   CPL_TYPE_STRING,
00180                               "Fine Tuning Method: "
00181                               "indicator for the shifting method to use "
00182                               "(P: polynomial interpolation, "
00183                  /* " F: FFT, " */
00184                               " S: cubic spline interpolation)",
00185                               "sinfoni.objnod",
00186                               "P",
00187                                2,
00188                               "P","S");
00189 
00190   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-fine_tune_mtd");
00191   cpl_parameterlist_append(list, p);
00192 
00193   p = cpl_parameter_new_value("sinfoni.objnod.order",
00194                   CPL_TYPE_INT,
00195                               "Fine Tuning polynomial order: " 
00196                               "order of the polynomial if the polynomial "
00197                               "interpolation shifting method is used.",
00198                               "sinfoni.objnod",
00199                               2);
00200 
00201   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-order");
00202   cpl_parameterlist_append(list, p);
00203 
00204   /* Sky Extraction */
00205   /*Reconstruction */
00206  /* the fraction [0...1] of rejected low intensity pixels when taking 
00207 the average of columns */
00208   p = cpl_parameter_new_value("sinfoni.objnod.low_rejection",
00209                   CPL_TYPE_DOUBLE,
00210                               "lower rejection: "
00211                               "percentage of rejected low value pixels "
00212                               "for averaging the sky spectra",
00213                               "sinfoni.objnod",
00214                               10.);
00215 
00216   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-lo_rej");
00217   cpl_parameterlist_append(list, p);
00218  /* the fraction [0...1] of rejected high intensity pixels when taking 
00219 the average of columns */
00220 
00221   p = cpl_parameter_new_value("sinfoni.objnod.high_rejection",
00222                   CPL_TYPE_DOUBLE,
00223                               "higher rejection: "
00224                               "percentage of rejected high value pixels "
00225                               "for averaging the sky spectra",
00226                               "sinfoni.objnod",
00227                               10.);
00228 
00229   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-hi_rej");
00230   cpl_parameterlist_append(list, p);
00231   /* pixel tolerance, this distance tolerance to the diagonal dividing 
00232      line is not considered for the sky extraction to be sure to have a clean
00233      sky due to positioning tolerance and crossing through pixels
00234   */
00235   p = cpl_parameter_new_value("sinfoni.objnod.tolerance",
00236                   CPL_TYPE_INT,
00237                               "Tolerance: "
00238                               "pixel tolerance, this distance tolerance to "
00239                               "the diagonal dividing line is not considered "
00240                               "for the sky extraction to be sure to have a "
00241                               "clean sky due to positioning tolerance and "
00242                               "crossing through pixels",
00243                               "sinfoni.objnod",
00244                               2);
00245 
00246   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-tol");
00247   cpl_parameterlist_append(list, p);
00248   /* Jittering */
00249   /* jitter mode indicator: yes: Auto-Jitter, no: user defined jitter
00250      The next three parameters are only used if jitterInd is set to yes, 
00251      that means in auto-jittering mode!
00252   */
00253   p = cpl_parameter_new_value("sinfoni.objnod.jitter_index",
00254                   CPL_TYPE_BOOL,
00255                               "Jitter Index: "
00256                               "jitter mode indicator: "
00257                               "TRUE: Auto-Jitter, "
00258                               "FALSE: user defined jitter"
00259                               "The size_x size_y kernel_type parameters "
00260                               "are only used if jitterInd is set to yes, "
00261                               "that means in auto-jittering mode!",
00262                               "sinfoni.objnod",
00263                               TRUE);
00264 
00265   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-jit_ind");
00266   cpl_parameterlist_append(list, p);
00267 
00268   /* Kernel Type */
00269   /* the name of the interpolation kernel to shift the single cubes  to the 
00270      correct places inside the big combined cube. That you want to generate 
00271      using the eclipse routine generate_interpolation_kernel()
00272      Supported kernels are:
00273 
00274                                      NULL:      default kernel, currently tanh
00275                                      default: dito
00276                                      tanh:    Hyperbolic tangent
00277                                      sinc2:   Square sinc
00278                                      lanczos: Lanczos2 kernel
00279                                      hamming: Hamming kernel
00280                                      hann:    Hann kernel
00281   */
00282   p = cpl_parameter_new_enum("sinfoni.objnod.kernel_type",
00283                   CPL_TYPE_STRING,
00284                               "Kernel Type:"
00285                               "the name of the interpolation kernel to shift "
00286                               "the single cubes  to the correct places inside "
00287                  "the big combined cube",
00288                               "sinfoni.objnod",
00289                               "tanh",
00290                                7,
00291                               "NULL","default","tanh","sinc2","lanczos","hamming","hann");
00292 
00293   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-kernel_typ");
00294   cpl_parameterlist_append(list, p);
00295 
00296 
00297 /* amount of vignetting from output cube before coaddition */
00298   p = cpl_parameter_new_range("sinfoni.objnod.vllx",
00299                   CPL_TYPE_INT,
00300                               "Vignetting on llx: "
00301                               "pixels vignetted from lower left corner "
00302                               "X coordinate "
00303                               "of contributing cubes before coaddition ",
00304                               "sinfoni.objnod",
00305                               0,0,63);
00306 
00307   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"objnod-vllx");
00308   cpl_parameterlist_append(list, p);
00309 
00310 
00311   p = cpl_parameter_new_range("sinfoni.objnod.vlly",
00312                   CPL_TYPE_INT,
00313                               "Vignetting on lly: "
00314                               "pixels vignetted from lower left corner "
00315                               "Y coordinate "
00316                               "of contributing cubes before coaddition ",
00317                               "sinfoni.objnod",
00318                               0,0,63);
00319 
00320   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"objnod-vlly");
00321   cpl_parameterlist_append(list, p);
00322 
00323 
00324   p = cpl_parameter_new_range("sinfoni.objnod.vurx",
00325                   CPL_TYPE_INT,
00326                               "Vignetting on urx: "
00327                               "pixels vignetted from upper right corner "
00328                               "X coordinate "
00329                               "of contributing cubes before coaddition ",
00330                               "sinfoni.objnod",
00331                               0,0,63);
00332 
00333   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"objnod-vurx");
00334   cpl_parameterlist_append(list, p);
00335 
00336 
00337   p = cpl_parameter_new_range("sinfoni.objnod.vury",
00338                   CPL_TYPE_INT,
00339                               "Vignetting on ury: "
00340                               "pixels vignetted from upper right corner "
00341                               "Y coordinate "
00342                               "of contributing cubes before coaddition ",
00343                               "sinfoni.objnod",
00344                               0,0,63);
00345 
00346   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"objnod-vury");
00347   cpl_parameterlist_append(list, p);
00348 
00349 }

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