SINFONI Pipeline Reference Manual  2.6.0
sinfo_focus_cfg.h
1 /*
2  * This file is part of the ESO SINFONI Pipeline
3  * Copyright (C) 2004,2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 /*---------------------------------------------------------------------------
20 
21  File name : sinfo_focus_cfg.h
22  Author : Juergen Schreiber
23  Created on : February 2002
24  Description : focus_cfg.c definitions + handling prototypes
25  ---------------------------------------------------------------------------*/
26 #ifndef SINFO_FOCUS_CFG_H
27 #define SINFO_FOCUS_CFG_H
28 /*---------------------------------------------------------------------------
29  Includes
30  ---------------------------------------------------------------------------*/
31 #include <stdlib.h>
32 #include <cpl.h>
33 #include "sinfo_globals.h"
34 /*---------------------------------------------------------------------------
35  Defines
36  ---------------------------------------------------------------------------*/
37 /*---------------------------------------------------------------------------
38  New types
39  ---------------------------------------------------------------------------*/
40 /*
41  point source 2D-Gaussian fit blackboard container
42 
43  This structure holds all information related to the 2D-Gaussian fit
44  routine. It is used as a container for the flux of ancillary data,
45  computed values, and algorithm status. Pixel flux is separated from
46  the blackboard.
47  */
48 
49 typedef struct focus_config {
50 /*-------General---------*/
51  char inFile[FILE_NAME_SZ] ; /* file name of frame list */
52  char ** inFrameList ; /* input averaged, bad pixel corrected,
53  off subtracted, flatfielded, spectral tilt
54  corrected list of frames */
55  int nframes ; /* number of frames in the list */
56  char outName[FILE_NAME_SZ] ; /* output name of resulting
57  fits data cube */
58 
59 /*------ Reconstruction ------*/
60  /* the fraction [0...1] of rejected low intensity pixels
61  when taking the average of columns */
62  float lo_reject ;
63  /* the fraction [0...1] of rejected high intensity pixels
64  when taking the average of columns */
65  float hi_reject ;
66  /* indicates if the slitlet distances are determined by a
67  north-south test (1)
68  or slitlet edge fits (0) */
69  int northsouthInd ;
70  /* name of the ASCII list of the fitted slitlet edge
71  positions or the distances of the slitlets */
72  char poslist[FILE_NAME_SZ] ;
73  /* number of slitlets (32) */
74  int nslits ;
75  /* sub pixel position of the column position of the left sinfo_edge of
76  the first slitlet needed if the slitlet distances were determined
77  by a north south test */
78  char firstCol[FILE_NAME_SZ] ;
79  /* indicator for the shifting method to use */
80  char method[1] ;
81  /* order of polynomial if the polynomial interpolation shifting
82  method is used */
83  int order ;
84 /*------ Gauss2Dfit ------*/
85  /* lower left sinfo_edge coordinates of fitting box for 2D
86  Gaussian fit */
87  int llx ;
88  int lly ;
89  /* half length in pixels of the box within the point source
90  is fitted in x and y-direction */
91  int halfbox_x ;
92  int halfbox_y ;
93  /* mask parameters ( 1 or 0 ) for the fit parameters. If 1
94  the corresponding parameter
95  is set free, if 0 the parameter is kept fixed. */
96  int mpar0 ; /* mask for the x-position */
97  int mpar1 ; /* mask for the y-position */
98  int mpar2 ; /* mask for the amplitude */
99  int mpar3 ; /* mask for the background */
100  int mpar4 ; /* mask for the fwhmx */
101  int mpar5 ; /* mask for the fwhmy */
102  int mpar6 ; /* mask for the position angle of fwhmx line */
103  /* name of the resulting ASCII file containing the fit parameters */
104  char fitlist[FILE_NAME_SZ] ;
105  /* indicator if the resulting 2D-Gaussian is stored in a fits
106  file or not */
107  int plotGaussInd ;
108  /* name of the fits file containing the resulting 2D-Gaussian */
109  char gaussplotName[FILE_NAME_SZ] ;
110 } focus_config ;
111 
112 /*---------------------------------------------------------------------------
113  Function prototypes
114  ---------------------------------------------------------------------------*/
122 focus_config *
123 sinfo_focus_cfg_create(void);
124 
131 void
132 sinfo_focus_cfg_destroy(focus_config * cc);
133 
134 #endif