GIRAFFE Pipeline Reference Manual

giwavecalib_types.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 GIWAVECALIB_TYPES_H
21 #define GIWAVECALIB_TYPES_H
22 
23 #include <cxmacros.h>
24 #include <cxtypes.h>
25 
26 #include <cpl_image.h>
27 
28 #include <gitable.h>
29 #include <gislitgeometry.h>
30 #include <gimath_lm.h>
31 
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 
38 /*
39  * Line Fitting Parameters
40  */
41 
42 #define LP_GRWID 0
43 #define LP_SATLV 1
44 #define LP_WIDTH 2
45 #define LP_THRES 3
46 #define LP_OFFST 4
47 #define LP_TYPE 5
48 #define LP_WFACT 6
49 #define LP_G_NPRMS 7 /* total number of parameters (gaussian) */
50 #define LP_PSFEXP 7
51 #define LP_E_NPRMS 8 /* total number of parameters (exponential) */
52 
53 /*
54  * Fitted line parameters indices
55  */
56 
57 #define LF_I_STATUS 0
58 #define LF_I_WLEN 1
59 #define LF_I_NITER 2
60 #define LF_I_CHISQ 3
61 #define LF_I_RSQ 4
62 #define LF_I_XCCD 5
63 #define LF_I_YCCD 6
64 #define LF_O_PARAMS 7
66 /*
67  * Line fitting rejection codes
68  */
69 
70 #define LF_R_AMPLI 0x0001
71 #define LF_R_NITER 0x0002
72 #define LF_R_CENTR 0x0004
73 #define LF_R_WIDTH 0x0008
74 #define LF_R_LEFT 0x0010
75 #define LF_R_RIGHT 0x0020
76 #define LF_R_OFFST 0x0040
77 #define LF_R_BADLN 0x0080
78 #define LF_R_ERROR 0x0100
79 #define LF_R_PSFIT 0x0200
80 #define LF_R_XRFIT 0x0400
81 #define LF_R_RESOL 0x0800
82 #define LF_R_XCCD 0x1000
84 /*
85  * Fitted line parameters offset for gaussian profile
86  */
87 
88 #define LF_G_AMPL 0
89 #define LF_G_CENTER 1
90 #define LF_G_BKGD 2
91 #define LF_G_WIDTH 3
92 #define LF_G_SAMPL 4
93 #define LF_G_SCENTER 5
94 #define LF_G_SBKGD 6
95 #define LF_G_SWIDTH 7
96 #define LF_G_NPARAMS 15
98 /*
99  * Fitted line parameters offset for exponential profile
100  */
101 
102 #define LF_E_AMPL 0
103 #define LF_E_CENTER 1
104 #define LF_E_BKGD 2
105 #define LF_E_WIDTH 3
106 #define LF_E_EXPON 4
107 #define LF_E_SAMPL 5
108 #define LF_E_SCENTER 6
109 #define LF_E_SBKGD 7
110 #define LF_E_SWIDTH 8
111 #define LF_E_SEXPON 9
112 #define LF_E_NPARAMS 17
114 /*
115  * General defines
116  */
117 
118 #define DOUBLE2BOOLEAN 0.5
119 
120 
127 enum GiLocDataType {
131 };
132 
133 typedef enum GiLocDataType GiLocDataType;
134 
135 
149 struct GiLocPosition {
150  cxint ydeg;
151  cxint wdeg;
152  GiLocDataType type;
153  cpl_image *centroids;
154  cpl_image *widths;
155 };
156 
157 typedef struct GiLocPosition GiLocPosition;
158 
159 
166 struct GiWcalSolution {
167  cxbool subslitfit;
168  lmrq_model_id opt_mod;
169  cpl_matrix *opt_mod_params;
170  GiSlitGeometry *wav_coeffs;
171 };
172 
173 typedef struct GiWcalSolution GiWcalSolution;
174 
175 GiWcalSolution *giraffe_wcalsolution_new(void);
176 GiWcalSolution *giraffe_wcalsolution_create(GiTable *);
177 void giraffe_wcalsolution_delete(GiWcalSolution *);
178 void giraffe_wcalsolution_dump(GiWcalSolution *);
179 
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif /* GIWAVECALIB_TYPES_H */
GiLocDataType
Definition: girebinning.c:60
@ GILOCDATATYPE_UNDEFINED
@ GILOCDATATYPE_FIT_COEFFS
@ GILOCDATATYPE_FITTED_DATA
GiWcalSolution * giraffe_wcalsolution_new(void)
Create a new GiWcalSolution.
void giraffe_wcalsolution_delete(GiWcalSolution *)
Destroy an GiWcalSolution.
void giraffe_wcalsolution_dump(GiWcalSolution *)
Dump the the information contained in a GiWcalSolution to output.
GiWcalSolution * giraffe_wcalsolution_create(GiTable *)
Create a wavecalibration results structure based on a GiTable read from disk.
The slit geometry object definition.

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