SINFONI Pipeline Reference Manual  2.6.0
sinfo_object_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_object_cfg.h
22  Author : Juergen Schreiber
23  Created on : April 2002
24  Description : object_ini definitions + handling prototypes
25 
26  ---------------------------------------------------------------------------*/
27 #ifndef SINFO_OBJECT_CFG_H
28 #define SINFO_OBJECT_CFG_H
29 /*---------------------------------------------------------------------------
30  Includes
31  ---------------------------------------------------------------------------*/
32 #include <stdlib.h>
33 #include "sinfo_globals.h"
34 #include <cpl.h>
35 /*---------------------------------------------------------------------------
36  Defines
37  ---------------------------------------------------------------------------*/
38 /*---------------------------------------------------------------------------
39  New types
40  ---------------------------------------------------------------------------*/
41 /*
42  data cube creation blackboard container
43 
44  This structure holds all information related to the object
45  data cube creation routine. It is used as a container for the
46  flux of ancillary data, computed values, and algorithm status.
47  Pixel flux is separated from the blackboard.
48  */
49 
50 typedef struct object_config {
51 /*-------General---------*/
52  char inFile[FILE_NAME_SZ] ; /* input file of reduced jittered
53  data cubes of a standard star */
54  char ** framelist ; /* input averaged, bad pixel corrected, sky
55  subtracted, flatfielded and interleaved
56  jittered frame list */
57  char wavemap[FILE_NAME_SZ] ; /* input wavelength calibration map */
58  char mflat[FILE_NAME_SZ] ; /* input master flat field */
59  char outName[FILE_NAME_SZ] ; /* output name of resulting fits
60  data cube(s) */
61  char sky_dist[FILE_NAME_SZ] ; /* master flat corrected for distortion */
62  char mflat_dist[FILE_NAME_SZ] ; /* master flat corrected for distortion */
63  char mflat_dither_dist[FILE_NAME_SZ] ; /* master flat dithered
64  corrected for distortion */
65  int nframes ; /* number of jittered frames */
66 
67 /*------ jittering ------*/
68  /* jitter mode indicator: 0 for user jittering mode,
69  1 for auto jittering mode */
70  int jitterind ;
71  /* x-pixel size of the final combined data cube */
72  int size_x ;
73  /* y-pixel size of the final combined data cube */
74  int size_y ;
75  /* the name of the interpolation kernel */
76  char kernel_type[FILE_NAME_SZ] ;
77  /* the name of the final image sinfo_median of cube */
78  char med_cube_name[FILE_NAME_SZ] ;
79  /* the name of the final mask cube */
80  char maskname[FILE_NAME_SZ] ;
81  /* the name of the fits file with the polynom for the shift
82  * due atmospheric refraction */
83  char polyshiftname[FILE_NAME_SZ] ;
84 
85 /*------ Resampling ------*/
86  /* number of coefficients for the polynomial
87  interpolation (order + 1) */
88  int ncoeffs ;
89  /* number of rows in the resulting resampled
90  image = number of spectral bins */
91  int nrows ;
92 
93 /*------ Calibration ------*/
94  /* indicates if the halogen lamp feature from
95  flatfielding should be corrected for or not */
96  int halocorrectInd ;
97  /* name of the fits file of the calibrated halogen lamp spectrum */
98  char halospectrum[FILE_NAME_SZ] ;
99 
100 /*------ CubeCreation ------*/
101  /* indicates if the slitlet distances are determined
102  by a north-south test (1)
103  or slitlet edge fits (0) */
104  int northsouthInd ;
105  /* name of the ASCII list of the distances of the slitlets */
106  char distlist[FILE_NAME_SZ] ;
107  /* name of the ASCII list of the fitted slitlet sinfo_edge positions */
108  char poslist[FILE_NAME_SZ] ;
109  /* number of slitlets (32) */
110  int nslits ;
111  /* sub pixel position of the column position of the left sinfo_edge of
112  the first slitlet needed if the slitlet distances were determined
113  by a north south test */
114  char firstCol[FILE_NAME_SZ] ;
115 
116 /*------ FineTuning ------*/
117  /* indicator for the shifting method to use */
118  char method[FILE_NAME_SZ] ;
119  /* order of polynomial if the polynomial interpolation shifting
120  method is used */
121  int order ;
122 
123 /*------ SkyExtraction ------*/
124  /* percentage of rejected low value pixels when averaging the
125  sky spectra */
126  float loReject ;
127  /* percentage of rejected high value pixels when averaging the
128  sky spectra */
129  float hiReject ;
130  /* pixel distance tolerance to the dividing diagonal line,
131  these pixels are not considered to be sure to get only
132  "clean" sky pixels */
133  int tolerance ;
134 } object_config ;
135 
136 /*---------------------------------------------------------------------------
137  Function prototypes
138  ---------------------------------------------------------------------------*/
146 object_config *
147 sinfo_object_cfg_create(void);
148 
149 
156 void
157 sinfo_object_cfg_destroy(object_config * cc);
158 
159 #endif