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.7 2008/02/12 13:29:09 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 double sinfo_nev_ille(double x[], double f[], int n, double z, int* flag);
00067 
00068 float 
00069 sinfo_new_f_median(float * array, int n);
00070 
00071 float 
00072 sinfo_new_clean_mean( float * array,
00073                   int     n_elements,
00074                   float   throwaway_low,
00075                   float   throwaway_high ) ;
00076 
00077 
00088 pixelvalue 
00089 sinfo_new_median(pixelvalue * array, int n) ;
00134 int sinfo_new_lsqfit_c ( float  * xdat,
00135                int    * xdim,
00136                float  * ydat,
00137                float  * wdat,
00138                int    * ndat,
00139                float  * fpar,
00140                float  * epar,
00141                int    * mpar,
00142                int    * npar,
00143                float  * tol ,
00144                int    * its ,
00145                float  * lab  ) ;
00146 
00163 void 
00164 sinfo_my_fit (float x[], float y[], int ndata, float sig[], int mwt, float *a,
00165            float *b, float *siga, float *sigb, float *chi2, float *q) ;
00166 
00174 int 
00175 sinfo_new_nint ( double x ) ;
00176 
00190 int 
00191 sinfo_new_correlation ( float * data1, float * data2, int ndata ) ;
00192 
00200 void 
00201 sinfo_new_convert_ZEROs_to_0_for_images(cpl_image * im) ;
00202 
00210 void 
00211 sinfo_new_convert_ZEROs_to_0_for_cubes_range(cpl_imagelist * cube,
00212                                              const int z_min,
00213                                              const int z_max);
00214 
00224 void 
00225 sinfo_new_convert_0_to_ZERO_for_cubes_range(cpl_imagelist * cube,
00226                                             const int z_min,
00227                                             const int z_max);
00235 void 
00236 sinfo_new_convert_ZEROs_to_0_for_cubes(cpl_imagelist * cube) ;
00237 
00238 
00246 void 
00247 sinfo_new_convert_0_to_ZEROs_for_images(cpl_image * im) ;
00248 
00256 void 
00257 sinfo_new_convert_0_to_ZERO_for_cubes(cpl_imagelist * cube) ;
00258 
00266 void sinfo_new_invert(cpl_image * im) ;
00267 
00268 
00283 double * 
00284 sinfo_new_xcorrel(
00285     float      *    line_i,
00286     int             width_i,
00287     float      *    line_t,
00288     int             width_t,
00289     int             half_search,
00290     int     *       delta,
00291     int        *    maxpos,
00292     double     *    xcorr_max
00293 
00294 ) ;
00295 
00296 float 
00297 sinfo_new_nev_ille(float [], float [], int, float, int *);
00298 
00299 
00300 #endif 
00302 /*--------------------------------------------------------------------------*/
00303 

Generated on 8 Mar 2011 for SINFONI Pipeline Reference Manual by  doxygen 1.6.1