SINFONI Pipeline Reference Manual  2.5.2
sinfo_globals.h
1 /* $Id: sinfo_globals.h,v 1.7 2013-07-15 08:14:08 amodigli Exp $
2  *
3  * This file is part of the SINFONI Pipeline
4  * Copyright (C) 2002,2003 European Southern Observatory
5  *
6  * This proram 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: 2013-07-15 08:14:08 $
24  * $Revision: 1.7 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef SINFO_GLOBALS_H
29 #define SINFO_GLOBALS_H
30 #include <cpl.h>
31 /*------------------------------------------------------------------------
32  Defines
33  --------------------------------------------------------------------------*/
34 #define SINFO_RESAMP_NROWS 2560
35 #define PI_NUMB (3.1415926535897932384626433832795)
36 #define ZERO 0./0.
37 #define FLAG -1.e+9
38 #define QC_DID_ID "SINFONI-1.0.0"
39 #define FILE_NAME_SZ 512
40 #define MAX_NAME_SIZE 512
41 #define TELESCOPE_SURFACE 52.8101279
42 
43 #define NOISE_HSIZE 4
44 #define NOISE_NSAMPLES 100
45 #define SINFO_DBL_MIN 1e-37
46 #define SINFO_DBL_MAX 1e+37
47 
48 #define IMA_PIX_START 0
49 #define IMA_PIX_END 2047
50 #define SIZEX 2048
51 #define SIZEY 2048
52 #define DET_PIX_MIN 1
53 #define DET_PIX_MAX 2048
54 
55 
56 #define LLX 1350
57 #define LLY 1000
58 #define URX 1390
59 #define URY 1200
60 
61 #define DISTORTION_LOPOS 974
62 #define DISTORTION_HIPOS 1074
63 
64 #define GRAT_VAL1_HK 3997330
65 #define GRAT_VAL2_HK 3997339
66 #define GRAT_VAL1_H 2948723
67 #define GRAT_VAL2_H 2948733
68 #define GRAT_VAL1_K 1893844
69 #define GRAT_VAL2_K 1893854
70 #define GRAT_VAL1_J 849618
71 #define GRAT_VAL2_J 849628
72 #define GRAT_VAL_TOL 4
73 
74 #define SKY_FLUX 0
75 #define BKG_VARIANCE 9.6
76 #define GAIN 2.42
77 #define MAGNITUDE 11
78 
79 #define MSG_OVER_WRITE_PAR "Using default data reduction parameters"
80 #define LAMP_ON TRUE
81 #define LAMP_OFF FALSE
82 
83 /* compat macro */
84 #if defined CPL_VERSION_CODE && CPL_VERSION_CODE >= CPL_VERSION(6, 3, 0)
85 #define cpl_frameset_get_frame cpl_frameset_get_position
86 #define cpl_frameset_get_frame_const cpl_frameset_get_position_const
87 #endif
88 
89 struct amoeba_ {
90  cpl_vector* vx;
91  cpl_vector* vy;
92  cpl_vector* sx;
93  cpl_vector* sy;
94 };
95 typedef struct amoeba_ amoeba_dat;
96 
97 amoeba_dat* sinfo_amoeba_new(cpl_vector* vx,
98  cpl_vector* vy,
99  cpl_vector* sx,
100  cpl_vector* sy);
101 void sinfo_amoeba_delete(amoeba_dat** a);
102 
103 struct qc_log_ {
104  char name[30];
105  char type[30];
106  char s_val[30];
107  char comm[30];
108  double n_val;
109  int n;
110 };
111 typedef struct qc_log_ qc_log;
112 
113 struct fake_ {
114  char pro_class[FILE_NAME_SZ];
115  int frm_switch;
116  int is_fake_sky;
117  int mask_index;
118  int ind_index;
119  int flat_index;
120  int wfix_index;
121  double low_rej;
122  double hig_rej;
123 };
124 
125 typedef struct fake_ fake;
126 fake* sinfo_fake_new(void);
127 void sinfo_fake_delete(fake** f);
128 
129 
130 struct wcal_ {
131  double wstart;
132  double wgdisp1;
133  double wgdisp2;
134  double min_dif;
135  double fwhm;
136  double min_amp;
137  double pixel_tol;
138  double y_box;
139  int low_pos;
140  int hig_pos;
141  int hw;
142  int na_coef;
143  int nb_coef;
144 
145 };
146 
147 typedef struct wcal_ wcal;
148 
149 wcal* sinfo_wcal_new(void);
150 void sinfo_wcal_delete(wcal* f);
151 
152 
153 struct stack_ {
154  char do_class[FILE_NAME_SZ];
155  char index_list[FILE_NAME_SZ];
156  int warp_fix_ind;
157 };
158 
159 typedef struct stack_ stack;
160 
161 stack* sinfo_stack_new(void);
162 void sinfo_stack_delete(stack* s);
163 
164 
165 
166 struct nst_ {
167  double min_dif[4];
168  double fwhm[4];
169 };
170 
171 typedef struct nst_ nstpar;
172 
173 nstpar* sinfo_nstpar_new(void);
174 void sinfo_nstpar_delete(nstpar* n);
175 
176 struct dist_ {
177  double diff_tol[4];
178 };
179 
180 typedef struct dist_ distpar;
181 
182 distpar* sinfo_distpar_new(void);
183 void sinfo_distpar_delete(distpar* d);
184 
185 
186 #endif