giwavecalib_types.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef GIWAVECALIB_TYPES_H
00029 #define GIWAVECALIB_TYPES_H
00030
00031 #include <cxmacros.h>
00032 #include <cxtypes.h>
00033
00034 #include <cpl_image.h>
00035
00036 #include <gitable.h>
00037 #include <gislitgeometry.h>
00038 #include <gimath_lm.h>
00039
00040
00041 #ifdef __cplusplus
00042 extern "C" {
00043 #endif
00044
00045
00046
00047
00048
00049
00050 #define LP_GRWID 0
00051 #define LP_SATLV 1
00052 #define LP_WIDTH 2
00053 #define LP_THRES 3
00054 #define LP_OFFST 4
00055 #define LP_TYPE 5
00056 #define LP_WFACT 6
00057 #define LP_G_NPRMS 7
00058 #define LP_PSFEXP 7
00059 #define LP_E_NPRMS 8
00060
00061
00062
00063
00064
00065 #define LF_I_STATUS 0
00066 #define LF_I_WLEN 1
00067 #define LF_I_NITER 2
00068 #define LF_I_CHISQ 3
00069 #define LF_I_RSQ 4
00070 #define LF_I_XCCD 5
00071 #define LF_I_YCCD 6
00072 #define LF_O_PARAMS 7
00074
00075
00076
00077
00078 #define LF_R_AMPLI 0x0001
00079 #define LF_R_NITER 0x0002
00080 #define LF_R_CENTR 0x0004
00081 #define LF_R_WIDTH 0x0008
00082 #define LF_R_LEFT 0x0010
00083 #define LF_R_RIGHT 0x0020
00084 #define LF_R_OFFST 0x0040
00085 #define LF_R_BADLN 0x0080
00086 #define LF_R_ERROR 0x0100
00087 #define LF_R_PSFIT 0x0200
00088 #define LF_R_XRFIT 0x0400
00089 #define LF_R_RESOL 0x0800
00090 #define LF_R_XCCD 0x1000
00092
00093
00094
00095
00096 #define LF_G_AMPL 0
00097 #define LF_G_CENTER 1
00098 #define LF_G_BKGD 2
00099 #define LF_G_WIDTH 3
00100 #define LF_G_SAMPL 4
00101 #define LF_G_SCENTER 5
00102 #define LF_G_SBKGD 6
00103 #define LF_G_SWIDTH 7
00104 #define LF_G_NPARAMS 15
00106
00107
00108
00109
00110 #define LF_E_AMPL 0
00111 #define LF_E_CENTER 1
00112 #define LF_E_BKGD 2
00113 #define LF_E_WIDTH 3
00114 #define LF_E_EXPON 4
00115 #define LF_E_SAMPL 5
00116 #define LF_E_SCENTER 6
00117 #define LF_E_SBKGD 7
00118 #define LF_E_SWIDTH 8
00119 #define LF_E_SEXPON 9
00120 #define LF_E_NPARAMS 17
00122
00123
00124
00125
00126 #define DOUBLE2BOOLEAN 0.5
00127
00128
00135 enum GiLocDataType {
00136 GILOCDATATYPE_UNDEFINED,
00137 GILOCDATATYPE_FITTED_DATA,
00138 GILOCDATATYPE_FIT_COEFFS
00139 };
00140
00141 typedef enum GiLocDataType GiLocDataType;
00142
00143
00157 struct GiLocPosition {
00158 cxint ydeg;
00159 cxint wdeg;
00160 GiLocDataType type;
00161 cpl_image *centroids;
00162 cpl_image *widths;
00163 };
00164
00165 typedef struct GiLocPosition GiLocPosition;
00166
00167
00174 struct GiWcalSolution {
00175 cxbool subslitfit;
00176 lmrq_model_id opt_mod;
00177 cpl_matrix *opt_mod_params;
00178 GiSlitGeometry *wav_coeffs;
00179 };
00180
00181 typedef struct GiWcalSolution GiWcalSolution;
00182
00183 GiWcalSolution *giraffe_wcalsolution_new(void);
00184 GiWcalSolution *giraffe_wcalsolution_create(GiTable *);
00185 void giraffe_wcalsolution_delete(GiWcalSolution *);
00186 void giraffe_wcalsolution_dump(GiWcalSolution *);
00187
00188
00189 #ifdef __cplusplus
00190 }
00191 #endif
00192
00193 #endif