sinfo_objspider_config.c

00001 /* $Id: sinfo_objspider_config.c,v 1.7 2012/03/03 09:50:08 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/03 09:50:08 $
00023  * $Revision: 1.7 $
00024  * $Name: HEAD $
00025  */
00026 
00027  /****************************************************************
00028   *   Objspider Frames Data Reduction Parameter Initialization        *
00029   ****************************************************************/
00030 
00031 #ifdef HAVE_CONFIG_H
00032 #  include <config.h>
00033 #endif
00034 
00035 #include "sinfo_objspider_config.h"
00050 void
00051  sinfo_objspider_config_add(cpl_parameterlist *list)
00052 {
00053 
00054   cpl_parameter *p;
00055 
00056   if (!list) {
00057     return;
00058   }
00059 
00060 
00061   /* Input file name */
00062   /* Output file name */
00063   /* output name of resulting fits wavelength map */
00064   p = cpl_parameter_new_value("sinfoni.objspider.out_filename",
00065                   CPL_TYPE_STRING,
00066                               "Output File Name: ",
00067                               "sinfoni.objspider",
00068                               SKYSPIDER_OUT_FILENAME);
00069 
00070 
00071   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"out-skyspider_filename");
00072   cpl_parameterlist_append(list, p);
00073 
00074 
00075   /*Resampling */
00076  /* number of coefficients for the polynomial interpolation */
00077   p = cpl_parameter_new_value("sinfoni.objspider.n_coeffs",
00078                   CPL_TYPE_INT,
00079                               "number of coefficients for the polynomial "
00080                               "interpolation ",
00081                               "sinfoni.objspider",
00082                                3);
00083 
00084   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-no-coeffs");
00085   cpl_parameterlist_append(list, p);
00086 
00087 
00088   /* Calibration */
00089   /* indicates if the halogen lamp features from flatfielding should be 
00090      corrected for or not */
00091   /*
00092   p = cpl_parameter_new_value("sinfoni.objspider.halo_correct_index",
00093                   CPL_TYPE_BOOL,
00094                               "Halo Correct Index: "
00095                                "indicates if the halogen lamp features from "
00096                               "flatfielding should be corrected for (TRUE) "
00097                               "or not (FALSE)",
00098                               "sinfoni.objspider",
00099                               FALSE);
00100 
00101   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-halo-corr-ind");
00102   cpl_parameterlist_append(list, p);
00103   */
00104 
00105 
00106   /* Cube Creation */
00107   /*indicates if the slitlet distances are determined by a north-south-test 
00108      (yes) or slitlet edge fits (no)
00109   */
00110   p = cpl_parameter_new_value("sinfoni.objspider.nord_south_index",
00111                   CPL_TYPE_BOOL,
00112                               "Nord South Index Switch: "
00113                                "indicates if the slitlet distances are "
00114                               "determined by a north-south-test (TRUE) "
00115                               "or slitlet edge fits (FALSE)",
00116                               "sinfoni.objspider",
00117                               TRUE);
00118 
00119 
00120   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-ns-ind");
00121   cpl_parameterlist_append(list, p);
00122 
00123   p = cpl_parameter_new_value("sinfoni.objspider.slitlets_position_list",
00124                   CPL_TYPE_STRING,
00125                               "Slitlets positions filename: "
00126                                "list of the fitted slitlet edge positions "
00127                               "or the distances of the slitlets",
00128                               "sinfoni.objspider",
00129                               "distances.fits");
00130 
00131 
00132   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-pos-list");
00133   cpl_parameterlist_append(list, p);
00134 
00135   /* number of slitlets (32) */
00136   p = cpl_parameter_new_value("sinfoni.objspider.nslits",
00137                   CPL_TYPE_INT,
00138                               "Number of slitlets: ",
00139                               "sinfoni.objspider",
00140                               32);
00141 
00142   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-pos-nslits");
00143   cpl_parameterlist_append(list, p);
00144 
00145   /* Fine tuning */
00146   /* Method */
00147 
00148   p = cpl_parameter_new_enum("sinfoni.objspider.fine_tuning_method",
00149                   CPL_TYPE_STRING,
00150                               "Fine Tuning Method: "
00151                                "indicator for the shifting method to use "
00152                               "(P: polynomial interpolation, "
00153                               " F: FFT, "
00154                               " S: cubic spline interpolation)",
00155                               "sinfoni.objspider",
00156                               "P",
00157                                3,"P","F","S");
00158 
00159   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-fine-tune-mtd");
00160   cpl_parameterlist_append(list, p);
00161 
00162   p = cpl_parameter_new_value("sinfoni.objspider.order",
00163                   CPL_TYPE_INT,
00164                               "Fine Tuning polynomial order: " 
00165                               "order of the polynomial if the polynomial "
00166                               "interpolation shifting method is used.",
00167                               "sinfoni.objspider",
00168                               2);
00169 
00170   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-order");
00171   cpl_parameterlist_append(list, p);
00172 
00173   /* Sky Extraction */
00174   /*Reconstruction */
00175  /* the fraction [0...1] of rejected low intensity pixels when taking 
00176 the average of columns */
00177   p = cpl_parameter_new_value("sinfoni.objspider.lower_rejection",
00178                   CPL_TYPE_DOUBLE,
00179                               "lower rejection: "
00180                               "percentage of rejected low value pixels "
00181                               "for averaging the sky spectra",
00182                               "sinfoni.objspider",
00183                               10.);
00184 
00185   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-lo-rejection");
00186   cpl_parameterlist_append(list, p);
00187 
00188  /* the fraction [0...1] of rejected high intensity pixels when taking 
00189 the average of columns */
00190   p = cpl_parameter_new_value("sinfoni.objspider.higher_rejection",
00191                   CPL_TYPE_DOUBLE,
00192                               "higher rejection: "
00193                               "percentage of rejected high value pixels "
00194                               "for averaging the sky spectra",
00195                               "sinfoni.objspider",
00196                               10.);
00197 
00198   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-hi-rejection");
00199   cpl_parameterlist_append(list, p);
00200 
00201   /* pixel tolerance, this distance tolerance to the diagonal dividing 
00202      line is not considered for the sky extraction to be sure to have a clean
00203      sky due to positioning tolerance and crossing through pixels
00204   */
00205 
00206   p = cpl_parameter_new_value("sinfoni.objspider.tolerance",
00207                   CPL_TYPE_INT,
00208                               "Tolerance: "
00209                               "pixel tolerance, this distance tolerance to "
00210                               "the diagonal dividing line is not considered "
00211                               "for the sky extraction to be sure to have a "
00212                               "clean sky due to positioning tolerance and "
00213                               "crossing through pixels",
00214                               "sinfoni.objspider",
00215                               2);
00216 
00217   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-tol");
00218   cpl_parameterlist_append(list, p);
00219 
00220   /* Jittering */
00221   /* jitter mode indicator: yes: Auto-Jitter, no: user defined jitter
00222      The next three parameters are only used if jitterInd is set to yes, 
00223      that means in auto-jittering mode!
00224   */
00225 
00226   p = cpl_parameter_new_value("sinfoni.objspider.jitter_index",
00227                   CPL_TYPE_BOOL,
00228                               "Jitter Index: "
00229                               "jitter mode indicator: "
00230                               "TRUE: Auto-Jitter, "
00231                               "FALSE: user defined jitter"
00232                               "The size_x size_y kernel_type parameters "
00233                               "are only used if jitterInd is set to yes, "
00234                               "that means in auto-jittering mode!",
00235                                "sinfoni.objspider",
00236                               FALSE);
00237 
00238   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-jit-ind");
00239   cpl_parameterlist_append(list, p);
00240   /*x-pixel size of the final combined data cube, must lie between 64 and 128 */
00241 
00242   p = cpl_parameter_new_value("sinfoni.objspider.size_x",
00243                   CPL_TYPE_INT,
00244                               "Cube x size: "
00245                               "x-pixel size of the final combined data cube,"
00246                               "must lie between 64 and 128. "
00247                               "If 0 automatic setting.",
00248                               "sinfoni.objspider",
00249                               0);
00250 
00251   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-size-x");
00252   cpl_parameterlist_append(list, p);
00253   /*y-pixel size of the final combined data cube, must lie between 64 and 128 */
00254 
00255   p = cpl_parameter_new_value("sinfoni.objspider.size_y",
00256                   CPL_TYPE_INT,
00257                               "Cube y size: "
00258                               "y-pixel size of the final combined data cube,"
00259                               "must lie between 64 and 128. "
00260                               "If 0 automatic setting.",
00261                               "sinfoni.objspider",
00262                               0);
00263 
00264   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-size-y");
00265   cpl_parameterlist_append(list, p);
00266 
00267   /* Kernel Type */
00268   /* the name of the interpolation kernel to shift the single cubes  to the 
00269      correct places inside the big combined cube. That you want to generate 
00270      using the eclipse routine sinfo_generate_interpolation_kernel()
00271      Supported kernels are:
00272 
00273                                      NULL:      default kernel, currently tanh
00274                                      default: dito
00275                                      tanh:    Hyperbolic tangent
00276                                      sinc2:   Square sinc
00277                                      lanczos: Lanczos2 kernel
00278                                      hamming: Hamming kernel
00279                                      hann:    Hann kernel
00280   */
00281   p = cpl_parameter_new_enum("sinfoni.objspider.kernel_type",
00282                   CPL_TYPE_STRING,
00283                               "Kernel Type:"
00284                               "the name of the interpolation kernel to shift "
00285                               "the single cubes  to the correct places inside "
00286                  "the big combined cube",
00287                               "sinfoni.objspider",
00288                               "tanh",
00289                                6,"NULL","default","tanh",
00290                                "sinc2","lanczos","hamming","hann");
00291 
00292   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-kernel-typ");
00293   cpl_parameterlist_append(list, p);
00294 
00295   /* name of the final mask data cube, pixel value 0 if no data available,
00296      sum of exposure times in the overlapping regions
00297   */
00298 
00299  p = cpl_parameter_new_value("sinfoni.objspider.mask_name",
00300                   CPL_TYPE_STRING,
00301                               "Mask Name: "
00302                               "name of the final mask data cube, "
00303                               "pixel value 0 if no data available,"
00304                               "sum of exposure times in the overlapping "
00305                               "regions ",
00306                               "sinfoni.objspider",
00307                               SKYSPIDER_MASK_OUT_FILENAME);
00308 
00309   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-mask");
00310   cpl_parameterlist_append(list, p);
00311 
00312 }

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