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 : stack_cfg.h 00022 Author : Juergen Schreiber 00023 Created on : September 2001 00024 Description : stack_ini definitions + handling prototypes 00025 ---------------------------------------------------------------------------*/ 00026 #ifndef SINFO_STACK_CFG_H 00027 #define SINFO_STACK_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 prepare stacked images blackboard container 00042 00043 This structure holds all information related to the stacked images handling 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 stack_config_n { 00050 /*-------General---------*/ 00051 char inFile[FILE_NAME_SZ] ; /* file name of the file containing 00052 the list of all input frames */ 00053 char outName[FILE_NAME_SZ] ; /* output name of resulting fits 00054 wavelength map */ 00055 char sky_name[FILE_NAME_SZ] ; /* output name of resulting fits 00056 sky frame */ 00057 char ** framelist ; /* list of frames */ 00058 int * frametype ; /* list of frame types on or off */ 00059 int * frameposition ; /* list of grating positions */ 00060 int contains_sky ; /* indicates if off or sky frames were exposed */ 00061 int contains_ref ; /* indicates if ref frames were exposed */ 00062 int contains_dither ; /* indicates if spectral dithering 00063 was applied */ 00064 int contains_dark ; /* indicates if spectral 00065 dithering was applied */ 00066 int nframes ; /* number of frames in frame list */ 00067 int nobj ; /* number of object frames in frame list */ 00068 int noff ; /* number of off frames in frame list */ 00069 int ndark ; /* number of sinfo_dark frames in frame list */ 00070 int nditherobj ; /* number of dithered object 00071 frames in frame list */ 00072 int nditheroff ; /* number of dithered off frames in frame list */ 00073 00074 /*------ CleanMean ------*/ 00075 /* percentage of rejected low intensity pixels */ 00076 float loReject ; 00077 /* percentage of rejected high intensity pixels */ 00078 float hiReject ; 00079 00080 /*------ Flatfielding ------*/ 00081 /* indicator if a flatfielding is carried through or not */ 00082 int flatInd ; 00083 char flatfield1[FILE_NAME_SZ] ; /* name of the flatfield fits file 00084 for grating position 1 */ 00085 char flatfield2[FILE_NAME_SZ] ; /* name of the flatfield fits file 00086 for grating position 2 */ 00087 00088 /*------ BadPixel ------*/ 00089 /* indicates if the bad pixel mask should be applied or not */ 00090 int maskInd ; 00091 /* indicates if the pixels should be interpolated or indicated */ 00092 int indind ; 00093 /* file name of the bad pixel mask fits file */ 00094 char mask[FILE_NAME_SZ] ; 00095 /* maximal pixel distance from the bad pixel to which valid 00096 pixels are searched for*/ 00097 int maxRad ; 00098 /* file name of the slitlet sinfo_edge position list */ 00099 char slitposList[FILE_NAME_SZ] ; 00100 /* index file list*/ 00101 char indexlist[FILE_NAME_SZ] ; 00102 /* sigma factor for the additional bad pixel search 00103 in method maskInd = 2 */ 00104 float sigmaFactor ; 00105 00106 /*------ ColTilt ------*/ 00107 /* indicator if the tilt correction should be carried through */ 00108 /*int coltiltInd ;*/ 00109 /* file name of the ASCII file containing the slope value */ 00110 /*char slopeFile[FILE_NAME_SZ] ;*/ 00111 /* order of polynomial used for polynomial interpolation 00112 for the row shifting */ 00113 /*int order ;*/ 00114 /*------ WarpFix ------*/ 00115 /* indicator if the warping should be carried through */ 00116 int warpfixInd ; 00117 /* file name of the ASCII file containing the polynomial values */ 00118 char polyFile[FILE_NAME_SZ] ; 00119 /* file name of MASTER DARK */ 00120 char mdark[FILE_NAME_SZ] ; 00121 /* swich to indicate if a mdark file has been found */ 00122 int mdark_ind; 00123 /* kernel to be used for the interpolation */ 00124 char kernel[FILE_NAME_SZ] ; 00125 00126 /*------ Interleaving ------*/ 00127 /* indicator if the interleaving or Convolution with a 00128 Gaussian or nothing should take place */ 00129 int interInd ; 00130 /* number of rows from which the general offset between 00131 the frames is determined */ 00132 int noRows ; 00133 00134 /*------ GaussConvolution ------*/ 00135 /* indicator if Gaussian convolution is applied or not */ 00136 int gaussInd ; 00137 /* kernel half width of the Gaussian response function */ 00138 int hw ; 00139 00140 /*------ ShifFrames ------*/ 00141 /* indicator if shiftting frames is applied or not */ 00142 int sfInd; 00143 /* interpolation type*/ 00144 int sfType; 00145 /* interpolation order*/ 00146 int sfOrder; 00147 00148 /* qc log */ 00149 int qc_thresh_min; 00150 int qc_thresh_max; 00151 00152 } stack_config_n ; 00153 /*--------------------------------------------------------------------------- 00154 Function prototypes 00155 ---------------------------------------------------------------------------*/ 00163 stack_config_n * 00164 sinfo_stack_cfg_create_n(void); 00165 00166 00173 void 00174 sinfo_stack_cfg_destroy_n(stack_config_n * sc); 00175 00176 #endif