sinfo_objnod_config.c

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

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