SINFONI Pipeline Reference Manual  2.5.2
sinfo_standstar_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 
22  File name : sinfo_standstar_cfg.h
23  Author : Juergen Schreiber
24  Created on : March 2002
25  Description : standstar_ini definitions + handling prototypes
26 
27  ---------------------------------------------------------------------------*/
28 
29 
30 #ifndef SINFO_STANDSTAR_CFG_H
31 #define SINFO_STANDSTAR_CFG_H
32 
33 /*---------------------------------------------------------------------------
34  Includes
35  ---------------------------------------------------------------------------*/
36 
37 #include <stdlib.h>
38 #include "sinfo_globals.h"
39 #include <cpl.h>
40 
41 
42 /*---------------------------------------------------------------------------
43  Defines
44  ---------------------------------------------------------------------------*/
45 
46 
47 /*---------------------------------------------------------------------------
48  New types
49  ---------------------------------------------------------------------------*/
50 
51 
52 /*
53  standard star data reduction blackboard container
54 
55  This structure holds all information related to the standard
56  star data reduction
57  routine. It is used as a container for the flux of ancillary data,
58  computed values, and algorithm status. Pixel flux is separated from
59  the blackboard.
60  */
61 
62 typedef struct standstar_config {
63 /*-------General---------*/
64  char inFile[FILE_NAME_SZ] ;/* input file of reduced jittered
65  data cubes of a standard star */
66  char ** inFrameList ; /* input list of cubes */
67  int nframes ; /* number of input frames */
68  char outName[FILE_NAME_SZ] ; /* output name of resulting
69  extracted spectrum stored
70  as fits image */
71 
72 /*------ spectral extraction and determination of conversion factor ------*/
73  /* the fraction [0...1] of rejected low intensity pixels when
74  taking the average of jittered spectra */
75  float lo_reject ;
76  /* the fraction [0...1] of rejected high intensity pixels when
77  taking the average of jittered spectra */
78  float hi_reject ;
79  /* lower left sinfo_edge coordinates of fitting box for
80  2d Gaussian fit */
81  int llx ;
82  int lly ;
83  /* size of a box inside which the 2D-Gaussian fit is carried through */
84  int halfbox_x ;
85  int halfbox_y ;
86 
87  /* factor applied to the found fwhms of a 2D-Gaussian
88  fit, defines the radius of the aperture from which the
89  spectral extraction is carried out (default: 0.7). */
90  float fwhm_factor ;
91  /* (readnoise^2 + sinfo_dark current) needed to determine the
92  noise variance of the background. Must be given in counts/sec. */
93  float backvariance ;
94  /* estimated sky counts/sec */
95  float sky ;
96  /* gain: counts per electron */
97  float gain ;
98  /* indicator if an intensity conversion factor should be
99  determined or not */
100  int convInd ;
101  /* name of the ASCII file that stores the intensity conversion factor */
102  char convName[FILE_NAME_SZ] ;
103  /* magnitude of the standard star */
104  float mag ;
105 } standstar_config ;
106 
107 
108 
109 /*---------------------------------------------------------------------------
110  Function prototypes
111  ---------------------------------------------------------------------------*/
112 
113 
114 /*---------------------------------------------------------------------------
115  Function : sinfo_standstar_cfg_create()
116  In : void
117  Out : pointer to allocated base standstar_config structure
118  Job : allocate memory for a standstar_config struct
119  Notice : only the main (base) structure is allocated
120  ---------------------------------------------------------------------------*/
121 
122 standstar_config * sinfo_standstar_cfg_create(void);
123 
124 
125 /*---------------------------------------------------------------------------
126  Function : sinfo_standstar_cfg_destroy()
127  In : standstar_config to deallocate
128  Out : void
129  Job : deallocate all memory associated with a
130  standstar_config data structure
131  Notice :
132  ---------------------------------------------------------------------------*/
133 void sinfo_standstar_cfg_destroy(standstar_config * cc);
134 
135 #endif