irplib_wavecal.h

00001 /* $Id: irplib_wavecal.h,v 1.6 2008/11/07 17:10:39 llundin Exp $
00002  *
00003  * This file is part of the IRPLIB Pipeline
00004  * Copyright (C) 2002,2003 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  02111-1307  USA
00019  */
00020 
00021 /*
00022  * $Author: llundin $
00023  * $Date: 2008/11/07 17:10:39 $
00024  * $Revision: 1.6 $
00025  * $Name: visir-3_2_2 $
00026  */
00027 
00028 #ifndef IRPLIB_WAVECAL_H
00029 #define IRPLIB_WAVECAL_H
00030 
00031 /*-----------------------------------------------------------------------------
00032                                    Includes
00033  -----------------------------------------------------------------------------*/
00034 
00035 #include <cpl.h>
00036 
00037 
00038 /*-----------------------------------------------------------------------------
00039                                    Define
00040  -----------------------------------------------------------------------------*/
00041 
00042 #define IRPLIB_WAVECAL_MODEL_COEFFS       4
00043 /* The number of columns is 5 + IRPLIB_WAVECAL_MODEL_COEFFS */
00044 #define IRPLIB_WAVECAL_MODEL_COLS         9
00045 
00046 #define IRPLIB_WAVECAL_LAB_MODE           "SpecMode"
00047 #define IRPLIB_WAVECAL_LAB_RESID          "Residual"
00048 #define IRPLIB_WAVECAL_LAB_ORDER          "Fit_Order"
00049 #define IRPLIB_WAVECAL_LAB_XMIN           "XMin"
00050 #define IRPLIB_WAVECAL_LAB_XMAX           "XMax"
00051 #define IRPLIB_WAVECAL_LAB_C1             "C_1"
00052 #define IRPLIB_WAVECAL_LAB_C2             "C_2"
00053 #define IRPLIB_WAVECAL_LAB_C3             "C_3"
00054 #define IRPLIB_WAVECAL_LAB_C4             "C_4"
00055 
00056 #define IRPLIB_WAVECAL_LAB_WAVE           "WAVELENGTH"
00057 #define IRPLIB_WAVECAL_LAB_INTENS         "INTENSITY"
00058 
00059 
00060 /*-----------------------------------------------------------------------------
00061                                New Types
00062  -----------------------------------------------------------------------------*/
00063 
00064 typedef struct {
00065     double               wslit;  /* Slit Width */
00066     double               wfwhm;  /* FWHM of transfer function */
00067     double               xtrunc; /* Truncate transfer function beyond xtrunc,
00068                                     xtrunc > 0 */
00069     const cpl_bivector * lines;  /* Catalogue of intensities, with
00070                                     increasing X-vector elements */
00071     cpl_vector         * linepix;  /* Catalogue of line pixel positions
00072                                       - zero for uninitialized */
00073     unsigned             cost;    /* May be incremented for cost counting */
00074 } irplib_line_spectrum_model;
00075 
00076 /*-----------------------------------------------------------------------------
00077                                    Function Prototypes
00078  -----------------------------------------------------------------------------*/
00079 
00080 cpl_error_code
00081 irplib_polynomial_shift_1d_from_correlation(cpl_polynomial *,
00082                                             const cpl_vector *,
00083                                             void *,
00084                                             cpl_error_code (*)
00085                                             (cpl_vector *,
00086                                              const cpl_polynomial *,
00087                                              void *, int),
00088                                             int, cpl_boolean);
00089 
00090 cpl_error_code
00091 irplib_polynomial_find_1d_from_correlation(cpl_polynomial *, int,
00092                                            const cpl_vector *,
00093                                            void *,
00094                                            cpl_error_code (*)
00095                                            (cpl_vector *,
00096                                             const cpl_polynomial *,
00097                                             void *, int),
00098                                            double, double,
00099                                            int, int, double *);
00100 
00101 cpl_error_code irplib_vector_fill_line_spectrum(cpl_vector *,
00102                                                 const cpl_polynomial *,
00103                                                 void *,
00104                                                 int);
00105 
00106 cpl_error_code irplib_plot_spectrum_and_model(const cpl_vector *,
00107                                               const cpl_polynomial *,
00108                                               void *,
00109                                               cpl_error_code (*)
00110                                               (cpl_vector *,
00111                                                const cpl_polynomial *,
00112                                                void *, int));
00113 
00114 cpl_error_code irplib_polynomial_fit_2d_dispersion(cpl_polynomial *,
00115                                                    const cpl_image *,
00116                                                    int, double *);
00117 #endif

Generated on Fri Jul 3 11:15:23 2009 for VISIR Pipeline Reference Manual by  doxygen 1.5.8