SINFONI Pipeline Reference Manual  2.6.0
sinfo_wavecal_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_wavecal_cfg.h
22  Author : Juergen Schreiber
23  Created on : September 2001
24  Description : wavecal_ini definitions + handling prototypes
25  ---------------------------------------------------------------------------*/
26 #ifndef SINFO_WAVECAL_CFG_H
27 #define SINFO_WAVECAL_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  Wavelength calibration blackboard container
42 
43  This structure holds all information related to the wavelength calibration
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 wave_config {
50 /*-------General---------*/
51  char inFrame[FILE_NAME_SZ] ; /* input emission line frame */
52  char lineList[FILE_NAME_SZ] ; /* input wavelength and intensity
53  line list */
54  char outName[FILE_NAME_SZ] ; /* output name of resulting
55  fits wavelength map */
56  char drs_setup[FILE_NAME_SZ] ; /* DRS setup table */
57 
58 /*------ FindLines ------*/
59  /* indicates if the dispersion relation is already determined or not */
60  int calibIndicator ;
61  /* estimated central wavelength of the image */
62  float guessBeginWavelength ;
63  /* estimated linear dispersion of emission line frame */
64  float guessDispersion1 ;
65  /* estimated square dispersion of emission line frame */
66  float guessDispersion2 ;
67  /* minimal difference of mean and sinfo_median column intensity */
68  float mindiff ;
69  /* half width of a box within which the line must sit */
70  int halfWidth ;
71  /* sigma of Gaussian of artificial model spectra */
72  float sigma ;
73 
74 /*------ WaveCalib ------*/
75  /* guess value for fwhm of emission lines */
76  float fwhm ;
77  /* minimum amplitude of a line to be fitted */
78  float minAmplitude ;
79  /* maximal residual value for a valid fit */
80  float maxResidual ;
81  /* # of polynomial coefficients used for the dispersion relation */
82  int nrDispCoefficients ;
83  /* # of polynomial coefficients used for the fit of
84  the dispersion coefficients */
85  int nrCoefCoefficients ;
86  /* minimal factor of the standard deviation of the fit coefficients */
87  float sigmaFactor ;
88  /* indicates if the parameterized dispersion relation coefficients
89  should be written into an ASCII file */
90  int writeCoeffsInd ;
91  /* indicates if the fit parameters should be written
92  into an ASCII file */
93  int writeParInd ;
94  /* name of the ASCII file containing the fit parameters */
95  char paramsList[FILE_NAME_SZ] ;
96  /* name of the ASCII file containing the coefficients
97  of the parameterized dispersion relation */
98  char coeffsName[FILE_NAME_SZ] ;
99  /* number of slitlets */
100  int nslitlets ;
101  /* minimal pixel distance of slitlets in spectral direction */
102  int pixeldist ;
103  /* allowed pixel position tolerance between estimated
104  and fitted line position */
105  float pixel_tolerance ;
106 
107 /*------ WaveMap ------*/
108  /* indicator if wavelength map should be generated or not */
109  int wavemapInd ;
110  /* magnifying factor for FFT */
111  int magFactor ;
112 
113 /*------ FitSlits ------*/
114  /* indicator if the fit of the slit edge positions is carried
115  through or not */
116  int slitposIndicator ;
117  /* indicator if the fit model function is a Boltzmann
118  function or not */
119  int fitBoltzIndicator ;
120  /* indicator if the fit model function is a simple edge
121  function or not */
122  int fitEdgeIndicator ;
123  /* indicator if the fit guess position are user given or
124  calculated automatically */
125  int estimateIndicator ;
126  /* pixel length of the row box within which the fit of the
127  slitlet positions is carried out*/
128  int boxLength ;
129  /* lower row position for the estimate fit */
130  int loPos ;
131  /* upper row position for the estimate fit */
132  int hiPos ;
133  /* float box half width in spectral direction */
134  float yBox ;
135  /* maximal tolerable difference to the expected slitlet positions */
136  float diffTol ;
137  /* name of the ASCII file containing the slitlet edge positions */
138  char slitposName[FILE_NAME_SZ] ;
139  /* name of the ASCII file containing the estimated slitlet
140  edge positions */
141  char slitposGuessName[FILE_NAME_SZ] ;
142 
143 
144  int qc_thresh_min;
145  int qc_thresh_max;
146 
147 } wave_config ;
148 
149 /*---------------------------------------------------------------------------
150  Function prototypes
151  ---------------------------------------------------------------------------*/
159 wave_config *
160 sinfo_wave_cfg_create(void);
168 void
169 sinfo_wave_cfg_destroy(wave_config * jc);
170 
171 #endif