00001 /* 00002 * This file is part of the ESO SINFONI Pipeline 00003 * Copyright (C) 2004,2005 European Southern Observatory 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA 00018 */ 00019 /*--------------------------------------------------------------------------- 00020 00021 File name : sinfo_wavecal_cfg.h 00022 Author : Juergen Schreiber 00023 Created on : September 2001 00024 Description : wavecal_ini definitions + handling prototypes 00025 ---------------------------------------------------------------------------*/ 00026 #ifndef SINFO_WAVECAL_CFG_H 00027 #define SINFO_WAVECAL_CFG_H 00028 /*--------------------------------------------------------------------------- 00029 Includes 00030 ---------------------------------------------------------------------------*/ 00031 #include <stdlib.h> 00032 #include <cpl.h> 00033 #include "sinfo_globals.h" 00034 /*--------------------------------------------------------------------------- 00035 Defines 00036 ---------------------------------------------------------------------------*/ 00037 /*--------------------------------------------------------------------------- 00038 New types 00039 ---------------------------------------------------------------------------*/ 00040 /* 00041 Wavelength calibration blackboard container 00042 00043 This structure holds all information related to the wavelength calibration 00044 routine. It is used as a container for the flux of ancillary data, 00045 computed values, and algorithm status. Pixel flux is separated from 00046 the blackboard. 00047 */ 00048 00049 typedef struct wave_config { 00050 /*-------General---------*/ 00051 char inFrame[FILE_NAME_SZ] ; /* input emission line frame */ 00052 char lineList[FILE_NAME_SZ] ; /* input wavelength and intensity 00053 line list */ 00054 char outName[FILE_NAME_SZ] ; /* output name of resulting 00055 fits wavelength map */ 00056 char drs_setup[FILE_NAME_SZ] ; /* DRS setup table */ 00057 00058 /*------ FindLines ------*/ 00059 /* indicates if the dispersion relation is already determined or not */ 00060 int calibIndicator ; 00061 /* estimated central wavelength of the image */ 00062 float guessBeginWavelength ; 00063 /* estimated linear dispersion of emission line frame */ 00064 float guessDispersion1 ; 00065 /* estimated square dispersion of emission line frame */ 00066 float guessDispersion2 ; 00067 /* minimal difference of mean and sinfo_median column intensity */ 00068 float mindiff ; 00069 /* half width of a box within which the line must sit */ 00070 int halfWidth ; 00071 /* sigma of Gaussian of artificial model spectra */ 00072 float sigma ; 00073 00074 /*------ WaveCalib ------*/ 00075 /* guess value for fwhm of emission lines */ 00076 float fwhm ; 00077 /* minimum amplitude of a line to be fitted */ 00078 float minAmplitude ; 00079 /* maximal residual value for a valid fit */ 00080 float maxResidual ; 00081 /* # of polynomial coefficients used for the dispersion relation */ 00082 int nrDispCoefficients ; 00083 /* # of polynomial coefficients used for the fit of 00084 the dispersion coefficients */ 00085 int nrCoefCoefficients ; 00086 /* minimal factor of the standard deviation of the fit coefficients */ 00087 float sigmaFactor ; 00088 /* indicates if the parameterized dispersion relation coefficients 00089 should be written into an ASCII file */ 00090 int writeCoeffsInd ; 00091 /* indicates if the fit parameters should be written 00092 into an ASCII file */ 00093 int writeParInd ; 00094 /* name of the ASCII file containing the fit parameters */ 00095 char paramsList[FILE_NAME_SZ] ; 00096 /* name of the ASCII file containing the coefficients 00097 of the parameterized dispersion relation */ 00098 char coeffsName[FILE_NAME_SZ] ; 00099 /* number of slitlets */ 00100 int nslitlets ; 00101 /* minimal pixel distance of slitlets in spectral direction */ 00102 int pixeldist ; 00103 /* allowed pixel position tolerance between estimated 00104 and fitted line position */ 00105 float pixel_tolerance ; 00106 00107 /*------ WaveMap ------*/ 00108 /* indicator if wavelength map should be generated or not */ 00109 int wavemapInd ; 00110 /* magnifying factor for FFT */ 00111 int magFactor ; 00112 00113 /*------ FitSlits ------*/ 00114 /* indicator if the fit of the slit edge positions is carried 00115 through or not */ 00116 int slitposIndicator ; 00117 /* indicator if the fit model function is a Boltzmann 00118 function or not */ 00119 int fitBoltzIndicator ; 00120 /* indicator if the fit model function is a simple edge 00121 function or not */ 00122 int fitEdgeIndicator ; 00123 /* indicator if the fit guess position are user given or 00124 calculated automatically */ 00125 int estimateIndicator ; 00126 /* pixel length of the row box within which the fit of the 00127 slitlet positions is carried out*/ 00128 int boxLength ; 00129 /* lower row position for the estimate fit */ 00130 int loPos ; 00131 /* upper row position for the estimate fit */ 00132 int hiPos ; 00133 /* float box half width in spectral direction */ 00134 float yBox ; 00135 /* maximal tolerable difference to the expected slitlet positions */ 00136 float diffTol ; 00137 /* name of the ASCII file containing the slitlet edge positions */ 00138 char slitposName[FILE_NAME_SZ] ; 00139 /* name of the ASCII file containing the estimated slitlet 00140 edge positions */ 00141 char slitposGuessName[FILE_NAME_SZ] ; 00142 00143 00144 int qc_thresh_min; 00145 int qc_thresh_max; 00146 00147 } wave_config ; 00148 00149 /*--------------------------------------------------------------------------- 00150 Function prototypes 00151 ---------------------------------------------------------------------------*/ 00159 wave_config * 00160 sinfo_wave_cfg_create(void); 00168 void 00169 sinfo_wave_cfg_destroy(wave_config * jc); 00170 00171 #endif