SINFONI Pipeline Reference Manual  2.5.2
sinfo_skycor.h
1 /* $Id: sinfo_skycor.h,v 1.13 2007-03-05 07:21:54 amodigli Exp $
2  *
3  * This file is part of the SINFONI Pipeline
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22  * $Author: amodigli $
23  * $Date: 2007-03-05 07:21:54 $
24  * $Revision: 1.13 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 
32 #ifndef SINFO_SKYCOR_H
33 #define SINFO_SKYCOR_H
34 #include <cpl.h>
35 
36 #define SINFO_MASK_WAVE_MIN 1.4
37 #define SINFO_MASK_WAVE_MAX 2.5
38 #define SINFO_MIN_FRAC 0.8
39 #define SINFO_LINE_HALF_WIDTH 4.0
40 #define SINFO_SKY_BKG_FILTER_WIDTH 12
41 
42 
43 
44 #define HISTO_NBINS 100
45 #define HISTO_MIN_SIZE 10
46 #define HISTO_Y_CUT 10 /* 50 is a better value this
47  affects histo right marging*/
48 #define HISTO_X_LEFT_CUT 1.0 /* 0.2 is better */
49 #define HISTO_X_RIGHT_CUT 0.5 /* 1.0 is better */
50 #define HISTO_DIST_TEMPC_MIN_FCT 5. /* 5.0 */
51 #define HISTO_DIST_TEMPC_MAX_FCT 0.25 /* 0.25 */
52 
53 struct sinfo_skycor_qc_ {
54  int th_fit;
55 };
56 typedef struct sinfo_skycor_qc_ sinfo_skycor_qc;
57 
58 sinfo_skycor_qc* sinfo_skycor_qc_new(void);
59 void sinfo_skycor_qc_delete(sinfo_skycor_qc** s);
60 
61 
62 int
63 sinfo_skycor(cpl_parameterlist * config,
64  cpl_frame* obj_frm,
65  cpl_frame* sky_frm,
66  sinfo_skycor_qc* sqc,
67  cpl_imagelist** obj_cor,
68  cpl_table** int_obj);
69 
70 
71 
72 int
73 sinfo_histogram(const cpl_table* data,
74  const int nbins,
75  const double min,
76  const double max,
77  cpl_table** histo);
78 int
79 sinfo_table_get_index_of_val(cpl_table* t,
80  const char* name,
81  double val,
82  cpl_type type);
83 
84 int
85 sinfo_table_get_index_of_max(cpl_table* t,
86  const char* name,
87  cpl_type type);
88 
89 
90 double
91 sinfo_table_column_interpolate(const cpl_table* t,
92  const char* name,
93  const double x);
94 
95 
96 
97 
98 
99 cpl_table*
100 sinfo_where_tab_min_max(cpl_table* t,
101  const char* col,
102  cpl_table_select_operator op1,
103  const double v1,
104  cpl_table_select_operator op2,
105  const double v2);
106 
107 #endif