sinfo_wavecal_config.c

00001 /* $Id: sinfo_wavecal_config.c,v 1.5 2007/10/09 15:59:54 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: 2007/10/09 15:59:54 $
00023  * $Revision: 1.5 $
00024  * $Name: sinfo-2_2_5 $
00025  */
00026 
00027  /****************************************************************
00028   *   Wavecal Frames Data Reduction Parameter Initialization        *
00029   ****************************************************************/
00030 
00031 #ifdef HAVE_CONFIG_H
00032 #  include <config.h>
00033 #endif
00034 
00035 #include "sinfo_wavecal_config.h"
00045 void
00046  sinfo_wavecal_config_add(cpl_parameterlist *list)
00047 {
00048 
00049   cpl_parameter *p;
00050 
00051   if (!list) {
00052     return;
00053   }
00054 
00055   p = cpl_parameter_new_value("sinfoni.wavecal.slitpos_boostrap",
00056                   CPL_TYPE_BOOL,
00057                            "Switch to get a new slitpos without a reference: ",
00058                               "sinfoni.wavecal",
00059                               FALSE);
00060 
00061   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-slitpos_bootstrap");
00062   cpl_parameterlist_append(list, p);
00063 
00064   /*
00065   p = cpl_parameter_new_value("sinfoni.wavecal.mflat_frm_switch",
00066                   CPL_TYPE_BOOL,
00067                               "Switch for master lampflat input: ",
00068                               "sinfoni.wavecal",
00069                               TRUE);
00070 
00071 
00072   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-mflat_frm_switch");
00073   cpl_parameterlist_append(list, p);
00074   */
00075 
00076 
00077 /* Find Lines */
00078 /* indicates if the dispersion relation is already determined or not */
00079   p = cpl_parameter_new_value("sinfoni.wavecal.calib_indicator",
00080                   CPL_TYPE_BOOL,
00081                               "Calib Indicator: "
00082                               "FALSE: if the dispersion relation is already "
00083                             "known, the routine can jump to the sinfo_waveMap "
00084                               "section "
00085                               "TRUE: if the dispersion relation "
00086                               "must first be determined",
00087                               "sinfoni.wavecal",
00088                               TRUE);
00089 
00090   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-calib_indicator");
00091   cpl_parameterlist_append(list, p);
00092 
00093 
00094 /* minimal difference of mean and sinfo_median column intensity */
00095   p = cpl_parameter_new_value("sinfoni.wavecal.min_diff",
00096                   CPL_TYPE_DOUBLE,
00097                               "Minimum Of Difference: "
00098                           "minimum difference of mean and sinfo_median column "
00099                           "intensity to carry out the cross sinfo_correlation",
00100                               "sinfoni.wavecal",
00101                               1.);
00102 
00103   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-min_diff");
00104   cpl_parameterlist_append(list, p);
00105 
00106 /* half width of a box within which the line must sit */
00107   p = cpl_parameter_new_value("sinfoni.wavecal.half_width",
00108                   CPL_TYPE_INT,
00109                               "Half Width: "
00110                               "half width of a box within which the line "
00111                               "must be placed",
00112                               "sinfoni.wavecal",
00113                               7);
00114 
00115   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-hw");
00116   cpl_parameterlist_append(list, p);
00117 
00118 /* sigma of Gaussian of artificial model spectra */
00119   p = cpl_parameter_new_value("sinfoni.wavecal.sigma",
00120                   CPL_TYPE_DOUBLE,
00121                               "Sigma: sigma of Gaussian which is convolved "
00122                               "with the artificial spectrum generated using "
00123                               "the line list",
00124                               "sinfoni.wavecal",
00125                                2.);
00126 
00127   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-sigma");
00128   cpl_parameterlist_append(list, p);
00129 
00130   /* Wavelength Calibration */
00131 /* guess value for fwhm of emission lines */
00132   p = cpl_parameter_new_value("sinfoni.wavecal.fwhm",
00133                   CPL_TYPE_DOUBLE,
00134                               "FWHM: initial guess value for the fwhm of "
00135                               "the Gaussian used for the line fit",
00136                               "sinfoni.wavecal",
00137                                2.83);
00138 
00139   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-fwhm");
00140   cpl_parameterlist_append(list, p);
00141 
00142 /* minimum amplitude of a line to be fitted */
00143   p = cpl_parameter_new_value("sinfoni.wavecal.min_amplitude",
00144                   CPL_TYPE_DOUBLE,
00145                               "Minimum Of Amplitude: "
00146                               "of the Gaussian to do the fit",
00147                               "sinfoni.wavecal",
00148                               5.);
00149 
00150   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-min_amplitude");
00151   cpl_parameterlist_append(list, p);
00152 
00153 /* maximal residual value for a valid fit */
00154   p = cpl_parameter_new_value("sinfoni.wavecal.max_residual",
00155                   CPL_TYPE_DOUBLE,
00156                               "Maximum Residuals value: "
00157                               "beyond this value the fit is rejected",
00158                               "sinfoni.wavecal",
00159                               0.5);
00160 
00161   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-max_residual");
00162   cpl_parameterlist_append(list, p);
00163 
00164 /* # of polynomial coefficients used for the dispersion relation */
00165   p = cpl_parameter_new_value("sinfoni.wavecal.n_a_coefficients",
00166                   CPL_TYPE_INT,
00167                               "Number of A coefficients: number of "
00168                               "polynomial coefficients for the "
00169                               "dispersion relation",
00170                               "sinfoni.wavecal",
00171                               4);
00172 
00173   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-n_a_coeffs");
00174   cpl_parameterlist_append(list, p);
00175 
00176  /* # of polynomial coefficients used for the fit of 
00177     the dispersion coefficients */
00178   p = cpl_parameter_new_value("sinfoni.wavecal.n_b_coefficients",
00179                   CPL_TYPE_INT,
00180                               "Number of B coefficients: "
00181                               "number of polynomial coefficients for the "
00182                               "polynomial fit of the dispersion coefficients",
00183                               "sinfoni.wavecal",
00184                               2);
00185 
00186   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-n_b_coeffs");
00187   cpl_parameterlist_append(list, p);
00188 
00189  /* minimal factor of the standard deviation of the fit coefficients */
00190   p = cpl_parameter_new_value("sinfoni.wavecal.sigma_factor",
00191                   CPL_TYPE_DOUBLE,
00192                               "Sigma Factor: "
00193                               "Factor of the standard deviation of the "
00194                               "polynomial coefficients of the dispersion "
00195                               "relation beyond which the coefficients are "
00196                               "not used for the fit",
00197                               "sinfoni.wavecal",
00198                               1.5);
00199 
00200   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-sigma_factor");
00201   cpl_parameterlist_append(list, p);
00202 
00203   /* indicates if the parameterized dispersion relation coefficients 
00204        should be written into an ASCII file */
00205   p = cpl_parameter_new_value("sinfoni.wavecal.write_coeffs_ind",
00206                   CPL_TYPE_BOOL,
00207                               "Write Coefficients Index: "
00208                               "indicates if the coefficients should "
00209                               "be written into a file or not",
00210                               "sinfoni.wavecal",
00211                               TRUE);
00212 
00213   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-wcoeff_ind");
00214   cpl_parameterlist_append(list, p);
00215 
00216   /* indicates if the fit parameters should be written into an ASCII file */
00217   p = cpl_parameter_new_value("sinfoni.wavecal.write_par_ind",
00218                   CPL_TYPE_BOOL,
00219                               "Write Parameter Index: "
00220                               "indicates if the fit parameters should "
00221                               "be written into a file or not ",
00222                               "sinfoni.wavecal",
00223                               TRUE);
00224 
00225   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-par_ind");
00226   cpl_parameterlist_append(list, p);
00227 
00228 
00229 
00230 
00231 
00232 
00233 
00234 
00235 
00236   /* dispersion relation */
00237 
00238 
00239 
00240   /* minimal distance of the slitlets in spectral direction */
00241   p = cpl_parameter_new_value("sinfoni.wavecal.pixel_dist",
00242                   CPL_TYPE_INT,
00243                          "Minimal Slitlets's Distance in spectral direction",
00244                               "sinfoni.wavecal",
00245                               15);
00246 
00247   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-pixel_dist");
00248   cpl_parameterlist_append(list, p);
00249 
00250 
00251 
00252   /* allowed pixel position tolerance between estimated and fitted line 
00253      position
00254   */
00255 
00256   p = cpl_parameter_new_value("sinfoni.wavecal.pixel_tol",
00257                   CPL_TYPE_DOUBLE,
00258                               "Pixel Tolerance: allowed pixel position "
00259                               "tolerance between estimated and fitted "
00260                   "line position",
00261                               "sinfoni.wavecal",
00262                               5.0);
00263 
00264   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-pixel_tol");
00265   cpl_parameterlist_append(list, p);
00266 
00267   /* Wavelength Map */
00268 /* indicator if wavelength map should be generated or not */
00269   p = cpl_parameter_new_value("sinfoni.wavecal.wave_map_ind",
00270                   CPL_TYPE_BOOL,
00271                               "Wavelength Map Indicator: "
00272                               "indicates if the wavelength calibration map "
00273                               "should be generated (TRUE) or not (FALSE)",
00274                               "sinfoni.wavecal",
00275                               FALSE);
00276 
00277   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-wave_map_ind");
00278   cpl_parameterlist_append(list, p);
00279 
00280   /* magnifying factor for FFT */
00281   p = cpl_parameter_new_value("sinfoni.wavecal.mag_factor",
00282                   CPL_TYPE_INT,
00283                               "Magnificator Factor: "
00284                               "magnifying factor for the number of pixels "
00285                               "in the columns needed for FFT",
00286                               "sinfoni.wavecal",
00287                               8);
00288 
00289   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-mag_factor");
00290   cpl_parameterlist_append(list, p);
00291 
00292 /* Fits Slits */
00293 /* indicator if the fit of the slit edge positions is carried through or not */
00294   p = cpl_parameter_new_value("sinfoni.wavecal.slit_pos_indicator",
00295                   CPL_TYPE_BOOL,
00296                               "Slit Position Indicator: "
00297                               "indicates if the fits of the slitlet "
00298                               "edge positions should be carried "
00299                               "through or not",
00300                               "sinfoni.wavecal",
00301                               TRUE);
00302 
00303   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-slit_pos_ind");
00304   cpl_parameterlist_append(list, p);
00305 
00306 /* indicator if the fit model function is a Boltzmann function or not */
00307   p = cpl_parameter_new_value("sinfoni.wavecal.fit_boltz_indicator",
00308                   CPL_TYPE_BOOL ,
00309                               "Fit Boltzmann Indicator: "
00310                               "indicates if the fits of the slitlet edge "
00311                               "positions is carried trough by using a "
00312                               "Boltzmann function as model function",
00313                               "sinfoni.wavecal",
00314                               TRUE);
00315 
00316   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-fit_boltz_ind");
00317   cpl_parameterlist_append(list, p);
00318 
00319 /* indicator if the fit model function 
00320    is a simple edge function or not */
00321   p = cpl_parameter_new_value("sinfoni.wavecal.fit_edge_indicator",
00322                   CPL_TYPE_BOOL,
00323                               "Fit Edge Indicator: "
00324                               "indicates if the fits of the slitlet edge "
00325                               "positions is carried through by using a "
00326                               "simple edge function as model function",
00327                               "sinfoni.wavecal",
00328                               FALSE);
00329 
00330   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-fit_edge_ind");
00331   cpl_parameterlist_append(list, p);
00332 
00333  /* indicator if the fit guess position are 
00334     user given or calculated automatically */
00335 
00336   p = cpl_parameter_new_value("sinfoni.wavecal.estimate_indicator",
00337                   CPL_TYPE_BOOL,
00338                               "Estimate Indicator: "
00339                               "indicates if the fits of the slitlet edge "
00340                               "positions is carried through by using a list "
00341                               "of estimated guess positions in a file (TRUE)"
00342                               "or if the initial positions are calculated "
00343                               "automatically (FALSE). The estimation case "
00344                               "is more stable",
00345                               "sinfoni.wavecal",
00346                               FALSE);
00347 
00348   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-estimate_ind");
00349   cpl_parameterlist_append(list, p);
00350 
00351 /* pixel length of the row box within which the fit of the 
00352    slitlet positions is carried out*/
00353 
00354   p = cpl_parameter_new_value("sinfoni.wavecal.box_length",
00355                   CPL_TYPE_INT,
00356                               "Box Length: "
00357                               "pixel length of the row box within "
00358                               "which the fit is carried out",
00359                               "sinfoni.wavecal",
00360                               32);
00361 
00362   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-box_len");
00363   cpl_parameterlist_append(list, p);
00364 
00365 /* float box half width in spectral direction */
00366   p = cpl_parameter_new_value("sinfoni.wavecal.y_box",
00367                   CPL_TYPE_DOUBLE,
00368                               "Y Box: half width of a small box in "
00369                               "spectral direction within which the "
00370                               "maximal intensity pixel is searched",
00371                               "sinfoni.wavecal",
00372                               5.);
00373 
00374  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-y_box");
00375   cpl_parameterlist_append(list, p);
00376 
00377 
00378 /* maximal tolerable difference to the expected slitlet positions */
00379   p = cpl_parameter_new_value("sinfoni.wavecal.diff_tol",
00380                   CPL_TYPE_DOUBLE,
00381                               "Difference Tolearance: "
00382                               "maximal tolerable difference of the "
00383                               "resulting fit positions of the slitlet "
00384                               "edges with respect to the expected positions",
00385                               "sinfoni.wavecal",
00386                               2.);
00387 
00388   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-diff_toll");
00389   cpl_parameterlist_append(list, p);
00390 
00391 
00392 
00393  p = cpl_parameter_new_value("sinfoni.wavecal.qc_thresh_min",
00394                   CPL_TYPE_INT,
00395                               "qc_thresh_min",
00396                               "sinfoni.wavecal",
00397                               0);
00398 
00399   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-qc_thresh_min");
00400   cpl_parameterlist_append(list, p);
00401 
00402 
00403   p = cpl_parameter_new_value("sinfoni.wavecal.qc_thresh_max",
00404                   CPL_TYPE_INT,
00405                               "qc_thresh_max",
00406                               "sinfoni.wavecal",
00407                               49000);
00408 
00409   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-qc_thresh_max");
00410   cpl_parameterlist_append(list, p);
00411 
00412 
00413   /*Resampling */
00414  /* number of coefficients for the polynomial interpolation */
00415   p = cpl_parameter_new_value("sinfoni.wavecal.n_coeffs",
00416                   CPL_TYPE_INT,
00417                               "number of coefficients for the polynomial "
00418                               "interpolation ",
00419                               "sinfoni.wavecal",
00420                                3);
00421 
00422   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"wcal-no_coeffs");
00423   cpl_parameterlist_append(list, p);
00424 
00425 
00426 
00427 }

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