GIRAFFE Pipeline Reference Manual

giwavecalib_types.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 GIWAVECALIB_TYPES_H
29 #define GIWAVECALIB_TYPES_H
30 
31 #include <cxmacros.h>
32 #include <cxtypes.h>
33 
34 #include <cpl_image.h>
35 
36 #include <gitable.h>
37 #include <gislitgeometry.h>
38 #include <gimath_lm.h>
39 
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 
46 /*
47  * Line Fitting Parameters
48  */
49 
50 #define LP_GRWID 0
51 #define LP_SATLV 1
52 #define LP_WIDTH 2
53 #define LP_THRES 3
54 #define LP_OFFST 4
55 #define LP_TYPE 5
56 #define LP_WFACT 6
57 #define LP_G_NPRMS 7 /* total number of parameters (gaussian) */
58 #define LP_PSFEXP 7
59 #define LP_E_NPRMS 8 /* total number of parameters (exponential) */
60 
61 /*
62  * Fitted line parameters indices
63  */
64 
65 #define LF_I_STATUS 0
66 #define LF_I_WLEN 1
67 #define LF_I_NITER 2
68 #define LF_I_CHISQ 3
69 #define LF_I_RSQ 4
70 #define LF_I_XCCD 5
71 #define LF_I_YCCD 6
72 #define LF_O_PARAMS 7
74 /*
75  * Line fitting rejection codes
76  */
77 
78 #define LF_R_AMPLI 0x0001
79 #define LF_R_NITER 0x0002
80 #define LF_R_CENTR 0x0004
81 #define LF_R_WIDTH 0x0008
82 #define LF_R_LEFT 0x0010
83 #define LF_R_RIGHT 0x0020
84 #define LF_R_OFFST 0x0040
85 #define LF_R_BADLN 0x0080
86 #define LF_R_ERROR 0x0100
87 #define LF_R_PSFIT 0x0200
88 #define LF_R_XRFIT 0x0400
89 #define LF_R_RESOL 0x0800
90 #define LF_R_XCCD 0x1000
92 /*
93  * Fitted line parameters offset for gaussian profile
94  */
95 
96 #define LF_G_AMPL 0
97 #define LF_G_CENTER 1
98 #define LF_G_BKGD 2
99 #define LF_G_WIDTH 3
100 #define LF_G_SAMPL 4
101 #define LF_G_SCENTER 5
102 #define LF_G_SBKGD 6
103 #define LF_G_SWIDTH 7
104 #define LF_G_NPARAMS 15
106 /*
107  * Fitted line parameters offset for exponential profile
108  */
109 
110 #define LF_E_AMPL 0
111 #define LF_E_CENTER 1
112 #define LF_E_BKGD 2
113 #define LF_E_WIDTH 3
114 #define LF_E_EXPON 4
115 #define LF_E_SAMPL 5
116 #define LF_E_SCENTER 6
117 #define LF_E_SBKGD 7
118 #define LF_E_SWIDTH 8
119 #define LF_E_SEXPON 9
120 #define LF_E_NPARAMS 17
122 /*
123  * General defines
124  */
125 
126 #define DOUBLE2BOOLEAN 0.5
127 
128 
135 enum GiLocDataType {
139 };
140 
141 typedef enum GiLocDataType GiLocDataType;
142 
143 
157 struct GiLocPosition {
158  cxint ydeg;
159  cxint wdeg;
160  GiLocDataType type;
161  cpl_image *centroids;
162  cpl_image *widths;
163 };
164 
165 typedef struct GiLocPosition GiLocPosition;
166 
167 
174 struct GiWcalSolution {
175  cxbool subslitfit;
176  lmrq_model_id opt_mod;
177  cpl_matrix *opt_mod_params;
178  GiSlitGeometry *wav_coeffs;
179 };
180 
181 typedef struct GiWcalSolution GiWcalSolution;
182 
183 GiWcalSolution *giraffe_wcalsolution_new(void);
184 GiWcalSolution *giraffe_wcalsolution_create(GiTable *);
185 void giraffe_wcalsolution_delete(GiWcalSolution *);
186 void giraffe_wcalsolution_dump(GiWcalSolution *);
187 
188 
189 #ifdef __cplusplus
190 }
191 #endif
192 
193 #endif /* GIWAVECALIB_TYPES_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.12.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Mon Mar 24 2014 11:43:53 by doxygen 1.8.2 written by Dimitri van Heesch, © 1997-2004