SINFONI Pipeline Reference Manual  2.6.0
sinfo_stack_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 : stack_cfg.h
22  Author : Juergen Schreiber
23  Created on : September 2001
24  Description : stack_ini definitions + handling prototypes
25  ---------------------------------------------------------------------------*/
26 #ifndef SINFO_STACK_CFG_H
27 #define SINFO_STACK_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  prepare stacked images blackboard container
42 
43  This structure holds all information related to the stacked images handling
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 stack_config_n {
50 /*-------General---------*/
51  char inFile[FILE_NAME_SZ] ; /* file name of the file containing
52  the list of all input frames */
53  char outName[FILE_NAME_SZ] ; /* output name of resulting fits
54  wavelength map */
55  char sky_name[FILE_NAME_SZ] ; /* output name of resulting fits
56  sky frame */
57  char ** framelist ; /* list of frames */
58  int * frametype ; /* list of frame types on or off */
59  int * frameposition ; /* list of grating positions */
60  int contains_sky ; /* indicates if off or sky frames were exposed */
61  int contains_ref ; /* indicates if ref frames were exposed */
62  int contains_dither ; /* indicates if spectral dithering
63  was applied */
64  int contains_dark ; /* indicates if spectral
65  dithering was applied */
66  int nframes ; /* number of frames in frame list */
67  int nobj ; /* number of object frames in frame list */
68  int noff ; /* number of off frames in frame list */
69  int ndark ; /* number of sinfo_dark frames in frame list */
70  int nditherobj ; /* number of dithered object
71  frames in frame list */
72  int nditheroff ; /* number of dithered off frames in frame list */
73 
74 /*------ CleanMean ------*/
75  /* percentage of rejected low intensity pixels */
76  float loReject ;
77  /* percentage of rejected high intensity pixels */
78  float hiReject ;
79 
80 /*------ Flatfielding ------*/
81  /* indicator if a flatfielding is carried through or not */
82  int flatInd ;
83  char flatfield1[FILE_NAME_SZ] ; /* name of the flatfield fits file
84  for grating position 1 */
85  char flatfield2[FILE_NAME_SZ] ; /* name of the flatfield fits file
86  for grating position 2 */
87 
88 /*------ BadPixel ------*/
89  /* indicates if the bad pixel mask should be applied or not */
90  int maskInd ;
91  /* indicates if the pixels should be interpolated or indicated */
92  int indind ;
93  /* file name of the bad pixel mask fits file */
94  char mask[FILE_NAME_SZ] ;
95  /* maximal pixel distance from the bad pixel to which valid
96  pixels are searched for*/
97  int maxRad ;
98  /* file name of the slitlet sinfo_edge position list */
99  char slitposList[FILE_NAME_SZ] ;
100  /* index file list*/
101  char indexlist[FILE_NAME_SZ] ;
102  /* sigma factor for the additional bad pixel search
103  in method maskInd = 2 */
104  float sigmaFactor ;
105 
106 /*------ ColTilt ------*/
107  /* indicator if the tilt correction should be carried through */
108  /*int coltiltInd ;*/
109  /* file name of the ASCII file containing the slope value */
110  /*char slopeFile[FILE_NAME_SZ] ;*/
111  /* order of polynomial used for polynomial interpolation
112  for the row shifting */
113  /*int order ;*/
114 /*------ WarpFix ------*/
115  /* indicator if the warping should be carried through */
116  int warpfixInd ;
117  /* file name of the ASCII file containing the polynomial values */
118  char polyFile[FILE_NAME_SZ] ;
119  /* file name of MASTER DARK */
120  char mdark[FILE_NAME_SZ] ;
121  /* swich to indicate if a mdark file has been found */
122  int mdark_ind;
123  /* kernel to be used for the interpolation */
124  char kernel[FILE_NAME_SZ] ;
125 
126 /*------ Interleaving ------*/
127  /* indicator if the interleaving or Convolution with a
128  Gaussian or nothing should take place */
129  int interInd ;
130  /* number of rows from which the general offset between
131  the frames is determined */
132  int noRows ;
133 
134 /*------ GaussConvolution ------*/
135  /* indicator if Gaussian convolution is applied or not */
136  int gaussInd ;
137  /* kernel half width of the Gaussian response function */
138  int hw ;
139 
140 /*------ ShifFrames ------*/
141  /* indicator if shiftting frames is applied or not */
142  int sfInd;
143  /* interpolation type*/
144  int sfType;
145  /* interpolation order*/
146  int sfOrder;
147 
148  /* qc log */
149  int qc_thresh_min;
150  int qc_thresh_max;
151 
152 } stack_config_n ;
153 /*---------------------------------------------------------------------------
154  Function prototypes
155  ---------------------------------------------------------------------------*/
163 stack_config_n *
164 sinfo_stack_cfg_create_n(void);
165 
166 
173 void
174 sinfo_stack_cfg_destroy_n(stack_config_n * sc);
175 
176 #endif