GIRAFFE Pipeline Reference Manual

gibias.h

00001 /* $Id: gibias.h,v 1.7 2008/07/10 11:27:35 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * $Author: rpalsa $
00023  * $Date: 2008/07/10 11:27:35 $
00024  * $Revision: 1.7 $
00025  * $Name: giraffe-2_8_8 $
00026  */
00027 
00028 #ifndef GIBIAS_H
00029 #define GIBIAS_H
00030 
00031 #include <cxstring.h>
00032 
00033 #include <cpl_macros.h>
00034 #include <cpl_parameterlist.h>
00035 #include <cpl_matrix.h>
00036 
00037 #include <giimage.h>
00038 
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044 
00045 enum GiBiasMethod {
00046     GIBIAS_METHOD_UNDEFINED,
00047     GIBIAS_METHOD_UNIFORM,
00048     GIBIAS_METHOD_PLANE,
00049     GIBIAS_METHOD_CURVE,
00050     GIBIAS_METHOD_PROFILE,
00051     GIBIAS_METHOD_MASTER,
00052     GIBIAS_METHOD_ZMASTER
00053 };
00054 
00055 typedef enum GiBiasMethod GiBiasMethod;
00056 
00057 
00058 enum GiBiasOption {
00059     GIBIAS_OPTION_UNDEFINED,
00060     GIBIAS_OPTION_PLANE,
00061     GIBIAS_OPTION_CURVE
00062 };
00063 
00064 typedef enum GiBiasOption GiBiasOption;
00065 
00066 
00067 enum GiBiasModel {
00068     GIBIAS_MODEL_UNDEFINED,
00069     GIBIAS_MODEL_FITTED,
00070     GIBIAS_MODEL_MEAN
00071 };
00072 
00073 typedef enum GiBiasModel GiBiasModel;
00074 
00075 
00076 struct GiBiasConfig {
00077     GiBiasMethod method;
00078     GiBiasModel  model;
00079     GiBiasOption option;
00080     cxdouble     mbias;
00081     cxint        remove;
00082     cxchar*      areas;
00083     cxdouble     xdeg;
00084     cxdouble     ydeg;
00085     cxdouble     xstep;
00086     cxdouble     ystep;
00087     cxdouble     sigma;
00088     cxint        iterations;
00089     cxdouble     fraction;
00090 };
00091 
00092 typedef struct GiBiasConfig GiBiasConfig;
00093 
00094 
00095 /*
00096  * Bias removal
00097  */
00098 
00099 cxint
00100 giraffe_bias_remove(GiImage* result_img, const GiImage* raw_frame,
00101                     const GiImage* master_bias, const GiImage* bad_pixels,
00102                     const cpl_matrix* biaslimits, const GiBiasConfig* config);
00103 
00104 
00105 /*
00106  * Utility functions
00107  */
00108 
00109 cpl_matrix* giraffe_get_raw_areas(const GiImage* image);
00110 cxint giraffe_trim_raw_areas(GiImage* image);
00111 
00112 
00113 /*
00114  * Convenience functions
00115  */
00116 
00117 GiBiasConfig* giraffe_bias_config_create(cpl_parameterlist* list);
00118 void giraffe_bias_config_destroy(GiBiasConfig* config);
00119 
00120 void giraffe_bias_config_add(cpl_parameterlist* list);
00121 
00122 
00123 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif /* GIBIAS_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.8.8.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri Mar 4 10:50:26 2011 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004