00001 /* 00002 * This file is part of the ESO SINFONI Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00018 */ 00019 /*--------------------------------------------------------------------------- 00020 00021 File name : sinfo_focus_cfg.h 00022 Author : Juergen Schreiber 00023 Created on : February 2002 00024 Description : focus_cfg.c definitions + handling prototypes 00025 ---------------------------------------------------------------------------*/ 00026 #ifndef SINFO_FOCUS_CFG_H 00027 #define SINFO_FOCUS_CFG_H 00028 /*--------------------------------------------------------------------------- 00029 Includes 00030 ---------------------------------------------------------------------------*/ 00031 #include <stdlib.h> 00032 #include <cpl.h> 00033 #include "sinfo_globals.h" 00034 /*--------------------------------------------------------------------------- 00035 Defines 00036 ---------------------------------------------------------------------------*/ 00037 /*--------------------------------------------------------------------------- 00038 New types 00039 ---------------------------------------------------------------------------*/ 00040 /* 00041 point source 2D-Gaussian fit blackboard container 00042 00043 This structure holds all information related to the 2D-Gaussian fit 00044 routine. It is used as a container for the flux of ancillary data, 00045 computed values, and algorithm status. Pixel flux is separated from 00046 the blackboard. 00047 */ 00048 00049 typedef struct focus_config { 00050 /*-------General---------*/ 00051 char inFile[FILE_NAME_SZ] ; /* file name of frame list */ 00052 char ** inFrameList ; /* input averaged, bad pixel corrected, 00053 off subtracted, flatfielded, spectral tilt 00054 corrected list of frames */ 00055 int nframes ; /* number of frames in the list */ 00056 char outName[FILE_NAME_SZ] ; /* output name of resulting 00057 fits data cube */ 00058 00059 /*------ Reconstruction ------*/ 00060 /* the fraction [0...1] of rejected low intensity pixels 00061 when taking the average of columns */ 00062 float lo_reject ; 00063 /* the fraction [0...1] of rejected high intensity pixels 00064 when taking the average of columns */ 00065 float hi_reject ; 00066 /* indicates if the slitlet distances are determined by a 00067 north-south test (1) 00068 or slitlet edge fits (0) */ 00069 int northsouthInd ; 00070 /* name of the ASCII list of the fitted slitlet edge 00071 positions or the distances of the slitlets */ 00072 char poslist[FILE_NAME_SZ] ; 00073 /* number of slitlets (32) */ 00074 int nslits ; 00075 /* sub pixel position of the column position of the left sinfo_edge of 00076 the first slitlet needed if the slitlet distances were determined 00077 by a north south test */ 00078 char firstCol[FILE_NAME_SZ] ; 00079 /* indicator for the shifting method to use */ 00080 char method[1] ; 00081 /* order of polynomial if the polynomial interpolation shifting 00082 method is used */ 00083 int order ; 00084 /*------ Gauss2Dfit ------*/ 00085 /* lower left sinfo_edge coordinates of fitting box for 2D 00086 Gaussian fit */ 00087 int llx ; 00088 int lly ; 00089 /* half length in pixels of the box within the point source 00090 is fitted in x and y-direction */ 00091 int halfbox_x ; 00092 int halfbox_y ; 00093 /* mask parameters ( 1 or 0 ) for the fit parameters. If 1 00094 the corresponding parameter 00095 is set free, if 0 the parameter is kept fixed. */ 00096 int mpar0 ; /* mask for the x-position */ 00097 int mpar1 ; /* mask for the y-position */ 00098 int mpar2 ; /* mask for the amplitude */ 00099 int mpar3 ; /* mask for the background */ 00100 int mpar4 ; /* mask for the fwhmx */ 00101 int mpar5 ; /* mask for the fwhmy */ 00102 int mpar6 ; /* mask for the position angle of fwhmx line */ 00103 /* name of the resulting ASCII file containing the fit parameters */ 00104 char fitlist[FILE_NAME_SZ] ; 00105 /* indicator if the resulting 2D-Gaussian is stored in a fits 00106 file or not */ 00107 int plotGaussInd ; 00108 /* name of the fits file containing the resulting 2D-Gaussian */ 00109 char gaussplotName[FILE_NAME_SZ] ; 00110 } focus_config ; 00111 00112 /*--------------------------------------------------------------------------- 00113 Function prototypes 00114 ---------------------------------------------------------------------------*/ 00122 focus_config * 00123 sinfo_focus_cfg_create(void); 00124 00131 void 00132 sinfo_focus_cfg_destroy(focus_config * cc); 00133 00134 #endif