sinfo_function_1d.h

00001 /*
00002  * This file is part of the ESO SINFONI Pipeline
00003  * Copyright (C) 2004,2005 European Southern Observatory
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA
00018  */
00019 /*----------------------------------------------------------------------------
00020    
00021    File name     :    sinfo_function_1d.h
00022    Author         :    Nicolas Devillard
00023    Created on    :    Tue, Sept 23 1997    
00024    Description    :    1d signal processing related routines    
00025  ---------------------------------------------------------------------------*/
00026 /*
00027  $Id: sinfo_function_1d.h,v 1.6 2008/03/25 08:20:43 amodigli Exp $
00028  $Author: amodigli $
00029  $Date: 2008/03/25 08:20:43 $
00030  $Revision: 1.6 $
00031  */
00032 #ifndef SINFO_FUNCTION_1D_H
00033 #define SINFO_FUNCTION_1D_H
00034 /*----------------------------------------------------------------------------
00035                                    Includes
00036  ---------------------------------------------------------------------------*/
00037 #include <math.h>
00038 #include "sinfo_local_types.h"
00039 #include "sinfo_pixel_handling.h"
00040 #include "sinfo_msg.h"
00041 #include <cpl.h>
00042 /*----------------------------------------------------------------------------
00043                                    Defines
00044  ---------------------------------------------------------------------------*/
00045 /* Low pass filter types: */
00046 
00047 #define LOW_PASS_LINEAR            100
00048 #define LOW_PASS_GAUSSIAN        101
00049 /*----------------------------------------------------------------------------
00050                           Function ANSI C prototypes
00051  ---------------------------------------------------------------------------*/
00067 pixelvalue * 
00068 sinfo_function1d_new(int nsamples);
00069 
00079 void 
00080 sinfo_function1d_del(pixelvalue * s);
00097 pixelvalue * 
00098 sinfo_function1d_dup(pixelvalue * arr, int ns);
00099 
00116 double
00117 sinfo_function1d_find_centroid(
00118     pixelvalue  *   line,   /*  the input line                  */
00119     int             npix    /*  number of pixels in this line   */
00120 );
00121 
00144 double
00145 sinfo_function1d_find_locmax(
00146     pixelvalue  *   line,
00147     int             npix,
00148     int             where,
00149     int             hs
00150 ) ;
00151 
00152 
00177 pixelvalue *
00178 sinfo_function1d_filter_lowpass(
00179     pixelvalue  *   input_sig,
00180     int             samples,
00181     int             filter_type,
00182     int             hw
00183 ) ;
00184 
00203 pixelvalue * 
00204 sinfo_function1d_median_smooth(
00205     pixelvalue * list,
00206     int          np,
00207     int          hw);
00208 
00225 pixelvalue * 
00226 sinfo_function1d_remove_lowfreq(
00227     pixelvalue * loc_signal,
00228     int          ns);
00229 
00251 pixelvalue * 
00252 sinfo_function1d_remove_thermalbg(
00253     pixelvalue * pixel_signal,
00254     int          ns);
00255 
00256 
00278 void 
00279 sinfo_function1d_interpolate_linear(
00280     pixelvalue  *   x,
00281     pixelvalue  *   y,
00282     int             len,
00283     pixelvalue  *   spl_x,
00284     pixelvalue  *   spl_y,
00285     int             spl_len
00286 );
00287 
00288 
00314 int
00315 sinfo_function1d_natural_spline(
00316     pixelvalue  *   x,
00317     pixelvalue  *   y,
00318     int             len,
00319     pixelvalue  *   splX,
00320     pixelvalue  *   splY,
00321     int             splLen
00322 ) ;
00323 
00324 
00343 pixelvalue
00344 sinfo_function1d_average_reject(
00345     pixelvalue  *   line,
00346     int             npix,
00347     int             pix_low,
00348     int             pix_high);
00349 
00374 double 
00375 sinfo_function1d_xcorrelate(
00376     pixelvalue *    line_i,
00377     int             width_i,
00378     pixelvalue *    line_t,
00379     int             width_t,
00380     int             half_search,
00381     double     *    delta);
00382 
00383 #endif

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