sinfo_recipes.h

00001 #ifndef SINFO_RECIPES_H
00002 #define SINFO_RECIPES_H
00003 /*
00004  * This file is part of the ESO SINFONI Pipeline
00005  * Copyright (C) 2004,2005 European Southern Observatory
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License as published by
00009  * the Free Software Foundation; either version 2 of the License, or
00010  * (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00020  */
00021 /*******************************************************************************
00022 * E.S.O. - VLT project
00023 *
00024 * "@(#) $Id: sinfo_recipes.h,v 1.4 2006/11/11 14:11:47 amodigli Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * schreib  05/06/00  created
00029 */
00030 
00031 /************************************************************************
00032  * recipes.h
00033  * some numerical recipes
00034  *----------------------------------------------------------------------
00035  */
00036 
00037 /*
00038  * header files
00039  */
00040 
00041 #include <cpl.h>
00042 #include <inttypes.h>
00043 #include <float.h>
00044 #include <math.h>
00045 #include "sinfo_pixel_handling.h"
00046 #include "sinfo_msg.h"
00047 
00048 
00049 /*----------------------------------------------------------------------------
00050  *                      defines
00051  *--------------------------------------------------------------------------*/
00052 /* definitions of initial values for sinfo_lsqfit_c in sinfo_linefit() 
00053    (wave_calibration) */
00054 #define XDIM         1         /* dimension of the x values */
00055 #define TOL          0.001     /* fitting tolerance */
00056 #define LAB          0.1       /* labda parameter */
00057 #define ITS          200       /* maximum number of iterations */
00058 #define MAXPAR       4         /* number of free parameters */
00059 #define LABFAC       10.0      /* labda step factor */
00060 #define LABMAX       1.0e+10   /* maximum value for labda */
00061 #define LABMIN       1.0e-10   /* minimum value for labda */
00062 
00063 /*----------------------------------------------------------------------------
00064  *                      Function ANSI C prototypes
00065  *--------------------------------------------------------------------------*/
00066 
00067 float 
00068 sinfo_new_f_median(float * array, int n);
00069 
00070 float 
00071 sinfo_new_clean_mean( float * array,
00072                   int     n_elements,
00073                   float   throwaway_low,
00074                   float   throwaway_high ) ;
00075 
00076 
00087 pixelvalue 
00088 sinfo_new_median(pixelvalue * array, int n) ;
00133 int sinfo_new_lsqfit_c ( float  * xdat,
00134                int    * xdim,
00135                float  * ydat,
00136                float  * wdat,
00137                int    * ndat,
00138                float  * fpar,
00139                float  * epar,
00140                int    * mpar,
00141                int    * npar,
00142                float  * tol ,
00143                int    * its ,
00144                float  * lab  ) ;
00145 
00162 void 
00163 sinfo_my_fit (float x[], float y[], int ndata, float sig[], int mwt, float *a,
00164            float *b, float *siga, float *sigb, float *chi2, float *q) ;
00165 
00173 int 
00174 sinfo_new_nint ( double x ) ;
00175 
00189 int 
00190 sinfo_new_correlation ( float * data1, float * data2, int ndata ) ;
00191 
00199 void 
00200 sinfo_new_convert_ZEROs_to_0_for_images(cpl_image * im) ;
00201 
00209 void 
00210 sinfo_new_convert_ZEROs_to_0_for_cubes_range(cpl_imagelist * cube,
00211                                              const int z_min,
00212                                              const int z_max);
00213 
00223 void 
00224 sinfo_new_convert_0_to_ZERO_for_cubes_range(cpl_imagelist * cube,
00225                                             const int z_min,
00226                                             const int z_max);
00234 void 
00235 sinfo_new_convert_ZEROs_to_0_for_cubes(cpl_imagelist * cube) ;
00236 
00237 
00245 void 
00246 sinfo_new_convert_0_to_ZEROs_for_images(cpl_image * im) ;
00247 
00255 void 
00256 sinfo_new_convert_0_to_ZERO_for_cubes(cpl_imagelist * cube) ;
00257 
00265 void sinfo_new_invert(cpl_image * im) ;
00266 
00267 
00282 double * 
00283 sinfo_new_xcorrel(
00284     float      *    line_i,
00285     int             width_i,
00286     float      *    line_t,
00287     int             width_t,
00288     int             half_search,
00289     int     *       delta,
00290     int        *    maxpos,
00291     double     *    xcorr_max
00292 
00293 ) ;
00294 
00295 float 
00296 sinfo_new_nev_ille(float [], float [], int, float, int *);
00297 
00298 
00299 #endif 
00301 /*--------------------------------------------------------------------------*/
00302 

Generated on Wed Jan 17 08:33:44 2007 for SINFONI Pipeline Reference Manual by  doxygen 1.4.4