SINFONI Pipeline Reference Manual  2.6.0
sinfo_coltilt.h
1 #ifndef SINFO_COLTILT_H
2 #define SINFO_COLTILT_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_coltilt.h,v 1.4 2007-06-06 07:10:45 amodigli Exp $"
25 *
26 * who when what
27 * -------- -------- ----------------------------------------------
28 * schreib 20/12/00 created
29 */
30 
31 /************************************************************************
32  * sinfo_coltilt.h
33  * routines to calculate and correct the spatial tilt of spectra in raw images
34  *----------------------------------------------------------------------
35  */
36 
37 /*
38  * header files
39  */
40 #include <cpl.h>
41 #include "sinfo_msg.h"
42 #include "sinfo_recipes.h"
43 #include "sinfo_wave_calibration.h"
44 #include "sinfo_spiffi_types.h"
45 /*----------------------------------------------------------------------------
46  * Function ANSI C prototypes
47  *--------------------------------------------------------------------------*/
48 /*----------------------------------------------------------------------------
49  @name sinfo_new_slope_of_spectrum()
50  @param ns_image image with at least one continuum spectrum of a pinhole
51  @param box_length width of the box in which the lines are fit by a Gaussian
52  @param fwhm first guess of the full width at half maximum
53  @param min_amplitude_factor factor peak/background below given threshold
54  the fit is not carried through
55  @return slope of a straight line fitted to the spectrum. -FLT_MAX if
56  something went wrong.
57  @doc determines the sub-pixel shifts of each row by using an image with
58  at least one continuum spectrum of a pinhole this is done by
59  searching the spectrum within the image then fitting the spectrum
60  along the rows within a given box by a Gaussian, so that the exact
61  position is determined for each row. Afterwards, a straight line is
62  fitted through the fitted positions. The slope of this linear fit
63  is returned.
64 */
65 
66 float
67 sinfo_new_slope_of_spectrum(cpl_image * ns_image,
68  int box_length,
69  float fwhm,
70  float min_amplitude_factor ) ;
71 
84 cpl_image *
85 sinfo_new_shift_rows(cpl_image * image,
86  float slope,
87  int n_order ) ;
88 
89 
100 void
101 sinfo_new_parameter_to_ascii ( float * parameter,
102  int n,
103  char * filename ) ;
104 
105 
113 float *
114 sinfo_new_ascii_to_parameter ( char * filename,
115  int * n ) ;
116 
139 double *
140 sinfo_new_curvature_of_spectrum(cpl_image * ns_image,
141  int order,
142  int box_length,
143  int left_pos,
144  int right_pos,
145  float fwhm,
146  float min_amplitude_factor ) ;
147 
156 cpl_image *
157 sinfo_new_image_warp_fits(cpl_image * image,
158  char * kernel_type,
159  char * poly_table );
160 
161 #endif