00001 /* $Id: sinfoni_prepare_stacked_frames_config.c,v 1.28 2005/07/28 09:11: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: 2005/07/28 09:11:08 $
00023 * $Revision: 1.28 $
00024 * $Name: $
00025 */
00026
00027 /****************************************************************
00028 * Prepare_Stacked_Frames Frames Data Reduction Parameter Initialization *
00029 ****************************************************************/
00030
00031 #include "sinfoni_prepare_stacked_frames_config.h"
00032
00033 void
00034 sinfoni_prepare_stacked_frames_config_add(cpl_parameterlist *list)
00035 {
00036
00037 cpl_parameter *p;
00038
00039 if (!list) {
00040 return;
00041 }
00042
00043 /*
00044 --------------------------------------------------------------------------
00045 Clean Mean
00046 --------------------------------------------------------------------------
00047 */
00048 /* the fraction [0...1] of rejected low intensity pixels when taking
00049 the average of columns */
00050 p = cpl_parameter_new_range("sinfoni.stacked.low_rejection",
00051 CPL_TYPE_DOUBLE,
00052 "lower rejection",
00053 "sinfoni.stacked",
00054 0.1,0.0,1.0);
00055
00056 cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI, "stack-lo_rej");
00057 cpl_parameterlist_append(list, p);
00058
00059 /* the fraction [0...1] of rejected high intensity pixels when taking
00060 the average of columns */
00061 p = cpl_parameter_new_range("sinfoni.stacked.high_rejection",
00062 CPL_TYPE_DOUBLE,
00063 "higher rejection",
00064 "sinfoni.stacked",
00065 0.1,0.0,1.0);
00066
00067 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-hi_rej");
00068 cpl_parameterlist_append(list, p);
00069
00070
00071 /*
00072 --------------------------------------------------------------------------
00073 Flat Field
00074 --------------------------------------------------------------------------
00075 */
00076 /* indicates if flatfielding is carried through or not */
00077 p = cpl_parameter_new_value("sinfoni.stacked.flat_index",
00078 CPL_TYPE_BOOL,
00079 "Flat Index: ",
00080 "sinfoni.stacked",
00081 TRUE);
00082
00083 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-flat_ind");
00084 cpl_parameterlist_append(list, p);
00085
00086
00087 /*
00088 --------------------------------------------------------------------------
00089 Bad Pixel
00090 --------------------------------------------------------------------------
00091 */
00092 /* indicates if the bad pixels should be interpolated or not */
00093 p = cpl_parameter_new_enum("sinfoni.stacked.mask_index",
00094 CPL_TYPE_INT,
00095 "BP Mask Interpolation Switch: "
00096 "indicates if the bad pixel mask should be "
00097 "applied (1) or not (0) ",
00098 /*
00099 "2: indicates that "
00100 "the bad pixels should be interpolated by "
00101 "using bezier splines",
00102 */
00103 "sinfoni.stacked",
00104 1,
00105 2,0,1); /* there was also 2 allowed */
00106
00107 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_ind");
00108 cpl_parameterlist_append(list, p);
00109
00110 /* indicates if the bad pixels should be indicated (TRUE) or interpolated (FALSE)*/
00111 p = cpl_parameter_new_value("sinfoni.stacked.ind_index",
00112 CPL_TYPE_BOOL,
00113 "indicates if the bad pixels should be "
00114 "indicated (yes) or interpolated (no)",
00115 "sinfoni.stacked",
00116 FALSE);
00117
00118 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-ind_ind");
00119 cpl_parameterlist_append(list, p);
00120
00121
00122 /* maximal pixel distance from bad pixel to take valid pixels */
00123 p = cpl_parameter_new_value("sinfoni.stacked.mask_rad",
00124 CPL_TYPE_INT,
00125 "Max distance bad-good pix: ",
00126 "sinfoni.stacked",
00127 4);
00128
00129 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-mask_rad");
00130 cpl_parameterlist_append(list, p);
00131
00132 /* Temporally removed options: index_list, sigma-factor, used if mask_ind=2,3 */
00133 /* file list containing the index files for bezier interpolation */
00134 /*
00135 p = cpl_parameter_new_value("sinfoni.stacked.index_list",
00136 CPL_TYPE_STRING,
00137 "Contain Index Files: ",
00138 "sinfoni.stacked",
00139 "indexlist");
00140
00141 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-index_list");
00142 cpl_parameterlist_append(list, p);
00143 */
00144
00145 /* sigmaFactor for bad pixel search in method maskInd = 3 */
00146 /*
00147 p = cpl_parameter_new_value("sinfoni.stacked.sigma_factor",
00148 CPL_TYPE_DOUBLE,
00149 "Sigma Factor for bp search: ",
00150 "sinfoni.stacked",
00151 3.);
00152
00153 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-sigma_factor");
00154 cpl_parameterlist_append(list, p);
00155 */
00156
00157 /*
00158 --------------------------------------------------------------------------
00159 Interleaving: only to support dither mode. We comment
00160 --------------------------------------------------------------------------
00161 */
00162 /* indicates if interleaving should be carried through */
00163 /*
00164 p = cpl_parameter_new_value("sinfoni.stacked.inter_index",
00165 CPL_TYPE_BOOL,
00166 "Interleaving Switch: ",
00167 "sinfoni.stacked",
00168 FALSE);
00169
00170 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-inter_ind");
00171 cpl_parameterlist_append(list, p);
00172 */
00173
00174 /* number of image rows from which the general offset between the frames is
00175 determined */
00176 /*
00177 p = cpl_parameter_new_value("sinfoni.stacked.no_rows",
00178 CPL_TYPE_INT,
00179 "Number Of Rows",
00180 "sinfoni.stacked",
00181 400);
00182
00183 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-no_rows");
00184 cpl_parameterlist_append(list, p);
00185 */
00186
00187 /*
00188 --------------------------------------------------------------------------
00189 Gauss Convolution
00190 --------------------------------------------------------------------------
00191 */
00192 /* indicates if a Gaussian convolution is applied or not */
00193 p = cpl_parameter_new_value("sinfoni.stacked.gauss_index",
00194 CPL_TYPE_BOOL,
00195 "Gaussian Convolution Switch: ",
00196 "sinfoni.stacked",
00197 FALSE);
00198
00199 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-gauss_ind");
00200 cpl_parameterlist_append(list, p);
00201
00202 /* kernel half width of the Gaussian response function */
00203 p = cpl_parameter_new_value("sinfoni.stacked.kernel_half_width",
00204 CPL_TYPE_INT,
00205 "Kernel Half Width",
00206 "sinfoni.stacked",
00207 2);
00208
00209 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-khw");
00210 cpl_parameterlist_append(list, p);
00211 /*
00212 --------------------------------------------------------------------------
00213 Shift Frames (To be used?)
00214 --------------------------------------------------------------------------
00215 */
00216 /* Suppressed in release 1.1.0 */
00217 /* indicates if a Gaussian convolution is applied or not */
00218 /*
00219 p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_index",
00220 CPL_TYPE_BOOL,
00221 "Shift Frame Switch: ",
00222 "sinfoni.stacked",
00223 FALSE);
00224
00225 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ind");
00226 cpl_parameterlist_append(list, p);
00227 */
00228 /*type of interpolation to be used (0=polynomial , 1=cubic spline) */
00229 /*
00230 p = cpl_parameter_new_enum("sinfoni.stacked.shift_frame_type",
00231 CPL_TYPE_INT,
00232 "Shift Frame Type: 0 polynomial, 1 cubic,",
00233 "sinfoni.stacked",
00234 1,
00235 2,0,1);
00236
00237 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_typ");
00238 cpl_parameterlist_append(list, p);
00239 */
00240 /* order of the interpolation for the spectral shift of frames */
00241 /*
00242 p = cpl_parameter_new_value("sinfoni.stacked.shift_frame_order",
00243 CPL_TYPE_INT,
00244 "Shift Frame Order",
00245 "sinfoni.stacked",
00246 2);
00247
00248 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-shft_ord");
00249 cpl_parameterlist_append(list, p);
00250 */
00251
00252 /*
00253 --------------------------------------------------------------------------
00254 WarpFix
00255 --------------------------------------------------------------------------
00256 */
00257 p = cpl_parameter_new_value("sinfoni.stacked.warpfix_ind",
00258 CPL_TYPE_BOOL,
00259 "Warp Fix Index: ",
00260 "sinfoni.stacked",
00261 TRUE);
00262
00263 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_ind");
00264 cpl_parameterlist_append(list, p);
00265
00266
00267 p = cpl_parameter_new_enum("sinfoni.stacked.warpfix_kernel",
00268 CPL_TYPE_STRING,
00269 "Warpfix kernel: ",
00270 "sinfoni.stacked",
00271 "tanh",
00272 6,"tanh","sinc","sinc2","lanczos","hamming","hann");
00273
00274 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-warpfix_kernel");
00275 cpl_parameterlist_append(list, p);
00276
00277
00278 p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_min",
00279 CPL_TYPE_INT,
00280 "qc_thresh_min",
00281 "sinfoni.stack",
00282 0);
00283
00284 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_min");
00285 cpl_parameterlist_append(list, p);
00286
00287
00288 p = cpl_parameter_new_value("sinfoni.stacked.qc_thresh_max",
00289 CPL_TYPE_INT,
00290 "qc_thresh_max",
00291 "sinfoni.stack",
00292 49000);
00293
00294 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"stack-qc_thresh_max");
00295 cpl_parameterlist_append(list, p);
00296
00297 }
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001