sinfoni_wavecal_config.c

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

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