GIRAFFE Pipeline Reference Manual

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

This file is part of the GIRAFFE Pipeline Reference Manual 2.16.10.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Dec 15 2022 21:18:51 by doxygen 1.9.1 written by Dimitri van Heesch, © 1997-2004