sinfo_focus_determination_config.c

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

Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1