00001 /* $Id: sinfo_prepare_stacked_frames_config.c,v 1.3 2006/12/01 12:45:36 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: 2006/12/01 12:45:36 $ 00023 * $Revision: 1.3 $ 00024 * $Name: $ 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 /* 00104 -------------------------------------------------------------------------- 00105 Bad Pixel 00106 -------------------------------------------------------------------------- 00107 */ 00108 /* indicates if the bad pixels should be interpolated or not */ 00109 p = cpl_parameter_new_enum("sinfoni.stacked.mask_index", 00110 CPL_TYPE_INT, 00111 "BP Mask Interpolation Switch: " 00112 "indicates if the bad pixel mask should be " 00113 "applied (1) or not (0) ", 00114 /* 00115 "2: indicates that " 00116 "the bad pixels should be interpolated by " 00117 "using bezier splines", 00118 */ 00119 "sinfoni.stacked", 00120 1, 00121 2,0,1); /* there was also 2 allowed */ 00122 00123 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_ind"); 00124 cpl_parameterlist_append(list, p); 00125 00126 /* indicates if the bad pixels should be indicated (TRUE) or 00127 interpolated (FALSE)*/ 00128 p = cpl_parameter_new_value("sinfoni.stacked.ind_index", 00129 CPL_TYPE_BOOL, 00130 "indicates if the bad pixels should be " 00131 "indicated (yes) or interpolated (no)", 00132 "sinfoni.stacked", 00133 FALSE); 00134 00135 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-ind_ind"); 00136 cpl_parameterlist_append(list, p); 00137 00138 00139 /* maximal pixel distance from bad pixel to take valid pixels */ 00140 p = cpl_parameter_new_value("sinfoni.stacked.mask_rad", 00141 CPL_TYPE_INT, 00142 "Max distance bad-good pix: ", 00143 "sinfoni.stacked", 00144 4); 00145 00146 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_rad"); 00147 cpl_parameterlist_append(list, p); 00148 00149 /* Temporally removed options: index_list, sigma-factor, 00150 used if mask_ind=2,3 */ 00151 /* file list containing the index files for bezier interpolation */ 00152 /* 00153 p = cpl_parameter_new_value("sinfoni.stacked.index_list", 00154 CPL_TYPE_STRING, 00155 "Contain Index Files: ", 00156 "sinfoni.stacked", 00157 "indexlist"); 00158 00159 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-index_list"); 00160 cpl_parameterlist_append(list, p); 00161 */ 00162 00163 /* sigmaFactor for bad pixel search in method maskInd = 3 */ 00164 /* 00165 p = cpl_parameter_new_value("sinfoni.stacked.sigma_factor", 00166 CPL_TYPE_DOUBLE, 00167 "Sigma Factor for bp search: ", 00168 "sinfoni.stacked", 00169 3.); 00170 00171 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-sigma_factor"); 00172 cpl_parameterlist_append(list, p); 00173 */ 00174 00175 /* 00176 -------------------------------------------------------------------------- 00177 Interleaving: only to support dither mode. We comment 00178 -------------------------------------------------------------------------- 00179 */ 00180 /* indicates if interleaving should be carried through */ 00181 /* 00182 p = cpl_parameter_new_value("sinfoni.stacked.inter_index", 00183 CPL_TYPE_BOOL, 00184 "Interleaving Switch: ", 00185 "sinfoni.stacked", 00186 FALSE); 00187 00188 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-inter_ind"); 00189 cpl_parameterlist_append(list, p); 00190 */ 00191 00192 /* number of image rows from which the general offset between the frames is 00193 determined */ 00194 /* 00195 p = cpl_parameter_new_value("sinfoni.stacked.no_rows", 00196 CPL_TYPE_INT, 00197 "Number Of Rows", 00198 "sinfoni.stacked", 00199 400); 00200 00201 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-no_rows"); 00202 cpl_parameterlist_append(list, p); 00203 */ 00204 00205 /* 00206 -------------------------------------------------------------------------- 00207 Gauss Convolution 00208 -------------------------------------------------------------------------- 00209 */ 00210 /* indicates if a Gaussian convolution is applied or not */ 00211 p = cpl_parameter_new_value("sinfoni.stacked.gauss_index", 00212 CPL_TYPE_BOOL, 00213 "Gaussian Convolution Switch: ", 00214 "sinfoni.stacked", 00215 FALSE); 00216 00217 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-gauss_ind"); 00218 cpl_parameterlist_append(list, p); 00219 00220 /* kernel half width of the Gaussian response function */ 00221 p = cpl_parameter_new_value("sinfoni.stacked.kernel_half_width", 00222 CPL_TYPE_INT, 00223 "Kernel Half Width", 00224 "sinfoni.stacked", 00225 2); 00226 00227 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-khw"); 00228 cpl_parameterlist_append(list, p); 00229 /* 00230 -------------------------------------------------------------------------- 00231 Shift Frames (To be used?) 00232 -------------------------------------------------------------------------- 00233 */ 00234 /* Suppressed in release 1.1.0 */ 00235 /* indicates if a Gaussian convolution is applied or not */ 00236 /* 00237 p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_index", 00238 CPL_TYPE_BOOL, 00239 "Shift Frame Switch: ", 00240 "sinfoni.stacked", 00241 FALSE); 00242 00243 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ind"); 00244 cpl_parameterlist_append(list, p); 00245 */ 00246 /*type of interpolation to be used (0=polynomial , 1=cubic spline) */ 00247 /* 00248 p = cpl_parameter_new_enum("sinfoni.stacked.shift_frame_type", 00249 CPL_TYPE_INT, 00250 "Shift Frame Type: 0 polynomial, 1 cubic,", 00251 "sinfoni.stacked", 00252 1, 00253 2,0,1); 00254 00255 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_typ"); 00256 cpl_parameterlist_append(list, p); 00257 */ 00258 /* order of the interpolation for the spectral shift of frames */ 00259 /* 00260 p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_order", 00261 CPL_TYPE_INT, 00262 "Shift Frame Order", 00263 "sinfoni.stacked", 00264 2); 00265 00266 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ord"); 00267 cpl_parameterlist_append(list, p); 00268 */ 00269 00270 /* 00271 -------------------------------------------------------------------------- 00272 WarpFix 00273 -------------------------------------------------------------------------- 00274 */ 00275 p = cpl_parameter_new_value("sinfoni.stacked.warpfix_ind", 00276 CPL_TYPE_BOOL, 00277 "Warp Fix Index: ", 00278 "sinfoni.stacked", 00279 TRUE); 00280 00281 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_ind"); 00282 cpl_parameterlist_append(list, p); 00283 00284 00285 p = cpl_parameter_new_enum("sinfoni.stacked.warpfix_kernel", 00286 CPL_TYPE_STRING, 00287 "Warpfix kernel: ", 00288 "sinfoni.stacked", 00289 "tanh", 00290 6,"tanh","sinc","sinc2", 00291 "lanczos","hamming","hann"); 00292 00293 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_kernel"); 00294 cpl_parameterlist_append(list, p); 00295 00296 00297 p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_min", 00298 CPL_TYPE_INT, 00299 "qc_thresh_min", 00300 "sinfoni.stack", 00301 0); 00302 00303 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_min"); 00304 cpl_parameterlist_append(list, p); 00305 00306 00307 p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_max", 00308 CPL_TYPE_INT, 00309 "qc_thresh_max", 00310 "sinfoni.stack", 00311 49000); 00312 00313 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_max"); 00314 cpl_parameterlist_append(list, p); 00315 00316 }
1.4.4