SINFONI Pipeline Reference Manual  2.6.0
sinfo_wave_calibration.h
1 #ifndef SINFO_WAVE_CALIBRATION_H
2 #define SINFO_WAVE_CALIBRATION_H
3 /*
4  * This file is part of the ESO SINFONI Pipeline
5  * Copyright (C) 2004,2005 European Southern Observatory
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
20  */
21 /*******************************************************************************
22 * E.S.O. - VLT project
23 *
24 * "@(#) $Id: sinfo_wave_calibration.h,v 1.5 2008-03-25 08:20:43 amodigli Exp $"
25 *
26 * who when what
27 * -------- -------- ----------------------------------------------
28 * schreib 13/07/00 created
29 */
30 
31 /************************************************************************
32  * wave_calibration.h
33  * routines needed for wavelength calibration
34  *----------------------------------------------------------------------
35  */
36 
37 /*
38  * header files
39  */
40 
41 #include <cpl.h>
42 #include "sinfo_wavecal.h"
43 /*
44  * function prototypes
45  */
46 
54 FitParams **
55 sinfo_new_fit_params( int n_params ) ;
56 
64 void
65 sinfo_new_destroy_fit_params ( FitParams *** params ) ;
66 
75 void
76 sinfo_new_dump_fit_params_to_ascii ( FitParams ** params, const char * filename ) ;
77 
86 void
87 sinfo_new_dump_ascii_to_fit_params ( FitParams ** params, char * filename ) ;
88 
129 int
130 sinfo_new_find_lines(cpl_image * lineImage,
131  float * wave_position,
132  float * wave_intensity,
133  int n_lines,
134  int ** row_clean,
135  float ** wavelength_clean,
136  float beginWave,
137  float dispersion1,
138  float dispersion2,
139  float mindiff,
140  int halfWidth,
141  int * n_found_lines,
142  float sigma,
143  int * sum_lines ) ;
144 
153 int
154 sinfo_new_read_list( char * listname,
155  float * lineCenter,
156  float * lineIntensity ) ;
157 
187 int
188 sinfo_new_line_fit (cpl_image * mergedImage,
189  FitParams * par,
190  float fwhm,
191  int lineInd,
192  int column,
193  int halfWidth,
194  int lineRow,
195  float min_amplitude,
196  Vector * line,
197  int * mpar,
198  float * xdat,
199  float * wdat ) ;
200 
225 int
226 sinfo_new_fit_lines (cpl_image * line_image,
227  FitParams ** allParams,
228  float fwhm,
229  int * n_lines,
230  int ** row,
231  float ** wavelength,
232  int width,
233  float min_amplitude ) ;
234 
257 float
258 sinfo_new_polyfit( FitParams ** par,
259  int column,
260  int n_lines,
261  int n_rows,
262  float dispersion,
263  float max_residual,
264  float * acoefs,
265  float * dacoefs,
266  int * n_reject,
267  int n_fitcoefs ) ;
268 
285 float
286 sinfo_new_coefs_cross_fit ( int n_columns,
287  float * acoefs,
288  float * dacoefs,
289  float * bcoefs,
290  int n_fitcoefs,
291  float sigma_factor ) ;
292 
311 cpl_image *
312 sinfo_new_wave_map(cpl_image * lineImage,
313  float ** bcoefs,
314  int n_a_fitcoefs,
315  int n_b_fitcoefs,
316  float * wavelength,
317  float * intensity,
318  int n_lines,
319  int magFactor) ;
320 
365 int
366 sinfo_new_wavelength_calibration(cpl_image * image,
367  FitParams ** par ,
368  float ** bcoefs,
369  float * wave,
370  int n_lines,
371  int ** row_clean,
372  float ** wavelength_clean,
373  int * n_found_lines,
374  float dispersion,
375  int halfWidth,
376  float minAmplitude,
377  float max_residual,
378  float fwhm,
379  int n_a_fitcoefs,
380  int n_b_fitcoefs,
381  float sigmaFactor,
382  float pixel_tolerance ) ;
383 
395 cpl_image *
396 sinfo_new_convolve_image_by_gauss(cpl_image * lineImage,
397  int hw ) ;
398 
438 cpl_image *
439 sinfo_new_defined_resampling(cpl_image * image,
440  cpl_image * calimage,
441  int n_params,
442  int* n_rows,
443  double * dispersion,
444  float * minval,
445  float * maxval,
446  double * centralLambda,
447  int * centralpix ) ;
448 
449 
450 #endif