00001
00002 /*---------------------------------------------------------------------------
00003
00004 File name : flat_cfg.h
00005 Author : Juergen Schreiber
00006 Created on : march 2002
00007 Description : flat_ini definitions + handling prototypes
00008
00009 ---------------------------------------------------------------------------*/
00010
00011
00012 #ifndef _FLAT_CFG_H_
00013 #define _FLAT_CFG_H_
00014
00015 /*---------------------------------------------------------------------------
00016 Includes
00017 ---------------------------------------------------------------------------*/
00018
00019 /*
00020 #include <stdio.h>
00021 */
00022 #include <stdlib.h>
00023 #include "static_sz.h"
00024
00025
00026 /*---------------------------------------------------------------------------
00027 Defines
00028 ---------------------------------------------------------------------------*/
00029
00030
00031 /*---------------------------------------------------------------------------
00032 New types
00033 ---------------------------------------------------------------------------*/
00034
00035
00036 /*
00037 prepare lamp flat fields blackboard container
00038
00039 This structure holds all information related to the flatfield handling
00040 routine. It is used as a container for the flux of ancillary data,
00041 computed values, and algorithm status. Pixel flux is separated from
00042 the blackboard.
00043 */
00044
00045 /*<python>*/
00046 typedef struct flat_config {
00047 /*-------General---------*/
00048 char inFile[FILENAMESZ] ; /* file name of the file containing the list of all input frames */
00049 char outName[FILENAMESZ] ; /* output name of resulting fits wavelength map */
00050 char ** framelist ; /* list of frames */
00051 int * frametype ; /* list of frame types on or off */
00052 int * frameposition ; /* list of grating positions */
00053 int contains_sky ; /* indicates if off or sky frames were exposed */
00054 int contains_dither ; /* indicates if spectral dithering was applied */
00055 int nframes ; /* number of frames in frame list */
00056 int nobj ; /* number of object frames in frame list */
00057 int noff ; /* number of off frames in frame list */
00058 int nditherobj ; /* number of dithered object frames in frame list */
00059 int nditheroff ; /* number of dithered off frames in frame list */
00060 /*------ CleanMean ------*/
00061 /* percentage of rejected low intensity pixels */
00062 float loReject ;
00063 /* percentage of rejected high intensity pixels */
00064 float hiReject ;
00065 /*------ BadPixel ------*/
00066 /* indicator if the bad pixels of the flat field are known and if they should
00067 be interpolated or not */
00068 int interpolInd ;
00069 /* file name of the bad pixel mask fits file */
00070 char mask[FILENAMESZ] ;
00071 /* maximal pixel distance from the bad pixel to which valid pixels are searched for*/
00072 int maxRad ;
00073 /* file name of the slitlet edge position list */
00074 char slitposList[FILENAMESZ] ;
00075 /*------ BadPix ------*/
00076 /* indicator if a bad pixel mask should be generated or not */
00077 int badInd ;
00078 /* name of the static bad pixel mask to be generated */
00079 char maskname[FILENAMESZ] ;
00080 /* factor of noise within which the pixels are used to fit a straight line to the column intensity */
00081 float sigmaFactor ;
00082 /* factor of calculated standard deviation beyond which the deviation of a pixel value from the
00083 median of the 8 nearest neighbors declares a pixel as bad */
00084 float factor ;
00085 /* number of iterations of median filter */
00086 int iterations ;
00087 /* percentage of extreme pixel value to reject when calculating the mean and stdev */
00088 float badLoReject ;
00089 float badHiReject ;
00090 /* pixel coordinate of lower left edge of a rectangle zone from which image statistics are computed */
00091 int llx ;
00092 int lly ;
00093 /* pixel coordinate of upper right edge of a rectangle zone from which image statistics are computed */
00094 int urx ;
00095 int ury ;
00096 /*------ Thresh ------*/
00097 /* indicates if the values beyond threshold values should be marked as bad before proceeding
00098 to median filtering */
00099 int threshInd ;
00100 /* factor to the clean standard deviation to define the threshold deviation from the clean mean */
00101 float meanfactor ;
00102
00103
00104 /* QC LOG */
00105
00106 /* FPN */
00107 int qc_fpn_xmin1;
00108 int qc_fpn_xmax1;
00109 int qc_fpn_ymin1;
00110 int qc_fpn_ymax1;
00111
00112 int qc_fpn_xmin2;
00113 int qc_fpn_xmax2;
00114 int qc_fpn_ymin2;
00115 int qc_fpn_ymax2;
00116
00117 int qc_thresh_min;
00118 int qc_thresh_max;
00119
00120
00121 } flat_config ;
00122 /*</python>*/
00123
00124
00125
00126 /*---------------------------------------------------------------------------
00127 Function prototypes
00128 ---------------------------------------------------------------------------*/
00129
00130
00131 /*---------------------------------------------------------------------------
00132 Function : flat_cfg_create()
00133 In : void
00134 Out : pointer to allocated base flat_cfg structure
00135 Job : allocate memory for a flat_cfg struct
00136 Notice : only the main (base) structure is allocated
00137 ---------------------------------------------------------------------------*/
00138
00139 flat_config * flat_cfg_create(void);
00140
00141
00142 /*---------------------------------------------------------------------------
00143 Function : flat_cfg_destroy()
00144 In : flat_config to deallocate
00145 Out : void
00146 Job : deallocate all memory associated with a flat_config data structure
00147 Notice :
00148 ---------------------------------------------------------------------------*/
00149 /*<python>*/
00150 void flat_cfg_destroy(flat_config * sc);
00151 /*</python>*/
00152
00153 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001