sinfoni_focus_determination_config.c

00001 /* $Id: sinfoni_focus_determination_config.c,v 1.20 2005/05/10 06:47:51 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 /*
00022  * $Author: amodigli $
00023  * $Date: 2005/05/10 06:47:51 $
00024  * $Revision: 1.20 $
00025  * $Name:  $
00026  */
00027 
00028  /****************************************************************
00029   *   Focus Determination                                        *
00030   ****************************************************************/
00031 #include "cpl_parameterlist.h"    /* defines parlist structure */
00032 #include "sinfoni_dfs.h"
00033 #include "sinfoni_focus_determination_config.h"
00052   /* Focus Determination Parameters Definition */
00053    
00054 
00055 void
00056  sinfoni_focus_determination_config_add(cpl_parameterlist *list)
00057 {
00058 
00059   cpl_parameter *p;
00060 
00061   if (!list) {
00062     return;
00063   }
00064 
00065   /* Output file name */
00066   /* output name of resulting fits wavelength map */
00067   p = cpl_parameter_new_value("sinfoni.focus.output_filename",
00068                   CPL_TYPE_STRING,
00069                               "Output File Name: ",
00070                               "sinfoni.focus",
00071                               FOCUS_OUT_FILENAME);
00072 
00073 
00074   cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,"out-focus_filename");
00075   cpl_parameterlist_append(list, p);
00076 
00077 
00078 
00079  p = cpl_parameter_new_enum("sinfoni.focus.method",
00080                   CPL_TYPE_STRING,
00081                               "Shifting method to use: ",
00082                               "sinfoni.focus",
00083                               "P",
00084                                3,
00085                               "P","F","S");
00086 
00087   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-method");
00088   cpl_parameterlist_append(list, p);
00089 
00090 
00091   /* Reconstruction */
00092 
00093  /* float 
00094      threshold used in the clean mean percentage of rejection used to reject 
00095      low and high frame */
00096  /* percentage of extreme pixel value to reject when calculating the mean 
00097     and stdev */
00098   p = cpl_parameter_new_range("sinfoni.focus.lower_rejection",
00099                   CPL_TYPE_DOUBLE,
00100                               "lower rejection",
00101                               "sinfoni.focus",
00102                                0.1,0.0,1.0);
00103 
00104 
00105   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-low_rejection");
00106   cpl_parameterlist_append(list, p);
00107 
00108   /* float 
00109      threshold used in the clean mean percentage of rejection used to reject 
00110      low and high frame */
00111  /* percentage of extreme pixel value to reject when calculating the mean 
00112     and stdev */
00113   p = cpl_parameter_new_range("sinfoni.focus.higher_rejection",
00114                   CPL_TYPE_DOUBLE,
00115                               "high rejection",
00116                               "sinfoni.focus",
00117                                0.1,0.0,1.0);
00118 
00119 
00120   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-high_rejection");
00121   cpl_parameterlist_append(list, p);
00122 
00123 /* indicates if the slitlet distances are determined by 
00124    a north-south test (1) 
00125            or 
00126    slitlet edge fits (0) */ 
00127   p = cpl_parameter_new_value("sinfoni.focus.north_south_index",
00128                   CPL_TYPE_BOOL,
00129                               "North South Index",
00130                               "sinfoni.focus",
00131                               TRUE);
00132 
00133   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-ns_index");
00134   cpl_parameterlist_append(list, p);
00135 
00136 /* number of slitlets (32) */
00137   p = cpl_parameter_new_value("sinfoni.focus.nslits",
00138                   CPL_TYPE_INT,
00139                               "Number Of Slits",
00140                               "sinfoni.focus",
00141                               32);
00142 
00143 
00144   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-nslits");
00145   cpl_parameterlist_append(list, p);
00146 
00147   p = cpl_parameter_new_value("sinfoni.focus.order",
00148                   CPL_TYPE_INT,
00149                               "Order",
00150                               "sinfoni.focus",
00151                               2);
00152 
00153   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-order");
00154   cpl_parameterlist_append(list, p);
00155 
00156 
00157   /* Gauss 2D Fit */
00158   /* lower left edge coordinates of fitting box for 2D Gaussian fit */
00159   p = cpl_parameter_new_range("sinfoni.focus.llx",
00160                   CPL_TYPE_INT,
00161                               "llx",
00162                               "sinfoni.focus",
00163                               9,DET_PIX_MIN,DET_PIX_MAX);
00164 
00165   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-llx");
00166   cpl_parameterlist_append(list, p);
00167 
00168   /* lower left edge coordinates of fitting box for 2D Gaussian fit */
00169   p = cpl_parameter_new_range("sinfoni.focus.lly",
00170                   CPL_TYPE_INT,
00171                               "lly",
00172                               "sinfoni.focus",
00173                               9,DET_PIX_MIN,DET_PIX_MAX);
00174 
00175 
00176   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-lly");
00177   cpl_parameterlist_append(list, p);
00178 
00179 /* half length in pixels of the box within the point source is fitted in x 
00180    and y-direction */
00181   p = cpl_parameter_new_range("sinfoni.focus.halfbox_x",
00182                   CPL_TYPE_INT,
00183                               "half box x",
00184                               "sinfoni.focus",
00185                               7,DET_PIX_MIN,DET_PIX_MAX);
00186 
00187   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-hbx");
00188   cpl_parameterlist_append(list, p);
00189 
00190 /* half length in pixels of the box within the point source is fitted in x 
00191    and y-direction */
00192   p = cpl_parameter_new_range("sinfoni.focus.halfbox_y",
00193                   CPL_TYPE_INT,
00194                               "half box y",
00195                               "sinfoni.focus",
00196                               7,DET_PIX_MIN,DET_PIX_MAX);
00197 
00198 
00199   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-hby");
00200   cpl_parameterlist_append(list, p);
00201 
00202   /* mask for the x-position */
00203   p = cpl_parameter_new_value("sinfoni.focus.mpar0",
00204                   CPL_TYPE_INT,
00205                               "mask par 0",
00206                               "sinfoni.focus",
00207                               1);
00208 
00209   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar0");
00210   cpl_parameterlist_append(list, p);
00211 
00212   /* mask for the y-position */
00213   p = cpl_parameter_new_value("sinfoni.focus.mpar1",
00214                   CPL_TYPE_INT,
00215                               "mask par 1",
00216                               "sinfoni.focus",
00217                               1);
00218 
00219   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar1");
00220   cpl_parameterlist_append(list, p);
00221 
00222   /* mask for the amplitude */
00223   p = cpl_parameter_new_value("sinfoni.focus.mpar2",
00224                   CPL_TYPE_INT,
00225                               "mask par 2",
00226                               "sinfoni.focus",
00227                               1);
00228 
00229   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar2");
00230   cpl_parameterlist_append(list, p);
00231 
00232   /* mask for the background */
00233   p = cpl_parameter_new_value("sinfoni.focus.mpar3",
00234                   CPL_TYPE_INT,
00235                               "mask par 3",
00236                               "sinfoni.focus",
00237                               1);
00238 
00239   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar3");
00240   cpl_parameterlist_append(list, p);
00241 
00242   /* mask for the fwhmx */
00243   p = cpl_parameter_new_value("sinfoni.focus.mpar4",
00244                   CPL_TYPE_INT,
00245                               "mask par 4",
00246                               "sinfoni.focus",
00247                               1);
00248 
00249   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar4");
00250   cpl_parameterlist_append(list, p);
00251 
00252   /* mask for the fwhmy */
00253   p = cpl_parameter_new_value("sinfoni.focus.mpar5",
00254                   CPL_TYPE_INT,
00255                               "mask par 5",
00256                               "sinfoni.focus",
00257                               1);
00258 
00259   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar5");
00260   cpl_parameterlist_append(list, p);
00261 
00262   /* mask for the position angle of fwhmx line */
00263   p = cpl_parameter_new_value("sinfoni.focus.mpar6",
00264                   CPL_TYPE_INT,
00265                               "mask par 6",
00266                               "sinfoni.focus",
00267                               1);
00268 
00269   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-mpar6");
00270   cpl_parameterlist_append(list, p);
00271 
00272   /* name of the resulting ASCII file containing the fit parameters */
00273   p = cpl_parameter_new_value("sinfoni.focus.fit_list",
00274                   CPL_TYPE_STRING,
00275                               "Fit List: ",
00276                               "sinfoni.fit_list",
00277                               FOCUS_FITPAR_OUT_FILENAME);
00278 
00279   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-fit_list");
00280   cpl_parameterlist_append(list, p);
00281 
00282  /* indicator if the resulting 2D-Gaussian is stored in a fits file or not */
00283   p = cpl_parameter_new_value("sinfoni.focus.plot_gauss_ind",
00284                   CPL_TYPE_BOOL,
00285                               "Plot Gauss Ind",
00286                               "sinfoni.focus",
00287                               TRUE);
00288 
00289   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-gauss_ind");
00290   cpl_parameterlist_append(list, p);
00291 
00292 
00293   /* name of the fits file containing the resulting 2D-Gaussian */
00294   p = cpl_parameter_new_value("sinfoni.focus.gauss_plot_name",
00295                   CPL_TYPE_STRING,
00296                               "Gauss Plot Name: ",
00297                               "sinfoni.focus",
00298                               FOCUS_GAUSSPLOT_OUT_FILENAME);
00299 
00300   cpl_parameter_set_alias(p,  CPL_PARAMETER_MODE_CLI,"focus-det-gauss_plot_name");
00301   cpl_parameterlist_append(list, p);
00302 
00303 }

Generated on Wed Oct 26 13:08:55 2005 for SINFONI Pipeline Reference Manual by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001