GIRAFFE Pipeline Reference Manual

gibias.h

00001 /* $Id: gibias.h,v 1.6 2007/03/12 12:53:23 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: 2007/03/12 12:53:23 $
00024  * $Revision: 1.6 $
00025  * $Name: giraffe-2_5_1 $
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_MASTER,
00051     GIBIAS_METHOD_ZMASTER
00052 };
00053 
00054 typedef enum GiBiasMethod GiBiasMethod;
00055 
00056 
00057 enum GiBiasOption {
00058     GIBIAS_OPTION_UNDEFINED,
00059     GIBIAS_OPTION_PLANE,
00060     GIBIAS_OPTION_CURVE
00061 };
00062 
00063 typedef enum GiBiasOption GiBiasOption;
00064 
00065 
00066 enum GiBiasModel {
00067     GIBIAS_MODEL_UNDEFINED,
00068     GIBIAS_MODEL_FITTED,
00069     GIBIAS_MODEL_MEAN
00070 };
00071 
00072 typedef enum GiBiasModel GiBiasModel;
00073 
00074 
00075 struct GiBiasConfig {
00076     GiBiasMethod method;
00077     GiBiasModel  model;
00078     GiBiasOption option;
00079     cxdouble     mbias;
00080     cxint        remove;
00081     cxchar       *areas;
00082     cxdouble     xdeg;
00083     cxdouble     ydeg;
00084     cxdouble     xstep;
00085     cxdouble     ystep;
00086     cxdouble     sigma;
00087     cxint        iterations;
00088     cxdouble     fraction;
00089 };
00090 
00091 typedef struct GiBiasConfig GiBiasConfig;
00092 
00093 
00094 /*
00095  * Overscan areas removal
00096  */
00097 
00098 cpl_matrix *giraffe_get_raw_areas(GiImage *image);
00099 cxint giraffe_trim_raw_areas(GiImage *image);
00100 
00101 /*
00102  * Bias removal
00103  */
00104 
00105 cxint
00106 giraffe_bias_remove(GiImage *result_img, GiImage *raw_frame,
00107                     GiImage *master_bias, GiImage *bad_pixels,
00108                     cpl_matrix *biaslimits, GiBiasConfig *config);
00109 
00110 
00111 /*
00112  * Convenience functions
00113  */
00114 
00115 GiBiasConfig *giraffe_bias_config_create(cpl_parameterlist *list);
00116 void giraffe_bias_config_destroy(GiBiasConfig *config);
00117 
00118 void giraffe_bias_config_add(cpl_parameterlist *list);
00119 
00120 
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124 
00125 #endif /* GIBIAS_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.5.1.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Tue Mar 18 10:47:41 2008 by doxygen 1.4.6 written by Dimitri van Heesch, © 1997-2004