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

This file is part of the GIRAFFE Pipeline Reference Manual 2.17.1.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri Feb 21 2025 02:35:07 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2004