GIRAFFE Pipeline Reference Manual

giwavecalib_types.h

00001 /* $Id: giwavecalib_types.h,v 1.10 2007/03/12 12:53:23 rpalsa Exp $
00002  *
00003  * This file is part of the GIRAFFE Pipeline
00004  * Copyright (C) 2002-2006 European Southern Observatory
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019  */
00020 
00021 /*
00022  * $Author: rpalsa $
00023  * $Date: 2007/03/12 12:53:23 $
00024  * $Revision: 1.10 $
00025  * $Name: giraffe-2_9 $
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  *      Line Fitting Parameters
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        /* total number of parameters (gaussian)    */
00058 #define LP_PSFEXP     7
00059 #define LP_E_NPRMS    8        /* total number of parameters (exponential) */
00060 
00061 /*
00062  *      Fitted line parameters indices
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  *      Line fitting rejection codes
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  *      Fitted line parameters offset for gaussian profile
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  *      Fitted line parameters offset for exponential profile
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  *      General defines
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 /* GIWAVECALIB_TYPES_H */

This file is part of the GIRAFFE Pipeline Reference Manual 2.9.0.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Thu Jan 26 14:20:29 2012 by doxygen 1.6.3 written by Dimitri van Heesch, © 1997-2004