SINFONI Pipeline Reference Manual  2.5.2
sinfo_spectrum_ops.h
1 #ifndef SINFO_SPECTRUM_OPS_H
2 #define SINFO_SPECTRUM_OPS_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 /************************************************************************
23 * E.S.O. - VLT project
24 *
25 * "@(#) $Id: sinfo_spectrum_ops.h,v 1.4 2007-06-06 07:10:45 amodigli Exp $"
26 *
27 * who when what
28 * -------- -------- ----------------------------------------------
29 * schreib 25/05/00 created
30 */
31 
32 /************************************************************************
33  * sinfo_spectrum_ops.h
34  * spectral sinfo_vector routines
35  *----------------------------------------------------------------------
36  */
37 
38 #define SPEED_OF_LIGHT 2.99792458e8
39 #define PLANCK 6.62606876e-34
40 #define BOLTZMANN 1.3806503e-23
41 
42 /*
43  * header files
44  */
45 
46 #include <cpl.h>
47 #include "sinfo_focus.h"
48 #include "sinfo_recipes.h"
49 #include "sinfo_new_cube_ops.h"
50 #include "sinfo_msg.h"
51 /*----------------------------------------------------------------------------
52  * Function ANSI C prototypes
53  *--------------------------------------------------------------------------*/
54 
55 
62 int
63 sinfo_stectrum_ima2table(
64  const cpl_image* spc,
65  const char* filename,
66  cpl_table** tbl);
67 
81 Vector *
82 sinfo_new_cleanmean_rectangle_of_cube_spectra( cpl_imagelist * cube,
83  int llx,
84  int lly,
85  int urx,
86  int ury,
87  float lo_reject,
88  float hi_reject );
100 Vector *
101 sinfo_new_cleanmean_circle_of_cube_spectra( cpl_imagelist * cube,
102  int centerx,
103  int centery,
104  int radius,
105  float lo_reject,
106  float hi_reject );
117 cpl_image *
118 sinfo_new_div_image_by_spectrum( cpl_image * image, cpl_image * spectrum ) ;
119 
127 void
128 sinfo_free_svector( Vector **svector );
129 
137 Vector *
138 sinfo_new_vector( ulong32 n_elements ) ;
139 
140 
148 void
149 sinfo_new_destroy_vector( Vector *sinfo_vector ) ;
150 
160 cpl_image *
161 sinfo_new_vector_to_image( Vector * spectrum ) ;
162 
172 Vector *
173 sinfo_new_image_to_vector( cpl_image * spectrum ) ;
174 
175 
187 cpl_image *
188 sinfo_new_extract_spectrum_from_resampled_flat( cpl_image * resflat,
189  float loreject,
190  float hireject ) ;
191 
202 cpl_image *
203 sinfo_new_multiply_image_with_spectrum(cpl_image * image,
204  cpl_image * spectrum ) ;
205 
246 cpl_image *
247 sinfo_new_optimal_extraction_from_cube( cpl_imagelist * cube,
248  int llx,
249  int lly,
250  int halfbox_x,
251  int halfbox_y,
252  float fwhm_factor,
253  float backvariance,
254  float sky,
255  float gain,
256  float exptime,
257  const char* name,
258  cpl_table** spectrum,
259  int qc_info,
260  int* check2) ;
261 
285 Vector *
286 sinfo_new_extract_sky_from_cube( cpl_imagelist * cube,
287  float loReject,
288  float hiReject,
289  int * position,
290  int tolerance,
291  int posindicator ) ;
292 
307 Vector *
308 sinfo_new_sum_rectangle_of_cube_spectra( cpl_imagelist * cube,
309  int llx,
310  int lly,
311  int urx,
312  int ury ) ;
313 
325 Vector *
326 sinfo_new_sum_circle_of_cube_spectra( cpl_imagelist * cube,
327  int centerx,
328  int centery,
329  int radius ) ;
330 
331 
345 Vector *
346 sinfo_new_mean_rectangle_of_cube_spectra( cpl_imagelist * cube,
347  int llx,
348  int lly,
349  int urx,
350  int ury ) ;
351 
363 Vector *
364 sinfo_new_mean_circle_of_cube_spectra( cpl_imagelist * cube,
365  int centerx,
366  int centery,
367  int radius ) ;
368 
379 Vector *
380 sinfo_new_blackbody_spectrum( char * templateSpec, double temp ) ;
381 
395 Vector *
396 sinfo_new_median_rectangle_of_cube_spectra( cpl_imagelist * cube,
397  int llx,
398  int lly,
399  int urx,
400  int ury ) ;
401 
413 Vector *
414 sinfo_new_median_circle_of_cube_spectra( cpl_imagelist * cube,
415  int centerx,
416  int centery,
417  int radius ) ;
418 
419 
433 Vector *
434 sinfo_new_clean_mean_rectangle_of_cube_spectra( cpl_imagelist * cube,
435  int llx,
436  int lly,
437  int urx,
438  int ury,
439  float lo_reject,
440  float hi_reject ) ;
441 
453 Vector *
454 sinfo_new_clean_mean_circle_of_cube_spectra( cpl_imagelist * cube,
455  int centerx,
456  int centery,
457  int radius,
458  float lo_reject,
459  float hi_reject ) ;
460 
472 float *
473 sinfo_new_shift_array(float * input,int n_elements,float shift,double * ker ) ;
474 
475 #endif