MUSE Pipeline Reference Manual  1.0.2
muse_instrument.h
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set sw=2 sts=2 et cin: */
3 /*
4  * This file is part of the MUSE Instrument Pipeline
5  * Copyright (C) 2008-2014 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, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef MUSE_INSTRUMENT_H
23 #define MUSE_INSTRUMENT_H
24 
25 /*----------------------------------------------------------------------------*
26  * Includes *
27  *----------------------------------------------------------------------------*/
28 /* none for this file */
29 
30 /*----------------------------------------------------------------------------*
31  * Instrument properties *
32  * *
33  * These variables are defined as static because they are included in several *
34  * C source files and linking will otherwise not work. *
35  *----------------------------------------------------------------------------*/
36 /* nominal sizes of MUSE spaxels in both WFM and NFM */
37 static const double kMuseSpaxelSizeX_WFM = 0.2;
38 static const double kMuseSpaxelSizeY_WFM = 0.2;
39 static const double kMuseSpaxelSizeX_NFM = 0.025;
40 static const double kMuseSpaxelSizeY_NFM = 0.025;
41 
42 /* Expected average FWHM [pix] of a point-like lamp emission line on the CCD */
43 static const double kMuseAverageFWHM_x = 1.6;
44 static const double kMuseAverageFWHM_y = 1.6;
45 
46 /* Output positions as they should be recorded in the FITS header (OUTn X/Y). *
47  * Values for the lower quadrants are always 1, so they are not listed here. */
48 static const int kMuseOutputXRight = 4096;
49 static const int kMuseOutputYTop = 4112;
50 /* standard size of pre- and overscans */
51 static const int kMusePreOverscanSize = 32;
52 
53 /* all values above this in raw data are considered saturated */
54 static const float kMuseSaturationLimit = 65500.;
55 
56 /* number of IFUs per exposure */
57 static const int kMuseNumIFUs = 24;
58 
59 /* number of slices in each MUSE CCD/IFU */
60 static const unsigned short kMuseSlicesPerCCD = 48;
61 /* maximum offset of the first slice to the CCD edge to be expected [pix] */
62 static const int kMuseSliceSearchRegion = 200;
63 /* maximum slice width ever to be expected [pix] */
64 static const int kMuseSliceMaxWidth = 100;
65 /* nominal width of a slice [pix] within the MUSE field of view */
66 static const int kMuseSliceNominalWidth = 75;
67 /* low and high values for likely slice widths to be found (in INM data, *
68  * values are between 74.2+/-0.2 and 79.2+/-0.3; take a bit more here) */
69 static const float kMuseSliceLoLikelyWidth = 72.2;
70 static const float kMuseSliceHiLikelyWidth = 82.2;
71 /* max expected width of a slice edge [pix] */
72 /* XXX effectively switch this off by choosing a high number, *
73  * otherwise tracing inaccuracies in the blue mark many pixels dark */
74 static const int kMuseSliceMaxEdgeWidth = 10;
75 
76 /* MUSE nominal spectral sampling in Angstrom */
77 static const float kMuseSpectralSamplingA = 1.25;
78 /* slice width in wavelength direction, in Angstrom. See
79  R.Bacon, Analysis of the spectral PSF, 2009, VLT-TRE-MUS-14670-0870. */
80 static const double kMuseSliceSlitWidthA = 2.61;
81 
82 /* MUSE nominal spectral range in Angstrom (extended wavelength range, WFM!) */
83 static const float kMuseNominalLambdaMin = 4650.;
84 static const float kMuseNominalLambdaMax = 9300.;
85 /* lower limit of nominal wavelength range with detectable flux */
86 static const float kMuseNominalCutoff = 4750;
87 /* most extreme wavelength ranges possibly recorded on the MUSE CCDs */
88 static const float kMuseLambdaMinX = 4150.;
89 static const float kMuseLambdaMaxX = 9800.;
90 /* maximum centering error [pix] to allow for arc lines */
91 static const float kMuseArcMaxCenteringError = 1.25;
92 /* minimum and maximum FWHM [pix] to allow for arc lines */
93 static const float kMuseArcMinFWHM = 1.0;
94 static const float kMuseArcMaxFWHM = 5.0;
95 /* minimum flux (Gaussian area) measured for arc lines */
96 static const float kMuseArcMinFlux = 50.0;
97 
98 /* typical MUSE datacube size in pixels, assuming "natural" sampling */
99 static const int kMuseTypicalCubeSizeX = 300;
100 static const int kMuseTypicalCubeSizeY = 288;
101 
102 /* The sky slice number for the CCD slice /index/, e.g. to get *
103  * sky-slice number for CCD slice 12, use kMuseGeoSliceSky[12 - 1]. *
104  * This relation was taken from the "Global Positioning System" *
105  * document (VLT-TRE-MUS-14670-0657 v1.06, dated 2010-12-14). */
106 static const unsigned char kMuseGeoSliceSky[] = {
107  9, 8, 1, 10, 7, 2, 11, 6, 3, 12, 5, 4, /* stack 4 */
108  21, 20, 13, 22, 19, 14, 23, 18, 15, 24, 17, 16, /* stack 3 */
109  33, 32, 25, 34, 31, 26, 35, 30, 27, 36, 29, 28, /* stack 2 */
110  45, 44, 37, 46, 43, 38, 47, 42, 39, 48, 41, 40 /* stack 1 */
111 };
112 
113 /* numbers from CU multi-pinhole mask (CUmpm / MultiP) design */
114 static const float kMuseCUmpmDX = 2.9450, /* +/- 0.0010 mm horizontal hole distance */
115  kMuseCUmpmDY = 0.6135; /* +/- 0.0010 mm vertical hole distance */
116 
117 /* expected number of pinholes per slice */
118 static const unsigned char kMuseCUmpmSpotsPerSlice = 3;
119 
120 /*----------------------------------------------------------------------------*
121  * Instrument constants related to the photo diodes/pico amplfiers (PAM/AMPL) *
122  *----------------------------------------------------------------------------*/
123 /* spectral sensitivity of photo diode 1 (BN-DSR-100F-1, SN 20478), *
124  * wavelengths in [Angstrom], sensitivity in [A/W] */
125 static const double kMuseAmpl1[][2] = {
126  { 2500., 0.12042285 },
127  { 2600., 0.10860598 },
128  { 2700., 0.10029241 },
129  { 2800., 0.1010473 },
130  { 2900., 0.11258141 },
131  { 3000., 0.12635038 },
132  { 3100., 0.13448966 },
133  { 3200., 0.13880026 },
134  { 3300., 0.1423209 },
135  { 3400., 0.14222383 },
136  { 3500., 0.14018333 },
137  { 3600., 0.13863897 },
138  { 3700., 0.14285144 },
139  { 3800., 0.15266077 },
140  { 3900., 0.16535348 },
141  { 4000., 0.1770276 },
142  { 4100., 0.18605701 },
143  { 4200., 0.19385006 },
144  { 4300., 0.20142353 },
145  { 4400., 0.20986195 },
146  { 4500., 0.21819498 },
147  { 4600., 0.22561278 },
148  { 4700., 0.23293989 },
149  { 4800., 0.23908501 },
150  { 4900., 0.24622256 },
151  { 5000., 0.25217267 },
152  { 5100., 0.25847973 },
153  { 5200., 0.2651326 },
154  { 5300., 0.27124827 },
155  { 5400., 0.27774291 },
156  { 5500., 0.28288282 },
157  { 5600., 0.28884646 },
158  { 5700., 0.29560289 },
159  { 5800., 0.30107169 },
160  { 5900., 0.30661891 },
161  { 6000., 0.31317781 },
162  { 6100., 0.3185658 },
163  { 6200., 0.3247822 },
164  { 6300., 0.33013667 },
165  { 6400., 0.33590527 },
166  { 6500., 0.34120136 },
167  { 6600., 0.34646811 },
168  { 6700., 0.35219427 },
169  { 6800., 0.35768868 },
170  { 6900., 0.36601971 },
171  { 7000., 0.36940652 },
172  { 7100., 0.3735187 },
173  { 7200., 0.37902808 },
174  { 7300., 0.38475409 },
175  { 7400., 0.39095198 },
176  { 7500., 0.39615039 },
177  { 7600., 0.40184217 },
178  { 7700., 0.40682911 },
179  { 7800., 0.41245076 },
180  { 7900., 0.41851005 },
181  { 8000., 0.42465427 },
182  { 8100., 0.4292767 },
183  { 8200., 0.43596086 },
184  { 8300., 0.44151703 },
185  { 8400., 0.4458525 },
186  { 8500., 0.45129183 },
187  { 8600., 0.45772061 },
188  { 8700., 0.46303733 },
189  { 8800., 0.4683445 },
190  { 8900., 0.4728841 },
191  { 9000., 0.47827183 },
192  { 9100., 0.48365046 },
193  { 9200., 0.48835047 },
194  { 9300., 0.49350086 },
195  { 9400., 0.49763584 },
196  { 9500., 0.50120751 },
197  { 9600., 0.50337176 },
198  { 9700., 0.50266209 },
199  { 9800., 0.49823605 },
200  { 9900., 0.48887253 },
201  { 10000., 0.47199137 },
202  { 10100., 0.44744711 },
203  { 10200., 0.41367036 },
204  { 10300., 0.37072293 },
205  { 10400., 0.31936173 },
206  { 10500., 0.26252744 },
207  { 10600., 0.2092668 },
208  { 10700., 0.16926374 },
209  { 10800., 0.13819477 },
210  { 10900., 0.11170627 },
211  { 11000., 0.089087876 },
212  { 0., 0. } /* signify end of curve */
213 };
214 /* spectral sensitivity of photo diode 2 (PD-9304-1, SN 16536aw1), *
215  * wavelengths in [Angstrom], sensitivity in [A/W] */
216 static const double kMuseAmpl2[][2] = {
217  { 3800., 0.017470643 },
218  { 3900., 0.028092218 },
219  { 4000., 0.042101743 },
220  { 4100., 0.057172072 },
221  { 4200., 0.072846443 },
222  { 4300., 0.088312251 },
223  { 4400., 0.10446471 },
224  { 4500., 0.12060106 },
225  { 4600., 0.13705176 },
226  { 4700., 0.15291203 },
227  { 4800., 0.16783374 },
228  { 4900., 0.18414104 },
229  { 5000., 0.2002173 },
230  { 5100., 0.21605915 },
231  { 5200., 0.23228403 },
232  { 5300., 0.24804161 },
233  { 5400., 0.26350352 },
234  { 5500., 0.27958034 },
235  { 5600., 0.2948433 },
236  { 5700., 0.3098418 },
237  { 5800., 0.32511413 },
238  { 5900., 0.3396649 },
239  { 6000., 0.35432272 },
240  { 6100., 0.36892068 },
241  { 6200., 0.38268224 },
242  { 6300., 0.3965248 },
243  { 6400., 0.41013499 },
244  { 6500., 0.42306177 },
245  { 6600., 0.43585509 },
246  { 6700., 0.44871039 },
247  { 6800., 0.46041305 },
248  { 6900., 0.47379706 },
249  { 7000., 0.48452311 },
250  { 7100., 0.49428201 },
251  { 7200., 0.50518957 },
252  { 7300., 0.51604378 },
253  { 7400., 0.52577538 },
254  { 7500., 0.53560665 },
255  { 7600., 0.54571763 },
256  { 7700., 0.55427559 },
257  { 7800., 0.56320912 },
258  { 7900., 0.57262044 },
259  { 8000., 0.58063817 },
260  { 8100., 0.58978081 },
261  { 8200., 0.59650748 },
262  { 8300., 0.60433599 },
263  { 8400., 0.61148995 },
264  { 8500., 0.61874995 },
265  { 8600., 0.62610294 },
266  { 8700., 0.63217003 },
267  { 8800., 0.63791206 },
268  { 8900., 0.6449613 },
269  { 9000., 0.65062382 },
270  { 9100., 0.65685802 },
271  { 9200., 0.66314835 },
272  { 9300., 0.6684782 },
273  { 9400., 0.67349904 },
274  { 9500., 0.67880835 },
275  { 9600., 0.68235343 },
276  { 9700., 0.68390407 },
277  { 9800., 0.68117654 },
278  { 9900., 0.67307881 },
279  { 10000., 0.65663219 },
280  { 10100., 0.62937674 },
281  { 10200., 0.5886552 },
282  { 10300., 0.53176402 },
283  { 10400., 0.46039876 },
284  { 10500., 0.37838965 },
285  { 10600., 0.29937021 },
286  { 10700., 0.23830659 },
287  { 10800., 0.19124631 },
288  { 10900., 0.1523348 },
289  { 11000., 0.1193815 },
290  { 0., 0. } /* signify end of curve */
291 };
292 /* physical size of the sensitive area of each photo diode */
293 static const double kMuseAmplPhysicalSize = 1.; /* [cm**2] */
294 
295 /*----------------------------------------------------------------------------*
296  * Special variable types *
297  *----------------------------------------------------------------------------*/
298 
299 /*----------------------------------------------------------------------------*/
309 /*----------------------------------------------------------------------------*/
310 typedef enum {
311  MUSE_MODE_WFM_NONAO_X = 0,
312  MUSE_MODE_WFM_NONAO_N = 1,
313  MUSE_MODE_WFM_AO_N = 2,
314  MUSE_MODE_NFM_AO_N = 3
315 } muse_ins_mode;
316 
317 /*----------------------------------------------------------------------------*
318  * Function prototypes *
319  *----------------------------------------------------------------------------*/
320 /* none for this file */
321 
322 #endif /* MUSE_INSTRUMENT_H */