X-shooter Pipeline Reference Manual 3.8.15
xsh_utils_scired_slit.h
Go to the documentation of this file.
1/* a
2 * This file is part of the ESO X-shooter Pipeline *
3 * Copyright (C) 2006 European Southern Observatory *
4 * *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA *
18 * */
19
20
21
22/*
23 * $Author: amodigli $
24 * $Date: 2012-12-11 08:44:13 $
25 * $Revision: 1.29 $
26 * $Name: not supported by cvs2svn $
27 */
28#ifndef XSH_UTILS_SCIRED_SLIT_H
29#define XSH_UTILS_SCIRED_SLIT_H
30
31#include <cpl.h>
32#include <xsh_data_instrument.h>
34#include <xsh_parameters.h>
35
36cpl_error_code
37xsh_scired_get_proper_maps(cpl_frameset* raws, cpl_frameset* calib,
38 cpl_frame* order_tab_edges,cpl_frame* master_flat,
39 cpl_frame* model_config_frame,cpl_frame* disp_tab,
40 xsh_instrument* instrument,const int do_computemap,
41 const char* rec_prefix, cpl_frame** wavemap,
42 cpl_frame** slitmap);
43cpl_error_code
44xsh_stare_params_bin_scale(cpl_frameset* raws,
46 xsh_opt_extract_param *opt_extract_par,
47 int* sub_sky_nbkpts1,
48 int* sub_sky_nbkpts2);
49
50cpl_frameset*
52 cpl_frameset *nod_set,
53 cpl_frame* spectral_format,
54 cpl_frame* master_flat,
55 cpl_frame* order_tab_edges,
56 cpl_frame* wave_tab,
57 cpl_frame* model_config_frame,
58 cpl_frame* disp_tab_frame,
59 cpl_frame* wavemap,
61 xsh_remove_crh_single_param *crh_single_par,
62 xsh_rectify_param *rectify_par,
63 const int do_flatfield,
64 const int corr_sky,
65 const int compute_eff,
66 const char* rec_prefix,
67 cpl_frameset **comb_eff_set
68 );
69
70
71cpl_frameset*
73 cpl_frameset *nod_set,
74 cpl_frame* spectral_format,
75 cpl_frame* master_flat,
76 cpl_frame* order_tab_edges,
77 cpl_frame* wave_tab,
78 cpl_frame* model_config_frame,
79 cpl_frame* disp_tab_frame,
80 cpl_frame* wavemap,
81 cpl_frame *skymask_frame,
83 xsh_remove_crh_single_param *crh_single_par,
84 xsh_rectify_param *rectify_par,
85 xsh_localize_obj_param *loc_obj_par,
86 const char *throw_name,
87 const int do_flatfield,
88 const char* rec_prefix
89 );
90
91
92cpl_error_code
94 const int do_computemap,
95 cpl_frame** model_config_frame, cpl_frame** wave_tab,
96 cpl_frame** wavemap);
97
98cpl_error_code
100 const char* recipe_id,int pscan,cpl_frame** spectral_format,
101 cpl_frame** master_bias,
102 cpl_frame** bpmap,cpl_frame** order_tab_edges,cpl_frame** master_flat);
103
104cpl_error_code
105xsh_scired_slit_nod_get_calibs(cpl_frameset* raws,
106 cpl_frameset* calib,
108 cpl_frame** bpmap,
109 cpl_frame** master_bias,
110 cpl_frame** master_flat,
111 cpl_frame** order_tab_edges,
112 cpl_frame** wave_tab,
113 cpl_frame** model_config_frame,
114 cpl_frame** wavemap,
115 cpl_frame** slitmap,
116 cpl_frame** disp_tab_frame,
117 cpl_frame** spectral_format,
118 cpl_frame** skymask_frame,
119 cpl_frame** response_ord_frame,
120 cpl_frame** frm_atmext,
121 int do_computemap,
122 int use_skymask,
123 int pscan,
124 const char* rec_prefix,const char* rec_id);
125
126cpl_error_code
127xsh_respon_slit_nod_get_calibs(cpl_frameset* calib,
129 cpl_frame** bpmap,
130 cpl_frame** master_bias,
131 cpl_frame** master_flat,
132 cpl_frame** order_tab_edges,
133 cpl_frame** wave_tab,
134 cpl_frame** model_config_frame,
135 cpl_frame** wavemap,
136 cpl_frame** slitmap,
137 cpl_frame** disp_tab_frame,
138 cpl_frame** spectral_format,
139 cpl_frame** skymask_frame,
140 cpl_frame** response_ord_frame,
141 cpl_frame** frm_atmext,
142 int do_computemap,
143 int use_skymask,
144 int pscan,
145 const char* rec_prefix,const char* rec_id);
146
147
148cpl_error_code
149xsh_scired_nod_get_parameters(cpl_parameterlist* parameters,
151 xsh_remove_crh_single_param** crh_single_par,
152 xsh_rectify_param** rectify_par,
153 xsh_extract_param** extract_par,
154 xsh_combine_nod_param** combine_nod_par,
155 xsh_slit_limit_param** slit_limit_par,
156 xsh_localize_obj_param** loc_obj_par,
157 int* rectify_fast,int* pscan,
158 int* generate_sdp_format,
159 const char* rec_id);
160
161
162
163cpl_frameset*
164xsh_nod_group_by_reloff( cpl_frameset *ord_set,xsh_instrument *instrument,xsh_stack_param* stack_par);
165
166
167cpl_frameset*
168xsh_nod_group_by_reloff2( cpl_frameset *ord_set,xsh_instrument *instrument,xsh_stack_param* stack_par);
169
170cpl_error_code
171xsh_flux_calibrate(cpl_frame* rect2D,
172 cpl_frame* rect1D,
173 cpl_frame* atmext,
174 cpl_frame* response,
175 int mpar,
176 xsh_instrument* inst,
177 const char* rec_prefix,
178 cpl_frame** fcal_rect_2D,
179 cpl_frame** fcal_rect_1D,
180 cpl_frame** fcal_2D,
181 cpl_frame** fcal_1D);
182
183cpl_error_code
184xsh_flux_calibrate2D(cpl_frame* rect2D,
185 cpl_frame* atmext,
186 cpl_frame* response,
187 int mpar,
188 xsh_instrument* inst,
189 const char* rec_prefix,
190 cpl_frame** fcal_rect_2D,
191 cpl_frame** fcal_2D);
192
193cpl_error_code
194xsh_flux_calibrate1D(cpl_frame* rect1D,
195 cpl_frame* atmext,
196 cpl_frame* response,
197 int mpar,
198 xsh_instrument* inst,
199 const char* rec_prefix,
200 cpl_frame** fcal_rect_1D,
201 cpl_frame** fcal_1D);
202
203
204
205cpl_error_code
206xsh_ifu_stare_get_calibs(cpl_frameset* calib,
207 xsh_instrument* inst,
208 cpl_frame** spectral_format,
209 cpl_frame** mbias,
210 cpl_frame** mdark,
211 cpl_frame** mflat,
212 cpl_frame** otab_edges,
213 cpl_frame** model_cfg,
214 cpl_frame** bpmap,
215 cpl_frame** wmap,
216 cpl_frame** smap,
217 cpl_frame** ifu_cfg_tab,
218 cpl_frame** ifu_cfg_cor,
219 cpl_frame** wavesol,
220 const char* rec_id,
221 int * recipe_use_model,
222 int pscan);
223
224cpl_error_code
225xsh_slit_stare_get_calibs(cpl_frameset* calib,
227 cpl_frame** spectralformat,
228 cpl_frame** mbias,
229 cpl_frame** mdark,
230 cpl_frame** mflat,
231 cpl_frame** otab_edges,
232 cpl_frame** model_cfg,
233 cpl_frame** wave_tab,
234 cpl_frame** sky_list,
235 cpl_frame** sky_orders_chunks,
236 cpl_frame** qc_sky,
237 cpl_frame** bpmap,
238 cpl_frame** sframe_sky_sub_tab,
239 cpl_frame** wmap,
240 cpl_frame** smap,
241 const char* rec_id,
242 int * recipe_use_model,
243 int pscan);
244
245cpl_error_code
247 cpl_frame** bpmap,cpl_frame** mbias,
248 cpl_frame** mdark, cpl_frame** otab_edges,
249 cpl_frame** model_cfg, cpl_frame** wave_tab,
250 cpl_frame** mflat, cpl_frame** wmap, cpl_frame** smap,
251 cpl_frame** spectral_format,const char* rec_id);
252
253
254cpl_error_code
255xsh_slit_stare_get_params(cpl_parameterlist* parameters,
256 const char* rec_id,
257 int* pre_overscan_corr,
258 xsh_background_param** backg_par,
259 xsh_localize_obj_param** loc_obj_par,
260 xsh_rectify_param** rectify_par,
261 xsh_remove_crh_single_param** crh_single_par,
262 int* sub_sky_nbkpts1,
263 int* do_flatfield,
264 int* sub_sky_nbkpts2,
266 int* do_optextract,
267 xsh_opt_extract_param** opt_extract_par,
268 int* generate_sdp_format);
269
270cpl_error_code
271xsh_slit_offset_get_params(cpl_parameterlist* parameters,
272 const char* rec_id,
273 xsh_localize_obj_param** loc_obj_par,
274 xsh_rectify_param** rectify_par,
275 xsh_remove_crh_single_param** crh_single_par,
276 xsh_extract_param**extract_par,
277 xsh_combine_nod_param** combine_nod_param,
278 int* do_flatfield,
279 int* gen_sky,
280 int* generate_sdp_format);
281
282cpl_error_code
284 xsh_remove_crh_single_param* crh_single_par,
285 xsh_rectify_param* rectify_par,
286 int do_sub_sky,
287 const char* rec_prefix,
288 cpl_frame* rmbkg,
289 cpl_frame* order_tab_edges,
290 cpl_frame* slitmap,
291 cpl_frame* wavemap,
292 cpl_frame* sky_map,
293 cpl_frame* model_config,
294 cpl_frame* single_frame_sky_sub_tab,
296 int sub_sky_nbkpts1,
298 cpl_frame* qc_sky_frame,
299 cpl_frame* sky_orders_chunks,
300 cpl_frame** sky,
301 cpl_frame** sky_eso,
302 cpl_frame** sky_ima,
303 cpl_frame* wave_tab,
304 cpl_frame* disp_tab,
305 cpl_frame* spectral_format,
306 int nb_raw_frames,
307 cpl_frame** loc_table,
308 cpl_frame** clean,
309 cpl_frame** clean_obj,const int clean_tmp);
310
311cpl_error_code
312xsh_slit_stare_get_maps(cpl_frameset* calib,
313 int do_compute_map,int recipe_use_model,
314 const char* rec_prefix,xsh_instrument* instrument,
315 cpl_frame* model_config_frame,cpl_frame* crhm_frame,
316 cpl_frame* disp_tab_frame, cpl_frame* order_tab_edges,
317 cpl_frame** wavemap_frame, cpl_frame** slitmap_frame);
318
319cpl_error_code
320xsh_scired_util_spectra_flux_calibrate(cpl_frame* res2D,cpl_frame* res1D,
321 cpl_frame* response,cpl_frame* atmext,
322 xsh_instrument* inst,
323 const char* prefix,
324 cpl_frame** fluxcal_2D,
325 cpl_frame** fluxcal_1D);
326
327cpl_frame* xsh_compute_efficiency(cpl_frame* mer1D, cpl_frame* std_cat,
328 cpl_frame* atm_ext, cpl_frame* high_abs_win,
329 xsh_instrument* instr);
330
331
332cpl_error_code
333xsh_compute_resampling_accuracy(cpl_frame* wavemap,
334 cpl_frame* slitmap,
335 cpl_frame* order_tab_edges,
336 cpl_frame* model_config,
337 cpl_frame* merged2D,
339
340cpl_error_code
342 cpl_frame* order_tab_edges,
343 cpl_frame* model_config,
344 cpl_frame* merged1D,
346cpl_frameset*
347xsh_frameset_crh_single(cpl_frameset* raws,
348 xsh_remove_crh_single_param * crh_single_par,
349 cpl_frame* sky_map_frm,
350 xsh_instrument* instrument,const char* prefix,const char* spec);
351
352cpl_frameset*
353xsh_frameset_mflat_divide(cpl_frameset* input, cpl_frame* mflat,
355
356
357
358
359#endif
static xsh_instrument * instrument
cpl_error_code xsh_scired_slit_nod_get_calibs(cpl_frameset *raws, cpl_frameset *calib, xsh_instrument *instrument, cpl_frame **bpmap, cpl_frame **master_bias, cpl_frame **master_flat, cpl_frame **order_tab_edges, cpl_frame **wave_tab, cpl_frame **model_config_frame, cpl_frame **wavemap, cpl_frame **slitmap, cpl_frame **disp_tab_frame, cpl_frame **spectral_format, cpl_frame **skymask_frame, cpl_frame **response_ord_frame, cpl_frame **frm_atmext, int do_computemap, int use_skymask, int pscan, const char *rec_prefix, const char *rec_id)
cpl_frameset * xsh_nod_group_by_reloff(cpl_frameset *ord_set, xsh_instrument *instrument, xsh_stack_param *stack_par)
cpl_error_code xsh_slit_stare_correct_crh_and_sky(xsh_localize_obj_param *loc_obj_par, xsh_remove_crh_single_param *crh_single_par, xsh_rectify_param *rectify_par, int do_sub_sky, const char *rec_prefix, cpl_frame *rmbkg, cpl_frame *order_tab_edges, cpl_frame *slitmap, cpl_frame *wavemap, cpl_frame *sky_map, cpl_frame *model_config, cpl_frame *single_frame_sky_sub_tab, xsh_instrument *instrument, int sub_sky_nbkpts1, xsh_subtract_sky_single_param *sky_par, cpl_frame *qc_sky_frame, cpl_frame *sky_orders_chunks, cpl_frame **sky, cpl_frame **sky_eso, cpl_frame **sky_ima, cpl_frame *wave_tab, cpl_frame *disp_tab, cpl_frame *spectral_format, int nb_raw_frames, cpl_frame **loc_table, cpl_frame **clean, cpl_frame **clean_obj, const int clean_tmp)
correct CRH and sky lines (1st iteration)
cpl_error_code xsh_slit_offset_get_params(cpl_parameterlist *parameters, const char *rec_id, xsh_localize_obj_param **loc_obj_par, xsh_rectify_param **rectify_par, xsh_remove_crh_single_param **crh_single_par, xsh_extract_param **extract_par, xsh_combine_nod_param **combine_nod_param, int *do_flatfield, int *gen_sky, int *generate_sdp_format)
cpl_frameset * xsh_scired_slit_nod_accurate(cpl_frameset *nod_set, cpl_frame *spectral_format, cpl_frame *master_flat, cpl_frame *order_tab_edges, cpl_frame *wave_tab, cpl_frame *model_config_frame, cpl_frame *disp_tab_frame, cpl_frame *wavemap, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_remove_crh_single_param *crh_single_par, xsh_rectify_param *rectify_par, xsh_localize_obj_param *loc_obj_par, const char *throw_name, const int do_flatfield, const char *rec_prefix)
cpl_error_code xsh_stare_params_bin_scale(cpl_frameset *raws, xsh_background_param *backg, xsh_opt_extract_param *opt_extract_par, int *sub_sky_nbkpts1, int *sub_sky_nbkpts2)
Corrects parameters for binning.
cpl_error_code xsh_get_dispersion_calibs(cpl_frameset *calib, xsh_instrument *instrument, const int do_computemap, cpl_frame **model_config_frame, cpl_frame **wave_tab, cpl_frame **wavemap)
cpl_error_code xsh_ifu_stare_get_calibs(cpl_frameset *calib, xsh_instrument *inst, cpl_frame **spectral_format, cpl_frame **mbias, cpl_frame **mdark, cpl_frame **mflat, cpl_frame **otab_edges, cpl_frame **model_cfg, cpl_frame **bpmap, cpl_frame **wmap, cpl_frame **smap, cpl_frame **ifu_cfg_tab, cpl_frame **ifu_cfg_cor, cpl_frame **wavesol, const char *rec_id, int *recipe_use_model, int pscan)
cpl_error_code xsh_slit_stare_get_params(cpl_parameterlist *parameters, const char *rec_id, int *pre_overscan_corr, xsh_background_param **backg_par, xsh_localize_obj_param **loc_obj_par, xsh_rectify_param **rectify_par, xsh_remove_crh_single_param **crh_single_par, int *sub_sky_nbkpts1, int *do_flatfield, int *sub_sky_nbkpts2, xsh_subtract_sky_single_param **sky_par, int *do_optextract, xsh_opt_extract_param **opt_extract_par, int *generate_sdp_format)
cpl_frameset * xsh_frameset_crh_single(cpl_frameset *raws, xsh_remove_crh_single_param *crh_single_par, cpl_frame *sky_map_frm, xsh_instrument *instrument, const char *prefix, const char *spec)
Generates a new frameset with each frame CRH-single rejected from input frameset.
cpl_error_code xsh_compute_wavelength_resampling_accuracy(cpl_frame *wavemap, cpl_frame *order_tab_edges, cpl_frame *model_config, cpl_frame *merged1D, xsh_instrument *instrument)
cpl_error_code xsh_flux_calibrate(cpl_frame *rect2D, cpl_frame *rect1D, cpl_frame *atmext, cpl_frame *response, int mpar, xsh_instrument *inst, const char *rec_prefix, cpl_frame **fcal_rect_2D, cpl_frame **fcal_rect_1D, cpl_frame **fcal_2D, cpl_frame **fcal_1D)
cpl_error_code xsh_scired_get_proper_maps(cpl_frameset *raws, cpl_frameset *calib, cpl_frame *order_tab_edges, cpl_frame *master_flat, cpl_frame *model_config_frame, cpl_frame *disp_tab, xsh_instrument *instrument, const int do_computemap, const char *rec_prefix, cpl_frame **wavemap, cpl_frame **slitmap)
cpl_error_code xsh_slit_stare_get_maps(cpl_frameset *calib, int do_compute_map, int recipe_use_model, const char *rec_prefix, xsh_instrument *instrument, cpl_frame *model_config_frame, cpl_frame *crhm_frame, cpl_frame *disp_tab_frame, cpl_frame *order_tab_edges, cpl_frame **wavemap_frame, cpl_frame **slitmap_frame)
cpl_error_code xsh_scired_util_spectra_flux_calibrate(cpl_frame *res2D, cpl_frame *res1D, cpl_frame *response, cpl_frame *atmext, xsh_instrument *inst, const char *prefix, cpl_frame **fluxcal_2D, cpl_frame **fluxcal_1D)
cpl_frame * xsh_compute_efficiency(cpl_frame *mer1D, cpl_frame *std_cat, cpl_frame *atm_ext, cpl_frame *high_abs_win, xsh_instrument *instr)
cpl_frameset * xsh_nod_group_by_reloff2(cpl_frameset *ord_set, xsh_instrument *instrument, xsh_stack_param *stack_par)
cpl_error_code xsh_get_normal_calibs(cpl_frameset *calib, xsh_instrument *instrument, const char *recipe_id, int pscan, cpl_frame **spectral_format, cpl_frame **master_bias, cpl_frame **bpmap, cpl_frame **order_tab_edges, cpl_frame **master_flat)
cpl_frameset * xsh_frameset_mflat_divide(cpl_frameset *input, cpl_frame *mflat, xsh_instrument *instrument)
Generates a new frameset with each frame mflat divided input frameset.
cpl_error_code xsh_slit_stare_get_calibs(cpl_frameset *calib, xsh_instrument *instrument, cpl_frame **spectralformat, cpl_frame **mbias, cpl_frame **mdark, cpl_frame **mflat, cpl_frame **otab_edges, cpl_frame **model_cfg, cpl_frame **wave_tab, cpl_frame **sky_list, cpl_frame **sky_orders_chunks, cpl_frame **qc_sky, cpl_frame **bpmap, cpl_frame **sframe_sky_sub_tab, cpl_frame **wmap, cpl_frame **smap, const char *rec_id, int *recipe_use_model, int pscan)
cpl_error_code xsh_slit_offset_get_calibs(cpl_frameset *calib, xsh_instrument *instrument, cpl_frame **bpmap, cpl_frame **mbias, cpl_frame **mdark, cpl_frame **otab_edges, cpl_frame **model_cfg, cpl_frame **wave_tab, cpl_frame **mflat, cpl_frame **wmap, cpl_frame **smap, cpl_frame **spectral_format, const char *rec_id)
cpl_error_code xsh_flux_calibrate2D(cpl_frame *rect2D, cpl_frame *atmext, cpl_frame *response, int mpar, xsh_instrument *inst, const char *rec_prefix, cpl_frame **fcal_rect_2D, cpl_frame **fcal_2D)
cpl_frameset * xsh_scired_slit_nod_fast(cpl_frameset *nod_set, cpl_frame *spectral_format, cpl_frame *master_flat, cpl_frame *order_tab_edges, cpl_frame *wave_tab, cpl_frame *model_config_frame, cpl_frame *disp_tab_frame, cpl_frame *wavemap, xsh_instrument *instrument, xsh_remove_crh_single_param *crh_single_par, xsh_rectify_param *rectify_par, const int do_flatfield, const int corr_sky, const int compute_eff, const char *rec_prefix, cpl_frameset **comb_eff_set)
cpl_error_code xsh_scired_nod_get_parameters(cpl_parameterlist *parameters, xsh_instrument *instrument, xsh_remove_crh_single_param **crh_single_par, xsh_rectify_param **rectify_par, xsh_extract_param **extract_par, xsh_combine_nod_param **combine_nod_par, xsh_slit_limit_param **slit_limit_par, xsh_localize_obj_param **loc_obj_par, int *rectify_fast, int *pscan, int *generate_sdp_format, const char *rec_id)
cpl_error_code xsh_compute_resampling_accuracy(cpl_frame *wavemap, cpl_frame *slitmap, cpl_frame *order_tab_edges, cpl_frame *model_config, cpl_frame *merged2D, xsh_instrument *instrument)
cpl_error_code xsh_respon_slit_nod_get_calibs(cpl_frameset *calib, xsh_instrument *instrument, cpl_frame **bpmap, cpl_frame **master_bias, cpl_frame **master_flat, cpl_frame **order_tab_edges, cpl_frame **wave_tab, cpl_frame **model_config_frame, cpl_frame **wavemap, cpl_frame **slitmap, cpl_frame **disp_tab_frame, cpl_frame **spectral_format, cpl_frame **skymask_frame, cpl_frame **response_ord_frame, cpl_frame **frm_atmext, int do_computemap, int use_skymask, int pscan, const char *rec_prefix, const char *rec_id)
cpl_error_code xsh_flux_calibrate1D(cpl_frame *rect1D, cpl_frame *atmext, cpl_frame *response, int mpar, xsh_instrument *inst, const char *rec_prefix, cpl_frame **fcal_rect_1D, cpl_frame **fcal_1D)