-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecipes_Imaging_N.tex
385 lines (347 loc) · 21 KB
/
Recipes_Imaging_N.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
\subsection{N-band imaging recipes}
\label{ssec:recipes_img_n}
%------------------------------------------------------------------------------------------------------------------
\subsubsection{\REC*{metis_n_img_flat}: Flatfielding}
\label{n_img_flatfield}
\label{rec:n_img_flatfield}
\label{sssec:n_img_flatfield}
\label{n_img_flat}
\label{rec:n_img_flat}
\label{sssec:n_img_flat}
\label{metis_n_img_flat}
\label{rec:metis_n_img_flat}
\label{sssec:metis_n_img_flat}
The purpose of the flat-field calibration is to determine
pixel-to-pixel gain variations and large scale illumination variations
(due to inhomogeneities of optical elements in the telescope or
instrument). Calibration frames are obtained either during day time
using the black-body lamp of the \ac{WCU} (internal flats) or by taken
images of the twilight sky (twilight flats). Advantages and
disadvantages of the two types of flat are discussed in
\cite{METIS-calibration_plan}.
MIR detectors are typically unstable in that they show gain
fluctuations on rather short time scales, hence science exposures may
have a different flat-field structure from those captured by the
calibration flats. The GeoSnap detector is more linear
than the H2RG detectors, but should be flat-fielded anyway.
N-band flat fields will also be taken for quality control and monitoring purposes.
Since the operational concept for twilight flats needs to be refined
during commissioning at the telescope, the current recipe design is
primarily valid for internal flats.
This recipe creates a master flat for the GeoSnap detector (N-band
imaging) from lamp or sky images matched by various setup parameters
as detailed below. A set of internal flats includes a number of
exposures with \CODE{LAMP OFF}, which will be used for dark
subtraction. For twilight flats a master dark will be subtracted. The
master flat is obtained by the slope of a linear fit of the pixel
values against the illumination level of the exposures.
The quality control parameters give various statistics for each input
frame (mean, standard deviation, etc.), the standard deviation of the
normalised master flat and the number of bad pixels identified by the
recipe. If a bad-pixel map is provided on input, it is updated,
otherwise a new one is created.
\begin{recipedef}
Name: & \REC{metis_n_img_flat} \\
Purpose: & Create master flat field for the N-band imaging detector. \\
Requirements: & \REQ{METIS-6098} \\
Type: & Calibration \\
Templates: & \TPL{METIS_img_n_cal_InternalFlat} \\
& \TPL{METIS_img_n_cal_TwilightFlat} \\
Input data: & \RAW{N_FLAT_LAMP_RAW} or \RAW{N_FLAT_TWILIGHT_RAW} \\
& \PROD{MASTER_DARK_GEO} (for twilight flats) \\
& \EXTCALIB{BADPIX_MAP_GEO} (optional) \\
& \STATCALIB{LINEARITY_GEO} \\
& \STATCALIB{GAIN_MAP_GEO} \\
& \EXTCALIB{PERSISTENCE_MAP} \\
Matched keywords: & \FITS{DET.DIT} \\
& \FITS{DET.NDIT} \\
& \FITS{DRS.FILTER} \\
Parameters: & Combination method (\texttt{mean}, \texttt{median},
\texttt{sigclip}, \dots) \\
& Parameters for combination methods \\
& Threshold(s) for deviant-pixel identification \\
Algorithm: % & Call \DRL{metis_apply_persistence_correction} to apply the
% persistence correction \\
& For internal flats: call \REC{metis_det_dark} with \CODE{LAMP OFF}
images to create dark frame. \\
& Subtract internal dark or master dark from flat exposures. \\
& call \REC{metis_n_img_flat} to fit slope of pixel values against
illumination level. Frames with the same exposure time will be averaged.\\
& Compute median or average of input frames to improve statistics.\\
& Call \DRL{metis_update_n_flat_mask} to flag deviant pixels. \\
Output data: & \PROD{MASTER_IMG_FLAT_LAMP_N} or \PROD{MASTER_IMG_FLAT_TWILIGHT_N} \\
& \EXTCALIB{BADPIX_MAP_GEO} \\
Expected accuracies: & 0.5\% (cf.~\cite{METIS_calerrbudget}) \\
QC1 parameters: & \QC{QC N MFLAT RMS} \\
& \QC{QC N MFLAT NBADPIX} \\
& \QC{QC N FLAT MEAN} \\
& \QC{QC N FLAT RMS} \\
& \QC{QC N FLAT MEDIAN MIN} \\
& \QC{QC N FLAT MEDIAN MAX} \\
& \QC{QC N FLAT MEDIAN RMS} \\
hdrl functions: & \CODE{hdrl_bpm_fit_compute} \\
& \CODE{hdrl_imagelist_collapse} \\
& \CODE{hdrl_imagelist_sub_image} \\
\end{recipedef}
\begin{figure}[hb]
\centering
\def \globalscale {0.700000}
\fontsize{10}{12}\selectfont
\input{tikz/metis_n_img_flat}
\caption[Recipe: \REC*{metis_n_img_flat}]{\REC*{metis_n_img_flat} --
creation of \CODE{IMG_N} master flatfield}
\label{fig:metis_n_img_flat}
\end{figure}
%%%%%%%
%------------------------------------------------------------------------------------------------------------------
\subsubsection{\REC*{metis_n_img_chopnod}: Chop-nod combination}
\label{img_n_chopnod}
\label{rec:img_n_chopnod}
\label{rec:metis_n_img_chopnod}
\label{sssec:img_n_chopnod}
This recipe combines a set of exposures taken at all positions of a
defined chop-nod pattern and adds/subtracts them into a single
chop/nod difference image. Depending on the actual chop-nod pattern,
this image will contain one or more positive and negative beams.
See Section~\ref{sssec:nbandsbackgroundsubtracion} for more information
on the background subtraction.
The GeoSnap detectors will have a substantial number of bad pixels.
The N-band observations therefore require extensive dithering to mitigated bad pixels.
The master flat will have to be divided into the chop half-cycle images before the dither correction is applied.
% https://polarion.astron.nl/polarion/#/project/METIS/workitem?id=METIS-3091
This recipe analyses the masked detector regions for channel offset correction, crosstalk (see Section~\ref{ssec:criticaldetetctormasks}) and removal of detector artefacts (electronic ghosts).
The edges of the N-band detector will be behind a cold mask on all four sides.
%The width of the mask will be at least 26 pixels and no larger than 32 pixels.
\begin{recipedef}
Name: & \REC{metis_n_img_chopnod} \\
Purpose: & chop/nod combination of exposures for background subtraction \\
Requirements: & \REQ{METIS-6089} \\
Type: & Calibration, Science \\
Templates: & \TPL{METIS_img_n_cal_standard} \\
& \TPL{METIS_img_n_obs_AutoChopNod} \\
& \TPL{METIS_img_n_obs_GenericChopNod} \\
& \TPL{METIS_img_n_cvc_obs_AutoChop} \\
% & \TPL{METIS_img_n_clc_obs_FixedSkyOffset} \\
& \TPL{METIS_img_n_cal_psf} \\
& \TPL{METIS_img_lmn_obs_AutoChopNod} \\
& \TPL{METIS_img_lmn_obs_GenericChopNod} \\
Input data: & \RAW{N_IMAGE_SCI_RAW} or \RAW{N_IMAGE_STD_RAW} \\
& \PROD{MASTER_DARK_GEO} \\
& \EXTCALIB{BADPIX_MAP_GEO} (optional) \\
& \STATCALIB{LINEARITY_GEO} \\
& \STATCALIB{GAIN_MAP_GEO} \\
& \EXTCALIB{PERSISTENCE_MAP} \\
& \PROD{MASTER_IMG_FLAT_LAMP_N} \\
& \STATCALIB{GAIN_MAP_GEO}\\
& or \PROD{MASTER_IMG_FLAT_TWILIGHT_N} \\
Matched keywords: & \FITS{DET.DIT} \\
& \FITS{DET.NDIT} \\
& \FITS{DRS.FILTER} \\
Parameters: & None \\
Algorithm: & Analyse and optionally remove masked regions and correct crosstalk and ghosts \\
& Add/subtract images to subtract background \\
Output data: & \PROD{N_SCI_BKG_SUBTRACTED} or \PROD{N_STD_BKG_SUBTRACTED} \\
QC1 parameters: & \QC{QC N IMG PEAK CNTS} \\
hdrl functions: & \CODE{hdrl_imagelist_collapse} \\
\end{recipedef}
\newgeometry{bottom=0.5cm, right=0.5cm, left=0.5cm}
\begin{figure}[hb]
\centering
\def \globalscale {0.700000}
\fontsize{10}{12}\selectfont
\input{tikz/metis_n_img_chopnod}
\caption[Recipe: \REC*{metis_n_img_chopnod}]{\REC*{metis_n_img_chopnod} --
Combination of chop/nodded images.}
\label{fig:metis_n_img_chopnod}
\end{figure}
\restoregeometry
%%%%%%%%%%%%%%%%%%%
\clearpage
\subsubsection{\REC*{metis_n_img_std_process}: Photometric standard analysis}
\label{n_img_std_process}
\label{rec:n_img_std_process}
\label{ssec:n_img_std_process}
\label{sssec:n_img_std_process}
\label{metis_n_img_std_process}
\label{rec:metis_n_img_std_process}
\label{sssec:metis_n_img_std_process}
This recipe determines the conversion from ADU to physical units from
a chop-nod difference image of a photometric standard star. The flux
of the standard star is measured in each of the beams of the chop-nod
difference image, averaged and normalised to an exposure time of
1~second. Comparison to the tabulated brightness of the star in the
observing filter yields the conversion factor from
$\mathrm{ADU}\,\mathrm{s}^{-1}$ to
$\mathrm{photons}\,\mathrm{s}^{-1}\,\mathrm{cm}^{-2}$.
QC parameters will include estimates of the sensitivity for the
detection of point sources and surface brightness sensitivity
following~\cite{visir_manual}.
\begin{recipedef}
Name: & \REC{metis_n_img_std_process} \\
Purpose: & Determine conversion factor between detector counts and physical source flux. \\
Type: & Calibration \\
% HB 20230710: Recipe not triggered by raw data
% Templates: & \TPL{METIS_img_n_cal_standard} \\
Input data: & \PROD{N_STD_BKG_SUBTRACTED} \\
& \EXTCALIB{FLUXSTD_CATALOG} \\
% & \STATCALIB{GAIN_MAP_GEO}\\
Matched keywords: & \FITS{DRS.FILTER} \\
Parameters: & None \\
Algorithm: & call \DRL{metis_n_calculate_std_flux} to measure the flux in all beams\\
& average and normalize flux values \\
& call \DRL{metis_calculate_std_fluxcal} to calculate conversion factor to physical units \\
& call \DRL{metis_calculate_detection_limits} to compute measured background noise (std, rms) and compute detection limits \\
Output data: & \PROD{FLUXCAL_TAB} \\
Expected accuracies: & 3\% (cf.~\cite{METIS_calerrbudget}) \\
QC1 parameters: & \QC{QC N IMG STD BACKGD RMS} \\
& \QC{QC N STD PEAK CNTS} \\
& \QC{QC N STD APERTURE CNTS} \\
& \QC{QC N STD STREHL} \\
& \QC{QC N STD FLUXCONV} \\
& \QC{QC N STD AIRMASS} \\
& \QC{QC N SENS} \\
& \QC{QC N AREA SENS} \\
hdrl functions: & \CODE{hdrl_catalogue_create} \\
& \CODE{hdrl_strehl_compute} \\
\end{recipedef}
\begin{figure}[hb]
\centering
\def \globalscale {0.700000}
\fontsize{10}{12}\selectfont
\input{tikz/metis_n_img_std_process}
\caption[Recipe: \REC*{metis_n_img_std_process}]{\REC*{metis_n_img_std_process} --
compute conversion between ADU and physical flux units.}
\label{fig:metis_n_img_std_process}
\end{figure}
%%%%%%%%%%%%%%%%%%%%%
\clearpage
\subsubsection{\REC*{metis_n_img_calibrate}: Image calibration}
\label{n_img_calibrate}
\label{rec:n_img_calibrate}
\label{sssec:n_img_calibrate}
\label{rec:metis_n_img_calibrate}
This recipe applies the flux calibration to the chop-nod difference
image. A unique geometric calibration is not possible at this point,
although one could take one of the beams (e.g.\ the positive beam in a
parallel two-point chop-nod pattern) as reference for a
WCS. Distortion information can be added without a reference point as
it pertains to the detector/focal plane, not to the field.
The products of this recipe is the fully calibrated chop-nod
difference image.
The image is multiplied by the conversion factor such that pixel
values are in units of photons per second per centimetre squared. The
header receives the keyword \FITS*{BUNIT} with value %
\CODE{'photon.s**(-1).cm**(-2)'}.
\begin{recipedef}
Name: & \REC{metis_n_img_calibrate} \\
Purpose: & Convert science image to physical units \\
& Add distortion information \\
Type: & Calibration \\
Templates: & \\
Input data: & \PROD{N_SCI_BKG_SUBTRACTED} \\
& \PROD{FLUXCAL_TAB} \\
& \PROD{N_DISTORTION_TABLE} \\
Matched keywords: & \FITS{DRS.FILTER} \\
Parameters: & None \\
Algorithm: & call \DRL{metis_n_scale_image_flux} to Scale image data to ph/s \\
& add header information (\FITS*{BUNIT}, etc.)\\
Output data: & \PROD{N_SCI_CALIBRATED} \\
QC1 parameters: & None \\
\end{recipedef}
\begin{figure}[hb]
\centering
\def \globalscale {0.700000}
\fontsize{10}{12}\selectfont
\input{tikz/metis_n_img_calibrate}
\caption[Recipe: \REC*{metis_n_img_calibrate}]{\REC*{metis_n_img_calibrate} --
convert image to physical flux units and update FITS header}
\label{fig:metis_n_img_calibrate}
\end{figure}
%%%%%%%%%%%%%
\clearpage
\subsubsection{\REC*{metis_n_img_restore}: Image restoration}
\label{n_img_restoration}
\label{rec:n_img_restoration}
\label{sssec:n_img_restoration}
\label{rec:metis_n_img_restore}
This recipe attempts to combine the positive and negative beams of the
chop-nod difference image into a single positive image of the
source. For compact sources with a size smaller than half the distance
between the beams, it suffices to cut out small regions around the
source images and add the with the appropriate signs to obtain a
single image. Extended sources, that is, sources larger than the chop offset,
are beyond the scope of the pipeline.
For more information see Section~\ref{ssec:criticalnbandimagerestoration}.
\begin{recipedef}
Name: & \REC{metis_n_img_restore} \\
Purpose: & Restore a single positive beam from chop-nod difference image \\
Type: & Science \\
Input data: & \PROD{N_SCI_CALIBRATED} \\
Matched keywords: & \FITS{DRS.FILTER} \\
Parameters: & size of cutout region \\
Algorithm: & Call \DRL{metis_cutout_region} to cut regions around beams \\
& Add regions with appropriate signs (\CODE{hdrl_imagelist_collapse}) \\
Output data: & \PROD{N_SCI_RESTORED} \\
QC1 parameters: & None \\
hdrl functions: & \CODE{hdrl_imagelist_collapse} \\
\end{recipedef}
\begin{figure}[hb]
\centering
\includegraphics[width=0.9\textwidth]{metis_n_img_restore}
\caption[Recipe: \REC*{metis_n_img_restore}]{\REC*{metis_n_img_restore} --
Create a single positive image from chop-nod difference image}
\label{fig:metis_n_img_restore}
\end{figure}
%%%%%%%%%%%%%%
\clearpage
\subsubsection{\REC*{metis_n_img_distortion}: Distortion calibration}
\label{rec:metis_n_img_distortion}
\label{n_img_distortion}
\label{rec:n_img_distortion}
\label{sssec:n_img_distortion}
Calibration of the imaging distortion is done on an image of a pin
hole mask located in a focal plane within the instrument. The
distortion is described in terms of a polynomial model whose
coefficients can be transformed to WCS keywords and applied to any
other pipeline product. In addition to the distortion table, a map of
pixel scale across the detector will be created.
\begin{recipedef}
Name: & \REC{metis_n_img_distortion} \\
Purpose: & Determine optical distortion coefficients for the N imager. \\
Templates: & \TPL{METIS_img_n_cal_distortion} \\
Type: & Calibration \\
Input data: & \RAW{N_DISTORTION_RAW} (Images of grid mask in WCU-FP2 or CFO-FP2.)\\
& \RAW{N_WCU_OFF_RAW} \\
& \EXTCALIB{BADPIX_MAP_GEO} \\
& \STATCALIB{LINEARITY_GEO} \\
& \STATCALIB{GAIN_MAP_GEO} \\
& \EXTCALIB{PINHOLE_TABLE} (Grid of pinhole mask positions) \\
& \EXTCALIB{PERSISTENCE_MAP} \\
Matched keywords: & \FITS{DRS.FILTER} \\
Parameters: & Parameters for fitting routine \\
Algorithm: & Subtract background image. (\CODE{hdrl_imagelist_sub_image}) \\
& Measure location of point source images in frames. (\CODE{hdrl_catalogue_create}) \\
& call \DRL{metis_fit_distortion} to fit polynomial coefficients to deviations from grid positions. \\
Output data: & \PROD{N_DISTORTION_TABLE} \\
& \PROD{N_DISTORTION_MAP} \\
& \PROD{N_DIST_REDUCED} \\
Expected accuracies: & $2\times 10^{-3}$ (cf.~\cite{METIS_calerrbudget}) \\
QC1 parameters: & \QC{QC N DISTORT RMS} \\
& \QC{QC N DISTORT NSOURCE} \\
hdrl functions: & \CODE{hdrl_catalogue_create} \\
& \CODE{hdrl_imagelist_sub_image} \\
\end{recipedef}
\newgeometry{bottom=0.5cm, right=0.5cm, left=0.5cm}
\begin{figure}[hb]
\centering
\def \globalscale {0.700000}
\fontsize{10}{12}\selectfont
\input{tikz/metis_n_img_distortion}
\caption[Recipe: \REC*{metis_n_img_distortion}]{%
\REC{metis_n_img_distortion} -- \CODE{IMG_N} distortion calibration}
\label{fig:metis_n_img_distortion}
\end{figure}
\restoregeometry
%%% Local Variables:
%%% TeX-master: "METIS_DRLD"
%%% End: