SINFONI Pipeline Reference Manual  2.5.2
sinfo_function_1d.h
1 /*
2  * This file is part of the ESO SINFONI Pipeline
3  * Copyright (C) 2004,2005 European Southern Observatory
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18  */
19 /*----------------------------------------------------------------------------
20 
21  File name : sinfo_function_1d.h
22  Author : Nicolas Devillard
23  Created on : Tue, Sept 23 1997
24  Description : 1d signal processing related routines
25  ---------------------------------------------------------------------------*/
26 /*
27  $Id: sinfo_function_1d.h,v 1.6 2008-03-25 08:20:43 amodigli Exp $
28  $Author: amodigli $
29  $Date: 2008-03-25 08:20:43 $
30  $Revision: 1.6 $
31  */
32 #ifndef SINFO_FUNCTION_1D_H
33 #define SINFO_FUNCTION_1D_H
34 /*----------------------------------------------------------------------------
35  Includes
36  ---------------------------------------------------------------------------*/
37 #include <math.h>
38 #include "sinfo_local_types.h"
39 #include "sinfo_pixel_handling.h"
40 #include "sinfo_msg.h"
41 #include <cpl.h>
42 /*----------------------------------------------------------------------------
43  Defines
44  ---------------------------------------------------------------------------*/
45 /* Low pass filter types: */
46 
47 #define LOW_PASS_LINEAR 100
48 #define LOW_PASS_GAUSSIAN 101
49 /*----------------------------------------------------------------------------
50  Function ANSI C prototypes
51  ---------------------------------------------------------------------------*/
67 pixelvalue *
68 sinfo_function1d_new(int nsamples);
69 
79 void
80 sinfo_function1d_del(pixelvalue * s);
97 pixelvalue *
98 sinfo_function1d_dup(pixelvalue * arr, int ns);
99 
116 double
117 sinfo_function1d_find_centroid(
118  pixelvalue * line, /* the input line */
119  int npix /* number of pixels in this line */
120 );
121 
144 double
145 sinfo_function1d_find_locmax(
146  pixelvalue * line,
147  int npix,
148  int where,
149  int hs
150 ) ;
151 
152 
177 pixelvalue *
178 sinfo_function1d_filter_lowpass(
179  pixelvalue * input_sig,
180  int samples,
181  int filter_type,
182  int hw
183 ) ;
184 
203 pixelvalue *
204 sinfo_function1d_median_smooth(
205  pixelvalue * list,
206  int np,
207  int hw);
208 
225 pixelvalue *
226 sinfo_function1d_remove_lowfreq(
227  pixelvalue * loc_signal,
228  int ns);
229 
251 pixelvalue *
252 sinfo_function1d_remove_thermalbg(
253  pixelvalue * pixel_signal,
254  int ns);
255 
256 
278 void
279 sinfo_function1d_interpolate_linear(
280  pixelvalue * x,
281  pixelvalue * y,
282  int len,
283  pixelvalue * spl_x,
284  pixelvalue * spl_y,
285  int spl_len
286 );
287 
288 
314 int
315 sinfo_function1d_natural_spline(
316  pixelvalue * x,
317  pixelvalue * y,
318  int len,
319  pixelvalue * splX,
320  pixelvalue * splY,
321  int splLen
322 ) ;
323 
324 
343 pixelvalue
344 sinfo_function1d_average_reject(
345  pixelvalue * line,
346  int npix,
347  int pix_low,
348  int pix_high);
349 
374 double
375 sinfo_function1d_xcorrelate(
376  pixelvalue * line_i,
377  int width_i,
378  pixelvalue * line_t,
379  int width_t,
380  int half_search,
381  double * delta);
382 
383 #endif