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 : bad_cfg.h 00022 Author : Juergen Schreiber 00023 Created on : October 2001 00024 Description : bad_ini definitions + handling prototypes 00025 00026 ---------------------------------------------------------------------------*/ 00027 #ifndef SINFO_BAD_CFG_H 00028 #define SINFO_BAD_CFG_H 00029 /*--------------------------------------------------------------------------- 00030 Includes 00031 ---------------------------------------------------------------------------*/ 00032 #include <stdlib.h> 00033 #include "sinfo_globals.h" 00034 #include <cpl.h> 00035 00036 /*--------------------------------------------------------------------------- 00037 Defines 00038 ---------------------------------------------------------------------------*/ 00039 /*--------------------------------------------------------------------------- 00040 New types 00041 ---------------------------------------------------------------------------*/ 00042 /* 00043 bad pixels search blackboard container 00044 00045 This structure holds all information related to the bad pixels search 00046 routine. It is used as a container for the flux of ancillary data, 00047 computed values, and algorithm status. Pixel flux is separated from 00048 the blackboard. 00049 */ 00050 00051 typedef struct bad_config { 00052 /*-------General---------*/ 00053 char inFile[FILE_NAME_SZ] ; /* file name of the file containing 00054 the list of all input frames */ 00055 char outName[FILE_NAME_SZ] ; /* output name of resulting bad pixel 00056 mask (fits file)*/ 00057 char ** framelist ; /* list of frames */ 00058 int nframes ; /* number of frames in frame list */ 00059 00060 /*------ BadPix ------*/ 00061 /* factor of noise within which the pixels are used to fit a 00062 straight line to the column intensity */ 00063 float sigmaFactor ; 00064 /* factor of calculated standard deviation beyond which the 00065 deviation of a pixel value from the 00066 median of the 8 nearest neighbors declares a pixel as bad */ 00067 float factor ; 00068 /* number of iterations of sinfo_median filter */ 00069 int iterations ; 00070 /* percentage of extreme pixel value to reject when calculating 00071 the mean and stdev */ 00072 float loReject ; 00073 float hiReject ; 00074 /* pixel coordinate of lower left edge of a rectangle zone from 00075 which image statistics are computed */ 00076 int llx ; 00077 int lly ; 00078 /* pixel coordinate of upper right edge of a rectangle zone from 00079 which image statistics are computed */ 00080 int urx ; 00081 int ury ; 00082 /*------ Thresh ------*/ 00083 /* indicates if the values beyond threshold values should 00084 be marked as bad before proceeding 00085 to sinfo_median filtering */ 00086 int threshInd ; 00087 /* factor to the clean standard deviation to define the 00088 threshold deviation from the clean mean */ 00089 float meanfactor ; 00090 /* minimum vlaue of good data */ 00091 float mincut ; 00092 /* maximum vlaue of good data */ 00093 float maxcut ; 00094 /* indicates which method will be used */ 00095 int methodInd ; 00096 } bad_config ; 00097 00098 /*--------------------------------------------------------------------------- 00099 Function prototypes 00100 ---------------------------------------------------------------------------*/ 00101 00102 00110 bad_config * 00111 sinfo_bad_cfg_create(void); 00112 00113 00120 void 00121 sinfo_bad_cfg_destroy(bad_config * sc); 00122 00123 00124 #endif