SINFONI Pipeline Reference Manual
2.5.2
sinfoni
sinfo_spiffi_types.h
1
#ifndef SINFO_SPIFFI_TYPES_H
2
#define SINFO_SPIFFI_TYPES_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_spiffi_types.h,v 1.3 2007-06-06 07:10:45 amodigli Exp $"
25
*
26
* who when what
27
* -------- -------- ----------------------------------------------
28
* schreib 25/05/00 created
29
*/
30
31
/************************************************************************
32
* sinfo_spiffi_types.h
33
* all shared local new data types and defines for spiffi data reduction
34
*----------------------------------------------------------------------
35
*/
36
37
/*
38
* header files
39
*/
40
41
#include <sys/types.h>
42
#include <limits.h>
43
#include <stdlib.h>
44
#include <stdio.h>
45
#include <string.h>
46
47
#include "sinfo_local_types.h"
48
49
/*----------------------------------------------------------------------------
50
Defines
51
*--------------------------------------------------------------------------*/
52
53
#define NullVector (Vector *) NULL
54
#define SLOPE 1000.
/*slope limit of the linear fit*/
55
#define SATURATION 50000.
/*saturation level of the detector pixel values*/
56
#define ESTIMATE 200
/*estimation of number of parameters stored in an
57
ascii file*/
58
#define THRESH 100000.
/* Threshold for operation 1/pixelvalue of
59
an image division*/
60
61
/*--------------------------------------------------------------------------*/
62
63
#define PIXEL_WIDTH 0.0185
/* mm */
64
#define FOCAL_LENGTH 178.
/* mm */
65
66
#define N_SLITLETS 32
/* number of slitlets */
67
#define SLITLENGTH 64
/* nominal pixel length of one slitlet */
68
#define SLIT_LEN_ERR 5
/* error on SLITLENGTH */
69
#define SLIT_POS_ERR 5
/* error on SLITLENGTH */
70
71
#define LOW_REJECT 0.1
/* fraction of rejected extreme low values of fit
72
coefficients in sinfo_coefsCrossFit() */
73
#define HIGH_REJECT 0.9
/* fraction of rejected extreme high values of fit
74
coefficients in sinfo_coefsCrossFit() */
75
#define PIXEL 25
/* number of pixels for offsets in
76
sinfo_coeffsCrossSlitFit() */
77
78
#define CENTRALLAMBDA_K 2.2
/* defined central wavelengths and pixel
79
dispersions for each grating for
80
sinfo_definedResampling() */
81
#define CENTRALLAMBDA_H 1.65
82
#define CENTRALLAMBDA_J 1.25
83
#define CENTRALLAMBDA_HK 1.95
84
#define DISPERSION_K 0.00049
85
#define DISPERSION_K_DITH 0.000245
86
#define DISPERSION_H 0.00039
87
#define DISPERSION_H_DITH 0.000195
88
#define DISPERSION_J 0.00029
89
#define DISPERSION_J_DITH 0.000145
90
#define DISPERSION_HK 0.001
91
#define DISPERSION_HK_DITH 0.0005
92
93
/*----------------------------------------------------------------------------
94
New types
95
---------------------------------------------------------------------------*/
96
97
/*--------------------------------------------------------------------------*/
98
/* The following structure stores a sinfo_vector */
99
/*--------------------------------------------------------------------------*/
100
101
typedef
struct
_VECTOR_
102
{
103
int
n_elements ;
/* number of sinfo_vector elements */
104
pixelvalue * data ;
/* array of sinfo_vector values */
105
} Vector ;
106
107
/*--------------------------------------------------------------------------*/
108
/* The following structure stores the (gauss) fitting parameters of the */
109
/* emission lines of the calibration lamps */
110
/*--------------------------------------------------------------------------*/
111
112
typedef
struct
_FIT_PARAMS_
113
{
114
int
n_params ;
/* total number of fits to allocate
115
FitParams array */
116
int
column ;
/* index of the column in image coordinates */
117
int
line ;
/* index of fitted emission line
118
of the column */
119
float
wavelength ;
/* associated wavelength of the calibration
120
lamp emission line taken from the
121
line center list file */
122
float
* fit_par ;
/* fit_par[0]: amplitude,
123
fit_par[1]: FWHM,
124
fit_par[2]: position of
125
center of gauss,
126
fit_par[3]: zero level offset */
127
float
* derv_par ;
/* corresponding derivatives of fit_par[] */
128
} FitParams ;
129
130
typedef
struct
_STATS_
131
{
132
float
cleanmean ;
/* mean of pixel values without considering
133
the extreme values */
134
float
cleanstdev ;
/* standard deviation of pixel values without
135
considering the extreme values */
136
int
npix ;
/* number of clean pixel values */
137
} Stats ;
138
139
typedef
struct
_BCOEFFS_
140
{
141
int
slitlet ;
/* current slitlet */
142
int
n_slitlets ;
/* number of slitlets */
143
int
n_acoeffs ;
/* number of a fit coefficients */
144
int
n_bcoeffs ;
/* number of b fit coefficients */
145
float
** b ;
/* sinfo_matrix of fit coefficients:
146
b[index acoefs][index bcoefs] */
147
} Bcoeffs ;
148
149
#endif
151
/*--------------------------------------------------------------------------*/
152
153
Generated by
1.8.1.1