GIRAFFE Pipeline Reference Manual

gibias.h
1 /* $Id$
2  *
3  * This file is part of the GIRAFFE Pipeline
4  * Copyright (C) 2002-2006 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author$
23  * $Date$
24  * $Revision$
25  * $Name$
26  */
27 
28 #ifndef GIBIAS_H
29 #define GIBIAS_H
30 
31 #include <cxstring.h>
32 
33 #include <cpl_macros.h>
34 #include <cpl_parameterlist.h>
35 #include <cpl_matrix.h>
36 
37 #include <giimage.h>
38 
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 
45 enum GiBiasMethod {
46  GIBIAS_METHOD_UNDEFINED,
47  GIBIAS_METHOD_UNIFORM,
48  GIBIAS_METHOD_PLANE,
49  GIBIAS_METHOD_CURVE,
50  GIBIAS_METHOD_PROFILE,
51  GIBIAS_METHOD_MASTER,
52  GIBIAS_METHOD_ZMASTER
53 };
54 
55 typedef enum GiBiasMethod GiBiasMethod;
56 
57 
58 enum GiBiasOption {
59  GIBIAS_OPTION_UNDEFINED,
60  GIBIAS_OPTION_PLANE,
61  GIBIAS_OPTION_CURVE
62 };
63 
64 typedef enum GiBiasOption GiBiasOption;
65 
66 
67 enum GiBiasModel {
68  GIBIAS_MODEL_UNDEFINED,
69  GIBIAS_MODEL_FITTED,
70  GIBIAS_MODEL_MEAN
71 };
72 
73 typedef enum GiBiasModel GiBiasModel;
74 
75 
76 struct GiBiasConfig {
77  GiBiasMethod method;
78  GiBiasModel model;
79  GiBiasOption option;
80  cxdouble mbias;
81  cxint remove;
82  cxchar* areas;
83  cxdouble xdeg;
84  cxdouble ydeg;
85  cxdouble xstep;
86  cxdouble ystep;
87  cxdouble sigma;
88  cxint iterations;
89  cxdouble fraction;
90 };
91 
92 typedef struct GiBiasConfig GiBiasConfig;
93 
94 
95 /*
96  * Bias removal
97  */
98 
99 cxint
100 giraffe_bias_remove(GiImage* result_img, const GiImage* raw_frame,
101  const GiImage* master_bias, const GiImage* bad_pixels,
102  const cpl_matrix* biaslimits, const GiBiasConfig* config);
103 
104 
105 /*
106  * Utility functions
107  */
108 
109 cpl_matrix* giraffe_get_raw_areas(const GiImage* image);
110 cxint giraffe_trim_raw_areas(GiImage* image);
111 
112 
113 /*
114  * Convenience functions
115  */
116 
117 GiBiasConfig* giraffe_bias_config_create(cpl_parameterlist* list);
118 void giraffe_bias_config_destroy(GiBiasConfig* config);
119 
120 void giraffe_bias_config_add(cpl_parameterlist* list);
121 
122 
123 #ifdef __cplusplus
124 }
125 #endif
126 
127 #endif /* GIBIAS_H */
cxint giraffe_bias_remove(GiImage *result_img, const GiImage *raw_frame, const GiImage *master_bias, const GiImage *bad_pixels, const cpl_matrix *biaslimits, const GiBiasConfig *config)
Removes the bias from an image.
Definition: gibias.c:3114
void giraffe_bias_config_destroy(GiBiasConfig *config)
Destroys a bias removal setup structure.
Definition: gibias.c:3577
cxint giraffe_trim_raw_areas(GiImage *image)
Remove pre- and overscan ares from an image.
Definition: gibias.c:2922
GiBiasConfig * giraffe_bias_config_create(cpl_parameterlist *list)
Creates a setup structure for a bias removal task.
Definition: gibias.c:3446
void giraffe_bias_config_add(cpl_parameterlist *list)
Adds parameters for the bias removal.
Definition: gibias.c:3605
cpl_matrix * giraffe_get_raw_areas(const GiImage *image)
Create bias areas from an image.
Definition: gibias.c:2720

This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:41 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004