sinfo_prepare_stacked_frames_config.c

00001 /* $Id: sinfo_prepare_stacked_frames_config.c,v 1.8 2008/02/27 15:10:05 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: 2008/02/27 15:10:05 $
00023  * $Revision: 1.8 $
00024  * $Name: HEAD $
00025  */
00026 
00027  /**************************************************************************
00028   * Prepare_Stacked_Frames Frames Data Reduction Parameter Initialization  *
00029   **************************************************************************/
00030 
00031 #ifdef HAVE_CONFIG_H
00032 #  include <config.h>
00033 #endif
00034 
00035 #include "sinfo_prepare_stacked_frames_config.h"
00049 void
00050  sinfo_prepare_stacked_frames_config_add(cpl_parameterlist *list)
00051 {
00052 
00053   cpl_parameter *p;
00054 
00055   if (!list) {
00056     return;
00057   }
00058 
00059 /*
00060   --------------------------------------------------------------------------
00061   Clean Mean 
00062   --------------------------------------------------------------------------
00063  */
00064 /* the fraction [0...1] of rejected low intensity pixels when taking 
00065 the average of columns */
00066   p = cpl_parameter_new_range("sinfoni.stacked.low_rejection",
00067                   CPL_TYPE_DOUBLE,
00068                               "lower rejection",
00069                               "sinfoni.stacked",
00070                               0.1,0.0,1.0);
00071 
00072   cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI, "stack-lo_rej");
00073   cpl_parameterlist_append(list, p);
00074 
00075  /* the fraction [0...1] of rejected high intensity pixels when taking 
00076 the average of columns */
00077   p = cpl_parameter_new_range("sinfoni.stacked.high_rejection",
00078                   CPL_TYPE_DOUBLE,
00079                               "higher rejection",
00080                               "sinfoni.stacked",
00081                               0.1,0.0,1.0);
00082 
00083   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-hi_rej");
00084   cpl_parameterlist_append(list, p);
00085 
00086 
00087 /*
00088   --------------------------------------------------------------------------
00089   Flat Field 
00090   --------------------------------------------------------------------------
00091  */
00092 /* indicates if flatfielding is carried through or not */
00093   p = cpl_parameter_new_value("sinfoni.stacked.flat_index",
00094                   CPL_TYPE_BOOL,
00095                               "Flat Index: ",
00096                               "sinfoni.stacked",
00097                               TRUE);
00098 
00099   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-flat_ind");
00100   cpl_parameterlist_append(list, p);
00101 
00102 
00103 /* indicates if flatfield is normalized to itself 
00104    (to remove lamp response curve) */
00105   p = cpl_parameter_new_enum("sinfoni.stacked.mflat_norm_smooth",
00106                               CPL_TYPE_INT,
00107                               "Normalize master flat to its smoothed value "
00108                               "(to remove lamp response curve). "
00109                               "0 (no smooth). 1 (apply fft filter along y)."
00110                               "2 (apply running median filter along y).",
00111                               "sinfoni.stacked",
00112                              0,3,0,1,2);
00113 
00114   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mflat_norm_smooth");
00115   cpl_parameterlist_append(list, p);
00116 
00117 
00118 /* indicates if flatfield is normalized to itself 
00119    (to remove lamp response curve) */
00120   p = cpl_parameter_new_range("sinfoni.stacked.mflat_smooth_rad",
00121                   CPL_TYPE_INT,
00122                               "Normalization smoothing radii ",
00123                               "sinfoni.stacked",
00124                               16,3,2048);
00125 
00126   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mflat_smooth_rad");
00127   cpl_parameterlist_append(list, p);
00128 
00129 
00130 /*
00131   --------------------------------------------------------------------------
00132   Bad Pixel 
00133   --------------------------------------------------------------------------
00134  */
00135 /* indicates if the bad pixels should be interpolated or not */
00136   p = cpl_parameter_new_enum("sinfoni.stacked.mask_index",
00137                   CPL_TYPE_INT,
00138                               "BP Mask Interpolation Switch: "
00139                               "indicates if the bad pixel mask should be "
00140                  "applied (1) or not (0) ",
00141                  /*
00142                               "2: indicates that "
00143                               "the bad pixels should be interpolated by "
00144                               "using bezier splines",
00145                  */
00146                               "sinfoni.stacked",
00147                                1,
00148                  2,0,1); /* there was also 2 allowed */
00149 
00150   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_ind");
00151   cpl_parameterlist_append(list, p);
00152 
00153 /* indicates if the bad pixels should be indicated (TRUE) or 
00154    interpolated (FALSE)*/
00155   p = cpl_parameter_new_value("sinfoni.stacked.ind_index",
00156                   CPL_TYPE_BOOL,
00157                               "indicates if the bad pixels should be "
00158                               "indicated (yes) or interpolated (no)",
00159                               "sinfoni.stacked",
00160                               FALSE);
00161 
00162   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-ind_ind");
00163   cpl_parameterlist_append(list, p);
00164 
00165 
00166 /* maximal pixel distance from bad pixel to take valid pixels */
00167   p = cpl_parameter_new_value("sinfoni.stacked.mask_rad",
00168                   CPL_TYPE_INT,
00169                               "Max distance bad-good pix: ",
00170                               "sinfoni.stacked",
00171                               4);
00172 
00173   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_rad");
00174   cpl_parameterlist_append(list, p);
00175 
00176   /* Temporally removed options: index_list, sigma-factor, 
00177      used if mask_ind=2,3 */
00178   /* file list containing the index files for bezier interpolation */
00179   /*
00180   p = cpl_parameter_new_value("sinfoni.stacked.index_list",
00181                   CPL_TYPE_STRING,
00182                               "Contain Index Files: ",
00183                               "sinfoni.stacked",
00184                               "indexlist");
00185 
00186   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-index_list");
00187   cpl_parameterlist_append(list, p);
00188   */
00189 
00190   /* sigmaFactor for bad pixel search in method maskInd = 3 */
00191   /*
00192   p = cpl_parameter_new_value("sinfoni.stacked.sigma_factor",
00193                   CPL_TYPE_DOUBLE,
00194                               "Sigma Factor for bp search: ",
00195                               "sinfoni.stacked",
00196                               3.);
00197 
00198   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-sigma_factor");
00199   cpl_parameterlist_append(list, p);
00200   */
00201  
00202 /*
00203   --------------------------------------------------------------------------
00204   Interleaving: only to support dither mode. We comment 
00205   --------------------------------------------------------------------------
00206  */
00207   /* indicates if interleaving should be carried through */
00208   /*
00209   p = cpl_parameter_new_value("sinfoni.stacked.inter_index",
00210                   CPL_TYPE_BOOL,
00211                               "Interleaving Switch: ",
00212                               "sinfoni.stacked",
00213                               FALSE);
00214 
00215   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-inter_ind");
00216   cpl_parameterlist_append(list, p);
00217   */
00218 
00219 /* number of image rows from which the general offset between the frames is 
00220    determined */
00221 /*
00222   p = cpl_parameter_new_value("sinfoni.stacked.no_rows",
00223                   CPL_TYPE_INT,
00224                               "Number Of Rows",
00225                               "sinfoni.stacked",
00226                               400);
00227 
00228   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-no_rows");
00229   cpl_parameterlist_append(list, p);
00230 */
00231 
00232 /*
00233   --------------------------------------------------------------------------
00234   Gauss Convolution
00235   --------------------------------------------------------------------------
00236  */
00237   /* indicates if a Gaussian convolution is applied or not */
00238   p = cpl_parameter_new_value("sinfoni.stacked.gauss_index",
00239                   CPL_TYPE_BOOL,
00240                               "Gaussian Convolution Switch: ",
00241                               "sinfoni.stacked",
00242                               FALSE);
00243 
00244   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-gauss_ind");
00245   cpl_parameterlist_append(list, p);
00246 
00247 /* kernel half width of the Gaussian response function */
00248   p = cpl_parameter_new_value("sinfoni.stacked.kernel_half_width",
00249                   CPL_TYPE_INT,
00250                               "Kernel Half Width",
00251                               "sinfoni.stacked",
00252                                2);
00253 
00254   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-khw");
00255   cpl_parameterlist_append(list, p);
00256 /*
00257   --------------------------------------------------------------------------
00258   Shift Frames (To be used?)
00259   --------------------------------------------------------------------------
00260  */
00261   /* Suppressed in release 1.1.0 */
00262   /* indicates if a Gaussian convolution is applied or not */
00263   /*
00264   p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_index",
00265                   CPL_TYPE_BOOL,
00266                               "Shift Frame Switch: ",
00267                               "sinfoni.stacked",
00268                               FALSE);
00269 
00270   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ind");
00271   cpl_parameterlist_append(list, p);
00272   */
00273   /*type of interpolation to be used (0=polynomial , 1=cubic spline) */
00274   /*
00275   p = cpl_parameter_new_enum("sinfoni.stacked.shift_frame_type",
00276                   CPL_TYPE_INT,
00277                               "Shift Frame Type: 0 polynomial, 1 cubic,",
00278                               "sinfoni.stacked",
00279                    1,
00280                                2,0,1);
00281 
00282   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_typ");
00283   cpl_parameterlist_append(list, p);
00284   */
00285   /* order of the interpolation for the spectral shift of frames */
00286   /*
00287   p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_order",
00288                   CPL_TYPE_INT,
00289                               "Shift Frame Order",
00290                               "sinfoni.stacked",
00291                                2);
00292 
00293   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ord");
00294   cpl_parameterlist_append(list, p);
00295   */
00296 
00297 /*
00298   --------------------------------------------------------------------------
00299   WarpFix
00300   --------------------------------------------------------------------------
00301  */
00302   p = cpl_parameter_new_value("sinfoni.stacked.warpfix_ind",
00303                   CPL_TYPE_BOOL,
00304                               "Warp Fix Index: ",
00305                               "sinfoni.stacked",
00306                               TRUE);
00307 
00308   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_ind");
00309   cpl_parameterlist_append(list, p);
00310 
00311  
00312   p = cpl_parameter_new_enum("sinfoni.stacked.warpfix_kernel",
00313                   CPL_TYPE_STRING,
00314                  "Warpfix kernel: ",
00315                               "sinfoni.stacked",
00316                  "tanh",
00317                                6,"tanh","sinc","sinc2",
00318                               "lanczos","hamming","hann");
00319 
00320   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_kernel");
00321   cpl_parameterlist_append(list, p);
00322 
00323 
00324  p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_min",
00325                   CPL_TYPE_INT,
00326                               "qc_thresh_min",
00327                               "sinfoni.stack",
00328                               0);
00329 
00330   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_min");
00331   cpl_parameterlist_append(list, p);
00332 
00333 
00334   p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_max",
00335                   CPL_TYPE_INT,
00336                               "qc_thresh_max",
00337                               "sinfoni.stack",
00338                               49000);
00339 
00340   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_max");
00341   cpl_parameterlist_append(list, p);
00342 
00343 
00344 
00345   /* indicates if sky raw frame should be subtracted (TRUE) or not (FALSE) */
00346   p = cpl_parameter_new_value("sinfoni.stacked.sub_raw_sky",
00347                   CPL_TYPE_BOOL,
00348                               "indicates if the raw sky frame should be "
00349                               "subtracted (TRUE) or (FALSE)",
00350                               "sinfoni.stacked",
00351                               TRUE);
00352 
00353   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-sub_raw_sky");
00354   cpl_parameterlist_append(list, p);
00355 
00356 }

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