sinfo_flat_cfg.h

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_flat_cfg.h
00022    Author         :    Juergen Schreiber
00023    Created on    :    march 2002
00024    Description    :    flat_ini definitions + handling prototypes
00025  ---------------------------------------------------------------------------*/
00026 #ifndef SINFO_FLAT_CFG_H
00027 #define SINFO_FLAT_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 lamp flat fields blackboard container
00042 
00043   This structure holds all information related to the flatfield 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 flat_config {
00050 /*-------General---------*/
00051         char inFile[FILE_NAME_SZ] ; /* file name of the file containing the 
00052                                        list of all input frames */
00053         char outName[FILE_NAME_SZ] ; /* output name of resulting fits 
00054                                         wavelength map */
00055         char ** framelist ; /* list of frames */
00056         int  * frametype ; /* list of frame types on or off */
00057         int  * frameposition ; /* list of grating positions */  
00058         int    contains_sky ; /* indicates if off or sky frames were exposed */
00059      int    contains_dither ; /* indicates if spectral dithering was applied */
00060         int    nframes ; /* number of frames in frame list */
00061         int    nobj ;  /* number of object frames in frame list */
00062         int    noff ;  /* number of off frames in frame list */
00063      int    nditherobj ; /* number of dithered object frames in frame list */
00064         int    nditheroff ; /* number of dithered off frames in frame list */
00065 /*------ CleanMean ------*/
00066         /* percentage of rejected low intensity pixels */
00067         float loReject ;      
00068         /* percentage of rejected high intensity pixels */
00069         float hiReject ;
00070 /*------ BadPixel ------*/
00071         /* indicator if the bad pixels of the flat field are known and 
00072            if they should be interpolated or not */
00073         int interpolInd ;
00074         /* file name of the bad pixel mask fits file */
00075         char mask[FILE_NAME_SZ] ;
00076         /* maximal pixel distance from the bad pixel to which valid 
00077            pixels are searched for*/ 
00078         int maxRad ;
00079         /* file name of the slitlet sinfo_edge position list */
00080         char slitposList[FILE_NAME_SZ] ;
00081 /*------ BadPix ------*/
00082         /* indicator if a bad pixel mask should be generated or not */
00083         int badInd ;
00084         /* name of the static bad pixel mask to be generated */
00085         char maskname[FILE_NAME_SZ] ;
00086         /* factor of noise within which the pixels are used to fit a 
00087            straight line to the column intensity */
00088         float sigmaFactor ;
00089         /* factor of calculated standard deviation beyond which the 
00090            deviation of a pixel value from the
00091            median of the 8 nearest neighbors declares a pixel as bad */
00092         float factor ;
00093         /* number of iterations of sinfo_median filter */
00094         int iterations ;
00095         /* percentage of extreme pixel value to reject when calculating 
00096            the mean and stdev */
00097         float badLoReject ;
00098         float badHiReject ;
00099         /* pixel coordinate of lower left edge of a rectangle zone 
00100            from which image statistics are computed */
00101         int llx ;
00102         int lly ;
00103         /* pixel coordinate of upper right edge of a rectangle zone from 
00104            which image statistics are computed */
00105         int urx ;
00106         int ury ;
00107 /*------ Thresh ------*/
00108         /* indicates if the values beyond threshold values should be 
00109            marked as bad before proceeding
00110            to sinfo_median filtering */
00111         int threshInd ;
00112         /* factor to the clean standard deviation to define the 
00113            threshold deviation from the clean mean */
00114         float meanfactor ;
00115 
00116 
00117   /* QC LOG */
00118 
00119   /* FPN */
00120   int qc_fpn_xmin1;
00121   int qc_fpn_xmax1;
00122   int qc_fpn_ymin1;
00123   int qc_fpn_ymax1;
00124 
00125   int qc_fpn_xmin2;
00126   int qc_fpn_xmax2;
00127   int qc_fpn_ymin2;
00128   int qc_fpn_ymax2;
00129 
00130   int qc_thresh_min;
00131   int qc_thresh_max;
00132 
00133 
00134 } flat_config ;
00135  
00136 /*---------------------------------------------------------------------------
00137                                Function prototypes
00138  ---------------------------------------------------------------------------*/
00146 flat_config * 
00147 sinfo_flat_cfg_create(void);
00155 void 
00156 sinfo_flat_cfg_destroy(flat_config * sc);
00157 
00158 #endif

Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1