sinfo_focus_determination_config.c

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

Generated on 3 Mar 2013 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1