sinfo_coltilt.h

00001 #ifndef SINFO_COLTILT_H
00002 #define SINFO_COLTILT_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_coltilt.h,v 1.4 2007/06/06 07:10:45 amodigli Exp $"
00025 *
00026 * who       when      what
00027 * --------  --------  ----------------------------------------------
00028 * schreib  20/12/00  created
00029 */
00030 
00031 /************************************************************************
00032  * sinfo_coltilt.h
00033  * routines to calculate and correct the spatial tilt of spectra in raw images
00034  *----------------------------------------------------------------------
00035  */
00036 
00037 /*
00038  * header files
00039  */
00040 #include <cpl.h> 
00041 #include "sinfo_msg.h"
00042 #include "sinfo_recipes.h"
00043 #include "sinfo_wave_calibration.h"
00044 #include "sinfo_spiffi_types.h"
00045 /*----------------------------------------------------------------------------
00046  *                        Function ANSI C prototypes
00047  *--------------------------------------------------------------------------*/
00048 /*----------------------------------------------------------------------------
00049    @name   sinfo_new_slope_of_spectrum()
00050    @param  ns_image   image with at least one continuum spectrum of a pinhole
00051    @param  box_length width of the box in which the lines are fit by a Gaussian
00052    @param  fwhm       first guess of the full width at half maximum
00053    @param  min_amplitude_factor factor peak/background below given threshold 
00054            the fit is not carried through
00055    @return slope of a straight line fitted to the spectrum. -FLT_MAX if 
00056            something went wrong.
00057    @doc    determines the sub-pixel shifts of each row by using an image with 
00058            at least one continuum spectrum of a pinhole this is done by 
00059            searching the spectrum within the image then fitting the spectrum 
00060            along the rows within a given box by a Gaussian, so that the exact 
00061            position is determined for each row. Afterwards, a straight line is 
00062            fitted through the fitted positions. The slope of this linear fit 
00063            is returned.
00064 */
00065 
00066 float 
00067 sinfo_new_slope_of_spectrum(cpl_image * ns_image,
00068                        int        box_length,
00069                        float      fwhm,
00070                        float      min_amplitude_factor ) ;
00071 
00084 cpl_image * 
00085 sinfo_new_shift_rows(cpl_image * image,
00086              float      slope,
00087              int        n_order ) ;
00088 
00089 
00100 void 
00101 sinfo_new_parameter_to_ascii ( float * parameter,
00102                         int n,
00103                         char * filename ) ;
00104 
00105 
00113 float * 
00114 sinfo_new_ascii_to_parameter ( char * filename,
00115                            int  * n ) ;
00116 
00139 double * 
00140 sinfo_new_curvature_of_spectrum(cpl_image * ns_image,
00141                 int        order, 
00142              int        box_length,
00143              int        left_pos,
00144                          int        right_pos,
00145                          float      fwhm,
00146                          float      min_amplitude_factor ) ;
00147 
00156 cpl_image * 
00157 sinfo_new_image_warp_fits(cpl_image * image,
00158                       char      * kernel_type, 
00159                       char      * poly_table );
00160 
00161 #endif 

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