SINFONI Pipeline Reference Manual  2.5.2
sinfo_objnod_config.c
1 /* $Id: sinfo_objnod_config.c,v 1.11 2012-03-03 09:50:08 amodigli Exp $
2  *
3  * This file is part of the CPL (Common Pipeline Library)
4  * Copyright (C) 2002 European Southern Observatory
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 /*
21  * $Author: amodigli $
22  * $Date: 2012-03-03 09:50:08 $
23  * $Revision: 1.11 $
24  * $Name: not supported by cvs2svn $
25  */
26 
27 /****************************************************************
28  * Objnod Frames Data Reduction Parameter Initialization *
29  ****************************************************************/
30 #ifdef HAVE_CONFIG_H
31 # include <config.h>
32 #endif
33 
34 #include "sinfo_objnod_config.h"
48 void
49 sinfo_objnod_config_add(cpl_parameterlist *list)
50 {
51 
52  cpl_parameter *p;
53 
54  if (!list) {
55  return;
56  }
57 
58 
59 
60 
61  /* Science */
62  p = cpl_parameter_new_enum("sinfoni.objnod.autojitter_method",
63  CPL_TYPE_INT,
64  "Method to reduce autojitter template frames "
65  "Raw frames are object only exposures. "
66  "object-fake_sky pairs are generated. "
67  "0: no sky for all objects ",
68  "1: fake_sky is next object, "
69  "2: fake_sky is sinfo_median of all objects "
70  "sinfoni.objnod",
71  1,3,0,1,2);
72 
73  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-aj_method");
74  cpl_parameterlist_append(list, p);
75 
76 
77  /* Science */
78  p = cpl_parameter_new_value("sinfoni.objnod.scales_sky",
79  CPL_TYPE_BOOL,
80  "Spatial median (sky) subtraction from cube: "
81  "(If autojitter_method==1),"
82  "indicates if the spatial median of each plane "
83  "should be subtracted (TRUE) or not (FALSE) "
84  "from each cube plane",
85  "sinfoni.objnod",
86  FALSE);
87 
88  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-scales_sky");
89  cpl_parameterlist_append(list, p);
90 
91 
92 
93  /* Science */
94  p = cpl_parameter_new_value("sinfoni.objnod.ks_clip",
95  CPL_TYPE_BOOL,
96  "Kappa-sigma clipping of coadded cube: "
97  "indicates if a kappa-sigma clipping "
98  "should be performed (TRUE) or not (FALSE) "
99  "on each plane of the coadded cube",
100  "sinfoni.objnod",
101  TRUE);
102 
103  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-ks_clip");
104  cpl_parameterlist_append(list, p);
105 
106 
107  p = cpl_parameter_new_value("sinfoni.objnod.kappa",
108  CPL_TYPE_DOUBLE,
109  "kappa value for kappa-sigma clipping "
110  "of coadded cube",
111  "sinfoni.objnod",
112  2.0);
113 
114  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-kappa");
115  cpl_parameterlist_append(list, p);
116 
117 
118 
119  /*x-pixel size of the final combined data cube, must lie between 64 and 128 */
120  p = cpl_parameter_new_value("sinfoni.objnod.size_x",
121  CPL_TYPE_INT,
122  "Cube x size: "
123  "x-pixel size of the final combined data cube,"
124  "must lie between 64 and 128. "
125  "If 0 it is computed automatically",
126  "sinfoni.objnod",
127  0);
128 
129  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-size_x");
130  cpl_parameterlist_append(list, p);
131 
132 
133  /*y-pixel size of the final combined data cube, must lie between 64 and 128 */
134  p = cpl_parameter_new_value("sinfoni.objnod.size_y",
135  CPL_TYPE_INT,
136  "Cube y size: "
137  "y-pixel size of the final combined data cube,"
138  "must lie between 64 and 128."
139  "If 0 it is computed automatically",
140  "sinfoni.objnod",
141  0);
142 
143  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-size_y");
144  cpl_parameterlist_append(list, p);
145 
146  /*Resampling */
147  /* number of coefficients for the polynomial interpolation */
148  p = cpl_parameter_new_value("sinfoni.objnod.n_coeffs",
149  CPL_TYPE_INT,
150  "number of coefficients for the polynomial "
151  "interpolation ",
152  "sinfoni.objnod",
153  3);
154 
155  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-no_coeffs");
156  cpl_parameterlist_append(list, p);
157 
158 
159  /* Calibration */
160  /* indicates if the halogen lamp features from flatfielding should be
161  corrected for or not */
162  /*
163  p = cpl_parameter_new_value("sinfoni.objnod.halo_correct_index",
164  CPL_TYPE_BOOL,
165  "Halo Correct Index: "
166  "indicates if the halogen lamp features from "
167  "flatfielding should be corrected for (TRUE) "
168  "or not (FALSE)",
169  "sinfoni.objnod",
170  FALSE);
171 
172  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-halo_corr_ind");
173  cpl_parameterlist_append(list, p);
174  */
175 
176  /* Cube Creation */
177  /*indicates if the slitlet distances are determined by a north-south-test
178  (yes) or slitlet edge fits (no)
179  */
180  p = cpl_parameter_new_value("sinfoni.objnod.nord_south_index",
181  CPL_TYPE_BOOL,
182  "Nord South Index Switch: "
183  "indicates if the slitlet distances are "
184  "determined by a north-south-test (TRUE) "
185  "or slitlet edge fits (FALSE)",
186  "sinfoni.objnod",
187  TRUE);
188 
189 
190  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-ns_ind");
191  cpl_parameterlist_append(list, p);
192 
193  /* Fine tuning */
194  /* Method */
195  p = cpl_parameter_new_enum("sinfoni.objnod.fine_tuning_method",
196  CPL_TYPE_STRING,
197  "Fine Tuning Method: "
198  "indicator for the shifting method to use "
199  "(P: polynomial interpolation, "
200  /* " F: FFT, " */
201  " S: cubic spline interpolation)",
202  "sinfoni.objnod",
203  "P",
204  2,
205  "P","S");
206 
207  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-fine_tune_mtd");
208  cpl_parameterlist_append(list, p);
209 
210  p = cpl_parameter_new_value("sinfoni.objnod.order",
211  CPL_TYPE_INT,
212  "Fine Tuning polynomial order: "
213  "order of the polynomial if the polynomial "
214  "interpolation shifting method is used.",
215  "sinfoni.objnod",
216  2);
217 
218  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-order");
219  cpl_parameterlist_append(list, p);
220 
221  /* Sky Extraction */
222  /*Reconstruction */
223  /* the fraction [0...1] of rejected low intensity pixels when taking
224 the average of columns */
225  p = cpl_parameter_new_value("sinfoni.objnod.low_rejection",
226  CPL_TYPE_DOUBLE,
227  "lower rejection: "
228  "percentage of rejected low value pixels "
229  "for averaging the sky spectra",
230  "sinfoni.objnod",
231  10.);
232 
233  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-lo_rej");
234  cpl_parameterlist_append(list, p);
235  /* the fraction [0...1] of rejected high intensity pixels when taking
236 the average of columns */
237 
238  p = cpl_parameter_new_value("sinfoni.objnod.high_rejection",
239  CPL_TYPE_DOUBLE,
240  "higher rejection: "
241  "percentage of rejected high value pixels "
242  "for averaging the sky spectra",
243  "sinfoni.objnod",
244  10.);
245 
246  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-hi_rej");
247  cpl_parameterlist_append(list, p);
248  /* pixel tolerance, this distance tolerance to the diagonal dividing
249  line is not considered for the sky extraction to be sure to have a clean
250  sky due to positioning tolerance and crossing through pixels
251  */
252  p = cpl_parameter_new_value("sinfoni.objnod.tolerance",
253  CPL_TYPE_INT,
254  "Tolerance: "
255  "pixel tolerance, this distance tolerance to "
256  "the diagonal dividing line is not considered "
257  "for the sky extraction to be sure to have a "
258  "clean sky due to positioning tolerance and "
259  "crossing through pixels",
260  "sinfoni.objnod",
261  2);
262 
263  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-tol");
264  cpl_parameterlist_append(list, p);
265  /* Jittering */
266  /* jitter mode indicator: yes: Auto-Jitter, no: user defined jitter
267  The next three parameters are only used if jitterInd is set to yes,
268  that means in auto-jittering mode!
269  */
270  p = cpl_parameter_new_value("sinfoni.objnod.jitter_index",
271  CPL_TYPE_BOOL,
272  "Jitter Index: "
273  "jitter mode indicator: "
274  "TRUE: Auto-Jitter, "
275  "FALSE: user defined jitter"
276  "The size_x size_y kernel_type parameters "
277  "are only used if jitterInd is set to yes, "
278  "that means in auto-jittering mode!",
279  "sinfoni.objnod",
280  TRUE);
281 
282  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-jit_ind");
283  cpl_parameterlist_append(list, p);
284 
285  /* Kernel Type */
286  /* the name of the interpolation kernel to shift the single cubes to the
287  correct places inside the big combined cube. That you want to generate
288  using the eclipse routine sinfo_generate_interpolation_kernel()
289  Supported kernels are:
290 
291  NULL: default kernel, currently tanh
292  default: dito
293  tanh: Hyperbolic tangent
294  sinc2: Square sinc
295  lanczos: Lanczos2 kernel
296  hamming: Hamming kernel
297  hann: Hann kernel
298  */
299  p = cpl_parameter_new_enum("sinfoni.objnod.kernel_type",
300  CPL_TYPE_STRING,
301  "Kernel Type:"
302  "the name of the interpolation kernel to shift "
303  "the single cubes to the correct places inside "
304  "the big combined cube",
305  "sinfoni.objnod",
306  "tanh",
307  7,
308  "NULL","default","tanh","sinc2",
309  "lanczos","hamming","hann");
310 
311  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-kernel_typ");
312  cpl_parameterlist_append(list, p);
313 
314 
315  /* amount of vignetting from output cube before coaddition */
316  p = cpl_parameter_new_range("sinfoni.objnod.vllx",
317  CPL_TYPE_INT,
318  "Vignetting on llx: "
319  "pixels vignetted from lower left corner "
320  "X coordinate "
321  "of contributing cubes before coaddition ",
322  "sinfoni.objnod",
323  0,0,63);
324 
325  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-vllx");
326  cpl_parameterlist_append(list, p);
327 
328 
329  p = cpl_parameter_new_range("sinfoni.objnod.vlly",
330  CPL_TYPE_INT,
331  "Vignetting on lly: "
332  "pixels vignetted from lower left corner "
333  "Y coordinate "
334  "of contributing cubes before coaddition ",
335  "sinfoni.objnod",
336  0,0,63);
337 
338  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-vlly");
339  cpl_parameterlist_append(list, p);
340 
341 
342  p = cpl_parameter_new_range("sinfoni.objnod.vurx",
343  CPL_TYPE_INT,
344  "Vignetting on urx: "
345  "pixels vignetted from upper right corner "
346  "X coordinate "
347  "of contributing cubes before coaddition ",
348  "sinfoni.objnod",
349  0,0,63);
350 
351  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-vurx");
352  cpl_parameterlist_append(list, p);
353 
354 
355  p = cpl_parameter_new_range("sinfoni.objnod.vury",
356  CPL_TYPE_INT,
357  "Vignetting on ury: "
358  "pixels vignetted from upper right corner "
359  "Y coordinate "
360  "of contributing cubes before coaddition ",
361  "sinfoni.objnod",
362  0,0,63);
363 
364  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-vury");
365  cpl_parameterlist_append(list, p);
366 
367 
368  p = cpl_parameter_new_value("sinfoni.objnod.fcol",
369  CPL_TYPE_DOUBLE,
370  "First column offset: ",
371  "sinfoni.objnod",
372  0.);
373 
374  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-fcol");
375  cpl_parameterlist_append(list, p);
376 
377  /* switch to activate the sky residuals correction */
378  p = cpl_parameter_new_value("sinfoni.objnod.sky_cor",
379  CPL_TYPE_BOOL,
380  "Sky residuals correction: ",
381  "sinfoni.objnod",
382  TRUE);
383 
384  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-sky_cor");
385  cpl_parameterlist_append(list, p);
386 
387 
388  /* switch to activate the flux correction correction */
389  p = cpl_parameter_new_value("sinfoni.objnod.flux_cor",
390  CPL_TYPE_BOOL,
391  "Apply flux correction after rebinning: ",
392  "sinfoni.objnod",
393  TRUE);
394 
395  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-flux_cor");
396  cpl_parameterlist_append(list, p);
397 
398 
399  /* switch to activate the flux correction correction */
400  p = cpl_parameter_new_value("sinfoni.objnod.mosaic_max_size",
401  CPL_TYPE_INT,
402  "Maximum allowed size for cubes mosaic is "
403  "100*mosaic_max_size ",
404  "sinfoni.objnod",
405  14196);
406 
407  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objnod-mosaic_max_size");
408  cpl_parameterlist_append(list, p);
409 
410 
411 }