SINFONI Pipeline Reference Manual  2.5.2
sinfo_focus_determination_config.c
1 /* $Id: sinfo_focus_determination_config.c,v 1.6 2012-03-02 08:42:20 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 /*
22  * $Author: amodigli $
23  * $Date: 2012-03-02 08:42:20 $
24  * $Revision: 1.6 $
25  * $Name: not supported by cvs2svn $
26  */
27 #ifdef HAVE_CONFIG_H
28 # include <config.h>
29 #endif
30 
31 /****************************************************************
32  * Focus Determination *
33  ****************************************************************/
34 #include "cpl_parameterlist.h" /* defines parlist structure */
35 #include "sinfo_dfs.h"
36 #include "sinfo_focus_determination_config.h"
37 
46 /* Focus Determination Parameters Definition */
47 
48 
49 void
50 sinfo_focus_determination_config_add(cpl_parameterlist *list)
51 {
52 
53  cpl_parameter *p;
54 
55  if (!list) {
56  return;
57  }
58 
59  /* Output file name */
60  /* output name of resulting fits wavelength map */
61  p = cpl_parameter_new_value("sinfoni.focus.output_filename",
62  CPL_TYPE_STRING,
63  "Output File Name: ",
64  "sinfoni.focus",
65  FOCUS_OUT_FILENAME);
66 
67 
68  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"out-focus_filename");
69  cpl_parameterlist_append(list, p);
70 
71 
72 
73  p = cpl_parameter_new_enum("sinfoni.focus.method",
74  CPL_TYPE_STRING,
75  "Shifting method to use: ",
76  "sinfoni.focus",
77  "P",
78  3,
79  "P","F","S");
80 
81  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-method");
82  cpl_parameterlist_append(list, p);
83 
84 
85  /* Reconstruction */
86 
87  /* float
88  threshold used in the clean mean percentage of rejection used to reject
89  low and high frame */
90  /* percentage of extreme pixel value to reject when calculating the mean
91  and stdev */
92  p = cpl_parameter_new_range("sinfoni.focus.lower_rejection",
93  CPL_TYPE_DOUBLE,
94  "lower rejection",
95  "sinfoni.focus",
96  0.1,0.0,1.0);
97 
98 
99  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-low_rejection");
100  cpl_parameterlist_append(list, p);
101 
102  /* float
103  threshold used in the clean mean percentage of rejection used to reject
104  low and high frame */
105  /* percentage of extreme pixel value to reject when calculating the mean
106  and stdev */
107  p = cpl_parameter_new_range("sinfoni.focus.higher_rejection",
108  CPL_TYPE_DOUBLE,
109  "high rejection",
110  "sinfoni.focus",
111  0.1,0.0,1.0);
112 
113 
114  cpl_parameter_set_alias(p,CPL_PARAMETER_MODE_CLI,"focus-det-high_rejection");
115  cpl_parameterlist_append(list, p);
116 
117  /* indicates if the slitlet distances are determined by
118  a north-south test (1)
119  or
120  slitlet sinfo_edge fits (0) */
121  p = cpl_parameter_new_value("sinfoni.focus.north_south_index",
122  CPL_TYPE_BOOL,
123  "North South Index",
124  "sinfoni.focus",
125  TRUE);
126 
127  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-ns_index");
128  cpl_parameterlist_append(list, p);
129 
130  /* number of slitlets (32) */
131  p = cpl_parameter_new_value("sinfoni.focus.nslits",
132  CPL_TYPE_INT,
133  "Number Of Slits",
134  "sinfoni.focus",
135  32);
136 
137 
138  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-nslits");
139  cpl_parameterlist_append(list, p);
140 
141  p = cpl_parameter_new_value("sinfoni.focus.order",
142  CPL_TYPE_INT,
143  "Order",
144  "sinfoni.focus",
145  2);
146 
147  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-order");
148  cpl_parameterlist_append(list, p);
149 
150 
151  /* Gauss 2D Fit */
152  /* lower left sinfo_edge coordinates of fitting box for 2D Gaussian fit */
153  p = cpl_parameter_new_range("sinfoni.focus.llx",
154  CPL_TYPE_INT,
155  "llx",
156  "sinfoni.focus",
157  9,DET_PIX_MIN,DET_PIX_MAX);
158 
159  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-llx");
160  cpl_parameterlist_append(list, p);
161 
162  /* lower left sinfo_edge coordinates of fitting box for 2D Gaussian fit */
163  p = cpl_parameter_new_range("sinfoni.focus.lly",
164  CPL_TYPE_INT,
165  "lly",
166  "sinfoni.focus",
167  9,DET_PIX_MIN,DET_PIX_MAX);
168 
169 
170  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-lly");
171  cpl_parameterlist_append(list, p);
172 
173  /* half length in pixels of the box within the point source is fitted in x
174  and y-direction */
175  p = cpl_parameter_new_range("sinfoni.focus.halfbox_x",
176  CPL_TYPE_INT,
177  "half box x",
178  "sinfoni.focus",
179  7,DET_PIX_MIN,DET_PIX_MAX);
180 
181  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-hbx");
182  cpl_parameterlist_append(list, p);
183 
184  /* half length in pixels of the box within the point source is fitted in x
185  and y-direction */
186  p = cpl_parameter_new_range("sinfoni.focus.halfbox_y",
187  CPL_TYPE_INT,
188  "half box y",
189  "sinfoni.focus",
190  7,DET_PIX_MIN,DET_PIX_MAX);
191 
192 
193  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-hby");
194  cpl_parameterlist_append(list, p);
195 
196  /* mask for the x-position */
197  p = cpl_parameter_new_value("sinfoni.focus.mpar0",
198  CPL_TYPE_INT,
199  "mask par 0",
200  "sinfoni.focus",
201  1);
202 
203  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar0");
204  cpl_parameterlist_append(list, p);
205 
206  /* mask for the y-position */
207  p = cpl_parameter_new_value("sinfoni.focus.mpar1",
208  CPL_TYPE_INT,
209  "mask par 1",
210  "sinfoni.focus",
211  1);
212 
213  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar1");
214  cpl_parameterlist_append(list, p);
215 
216  /* mask for the amplitude */
217  p = cpl_parameter_new_value("sinfoni.focus.mpar2",
218  CPL_TYPE_INT,
219  "mask par 2",
220  "sinfoni.focus",
221  1);
222 
223  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar2");
224  cpl_parameterlist_append(list, p);
225 
226  /* mask for the background */
227  p = cpl_parameter_new_value("sinfoni.focus.mpar3",
228  CPL_TYPE_INT,
229  "mask par 3",
230  "sinfoni.focus",
231  1);
232 
233  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar3");
234  cpl_parameterlist_append(list, p);
235 
236  /* mask for the fwhmx */
237  p = cpl_parameter_new_value("sinfoni.focus.mpar4",
238  CPL_TYPE_INT,
239  "mask par 4",
240  "sinfoni.focus",
241  1);
242 
243  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar4");
244  cpl_parameterlist_append(list, p);
245 
246  /* mask for the fwhmy */
247  p = cpl_parameter_new_value("sinfoni.focus.mpar5",
248  CPL_TYPE_INT,
249  "mask par 5",
250  "sinfoni.focus",
251  1);
252 
253  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar5");
254  cpl_parameterlist_append(list, p);
255 
256  /* mask for the position angle of fwhmx line */
257  p = cpl_parameter_new_value("sinfoni.focus.mpar6",
258  CPL_TYPE_INT,
259  "mask par 6",
260  "sinfoni.focus",
261  1);
262 
263  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-mpar6");
264  cpl_parameterlist_append(list, p);
265 
266  /* name of the resulting ASCII file containing the fit parameters */
267  p = cpl_parameter_new_value("sinfoni.focus.fit_list",
268  CPL_TYPE_STRING,
269  "Fit List: ",
270  "sinfoni.fit_list",
271  FOCUS_FITPAR_OUT_FILENAME);
272 
273  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-fit_list");
274  cpl_parameterlist_append(list, p);
275 
276  /* indicator if the resulting 2D-Gaussian is stored in a fits file or not */
277  p = cpl_parameter_new_value("sinfoni.focus.plot_gauss_ind",
278  CPL_TYPE_BOOL,
279  "Plot Gauss Ind",
280  "sinfoni.focus",
281  TRUE);
282 
283  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"focus-det-gauss_ind");
284  cpl_parameterlist_append(list, p);
285 
286 
287  /* name of the fits file containing the resulting 2D-Gaussian */
288  p = cpl_parameter_new_value("sinfoni.focus.gauss_plot_name",
289  CPL_TYPE_STRING,
290  "Gauss Plot Name: ",
291  "sinfoni.focus",
292  FOCUS_GAUSSPLOT_OUT_FILENAME);
293 
294  cpl_parameter_set_alias(p,
295  CPL_PARAMETER_MODE_CLI,"focus-det-gauss_plot_name");
296  cpl_parameterlist_append(list, p);
297 
298 }