SINFONI Pipeline Reference Manual  2.6.0
sinfo_objspider_config.c
1 /* $Id: sinfo_objspider_config.c,v 1.7 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.7 $
24  * $Name: not supported by cvs2svn $
25  */
26 
27 /****************************************************************
28  * Objspider Frames Data Reduction Parameter Initialization *
29  ****************************************************************/
30 
31 #ifdef HAVE_CONFIG_H
32 # include <config.h>
33 #endif
34 
35 #include "sinfo_objspider_config.h"
50 void
51 sinfo_objspider_config_add(cpl_parameterlist *list)
52 {
53 
54  cpl_parameter *p;
55 
56  if (!list) {
57  return;
58  }
59 
60 
61  /* Input file name */
62  /* Output file name */
63  /* output name of resulting fits wavelength map */
64  p = cpl_parameter_new_value("sinfoni.objspider.out_filename",
65  CPL_TYPE_STRING,
66  "Output File Name: ",
67  "sinfoni.objspider",
68  SKYSPIDER_OUT_FILENAME);
69 
70 
71  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"out-skyspider_filename");
72  cpl_parameterlist_append(list, p);
73 
74 
75  /*Resampling */
76  /* number of coefficients for the polynomial interpolation */
77  p = cpl_parameter_new_value("sinfoni.objspider.n_coeffs",
78  CPL_TYPE_INT,
79  "number of coefficients for the polynomial "
80  "interpolation ",
81  "sinfoni.objspider",
82  3);
83 
84  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-no-coeffs");
85  cpl_parameterlist_append(list, p);
86 
87 
88  /* Calibration */
89  /* indicates if the halogen lamp features from flatfielding should be
90  corrected for or not */
91  /*
92  p = cpl_parameter_new_value("sinfoni.objspider.halo_correct_index",
93  CPL_TYPE_BOOL,
94  "Halo Correct Index: "
95  "indicates if the halogen lamp features from "
96  "flatfielding should be corrected for (TRUE) "
97  "or not (FALSE)",
98  "sinfoni.objspider",
99  FALSE);
100 
101  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-halo-corr-ind");
102  cpl_parameterlist_append(list, p);
103  */
104 
105 
106  /* Cube Creation */
107  /*indicates if the slitlet distances are determined by a north-south-test
108  (yes) or slitlet edge fits (no)
109  */
110  p = cpl_parameter_new_value("sinfoni.objspider.nord_south_index",
111  CPL_TYPE_BOOL,
112  "Nord South Index Switch: "
113  "indicates if the slitlet distances are "
114  "determined by a north-south-test (TRUE) "
115  "or slitlet edge fits (FALSE)",
116  "sinfoni.objspider",
117  TRUE);
118 
119 
120  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-ns-ind");
121  cpl_parameterlist_append(list, p);
122 
123  p = cpl_parameter_new_value("sinfoni.objspider.slitlets_position_list",
124  CPL_TYPE_STRING,
125  "Slitlets positions filename: "
126  "list of the fitted slitlet edge positions "
127  "or the distances of the slitlets",
128  "sinfoni.objspider",
129  "distances.fits");
130 
131 
132  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-pos-list");
133  cpl_parameterlist_append(list, p);
134 
135  /* number of slitlets (32) */
136  p = cpl_parameter_new_value("sinfoni.objspider.nslits",
137  CPL_TYPE_INT,
138  "Number of slitlets: ",
139  "sinfoni.objspider",
140  32);
141 
142  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-pos-nslits");
143  cpl_parameterlist_append(list, p);
144 
145  /* Fine tuning */
146  /* Method */
147 
148  p = cpl_parameter_new_enum("sinfoni.objspider.fine_tuning_method",
149  CPL_TYPE_STRING,
150  "Fine Tuning Method: "
151  "indicator for the shifting method to use "
152  "(P: polynomial interpolation, "
153  " F: FFT, "
154  " S: cubic spline interpolation)",
155  "sinfoni.objspider",
156  "P",
157  3,"P","F","S");
158 
159  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-fine-tune-mtd");
160  cpl_parameterlist_append(list, p);
161 
162  p = cpl_parameter_new_value("sinfoni.objspider.order",
163  CPL_TYPE_INT,
164  "Fine Tuning polynomial order: "
165  "order of the polynomial if the polynomial "
166  "interpolation shifting method is used.",
167  "sinfoni.objspider",
168  2);
169 
170  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-order");
171  cpl_parameterlist_append(list, p);
172 
173  /* Sky Extraction */
174  /*Reconstruction */
175  /* the fraction [0...1] of rejected low intensity pixels when taking
176 the average of columns */
177  p = cpl_parameter_new_value("sinfoni.objspider.lower_rejection",
178  CPL_TYPE_DOUBLE,
179  "lower rejection: "
180  "percentage of rejected low value pixels "
181  "for averaging the sky spectra",
182  "sinfoni.objspider",
183  10.);
184 
185  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-lo-rejection");
186  cpl_parameterlist_append(list, p);
187 
188  /* the fraction [0...1] of rejected high intensity pixels when taking
189 the average of columns */
190  p = cpl_parameter_new_value("sinfoni.objspider.higher_rejection",
191  CPL_TYPE_DOUBLE,
192  "higher rejection: "
193  "percentage of rejected high value pixels "
194  "for averaging the sky spectra",
195  "sinfoni.objspider",
196  10.);
197 
198  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-hi-rejection");
199  cpl_parameterlist_append(list, p);
200 
201  /* pixel tolerance, this distance tolerance to the diagonal dividing
202  line is not considered for the sky extraction to be sure to have a clean
203  sky due to positioning tolerance and crossing through pixels
204  */
205 
206  p = cpl_parameter_new_value("sinfoni.objspider.tolerance",
207  CPL_TYPE_INT,
208  "Tolerance: "
209  "pixel tolerance, this distance tolerance to "
210  "the diagonal dividing line is not considered "
211  "for the sky extraction to be sure to have a "
212  "clean sky due to positioning tolerance and "
213  "crossing through pixels",
214  "sinfoni.objspider",
215  2);
216 
217  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-tol");
218  cpl_parameterlist_append(list, p);
219 
220  /* Jittering */
221  /* jitter mode indicator: yes: Auto-Jitter, no: user defined jitter
222  The next three parameters are only used if jitterInd is set to yes,
223  that means in auto-jittering mode!
224  */
225 
226  p = cpl_parameter_new_value("sinfoni.objspider.jitter_index",
227  CPL_TYPE_BOOL,
228  "Jitter Index: "
229  "jitter mode indicator: "
230  "TRUE: Auto-Jitter, "
231  "FALSE: user defined jitter"
232  "The size_x size_y kernel_type parameters "
233  "are only used if jitterInd is set to yes, "
234  "that means in auto-jittering mode!",
235  "sinfoni.objspider",
236  FALSE);
237 
238  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-jit-ind");
239  cpl_parameterlist_append(list, p);
240  /*x-pixel size of the final combined data cube, must lie between 64 and 128 */
241 
242  p = cpl_parameter_new_value("sinfoni.objspider.size_x",
243  CPL_TYPE_INT,
244  "Cube x size: "
245  "x-pixel size of the final combined data cube,"
246  "must lie between 64 and 128. "
247  "If 0 automatic setting.",
248  "sinfoni.objspider",
249  0);
250 
251  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-size-x");
252  cpl_parameterlist_append(list, p);
253  /*y-pixel size of the final combined data cube, must lie between 64 and 128 */
254 
255  p = cpl_parameter_new_value("sinfoni.objspider.size_y",
256  CPL_TYPE_INT,
257  "Cube y size: "
258  "y-pixel size of the final combined data cube,"
259  "must lie between 64 and 128. "
260  "If 0 automatic setting.",
261  "sinfoni.objspider",
262  0);
263 
264  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-size-y");
265  cpl_parameterlist_append(list, p);
266 
267  /* Kernel Type */
268  /* the name of the interpolation kernel to shift the single cubes to the
269  correct places inside the big combined cube. That you want to generate
270  using the eclipse routine sinfo_generate_interpolation_kernel()
271  Supported kernels are:
272 
273  NULL: default kernel, currently tanh
274  default: dito
275  tanh: Hyperbolic tangent
276  sinc2: Square sinc
277  lanczos: Lanczos2 kernel
278  hamming: Hamming kernel
279  hann: Hann kernel
280  */
281  p = cpl_parameter_new_enum("sinfoni.objspider.kernel_type",
282  CPL_TYPE_STRING,
283  "Kernel Type:"
284  "the name of the interpolation kernel to shift "
285  "the single cubes to the correct places inside "
286  "the big combined cube",
287  "sinfoni.objspider",
288  "tanh",
289  6,"NULL","default","tanh",
290  "sinc2","lanczos","hamming","hann");
291 
292  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-kernel-typ");
293  cpl_parameterlist_append(list, p);
294 
295  /* name of the final mask data cube, pixel value 0 if no data available,
296  sum of exposure times in the overlapping regions
297  */
298 
299  p = cpl_parameter_new_value("sinfoni.objspider.mask_name",
300  CPL_TYPE_STRING,
301  "Mask Name: "
302  "name of the final mask data cube, "
303  "pixel value 0 if no data available,"
304  "sum of exposure times in the overlapping "
305  "regions ",
306  "sinfoni.objspider",
307  SKYSPIDER_MASK_OUT_FILENAME);
308 
309  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"objspider-mask");
310  cpl_parameterlist_append(list, p);
311 
312 }