IIINSTRUMENT Pipeline Reference Manual 4.6.1
visir_spc_obs_ech.c
1/* $Id: visir_spc_obs_ech.c,v 1.98 2012-09-27 15:45:07 jtaylor Exp $
2 *
3 * This file is part of the VISIR Pipeline
4 * Copyright (C) 2002,2003,2012 European Southern Observatory
5 *
6 * This program 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., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
19 */
20
21/*
22 * $Author: jtaylor $
23 * $Date: 2012-09-27 15:45:07 $
24 * $Revision: 1.98 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifdef HAVE_CONFIG_H
29#include <config.h>
30#endif
31
32/*-----------------------------------------------------------------------------
33 Includes
34 -----------------------------------------------------------------------------*/
35
36#include "visir_recipe.h"
37#include "visir_spectro.h"
38#include "visir_spc_distortion.h"
39#include "visir_spc_photom.h"
40
41
42/*-----------------------------------------------------------------------------
43 Defines
44 -----------------------------------------------------------------------------*/
45
46#define RECIPE_STRING "visir_old_spc_obs_ech"
47
48/* FITS keys to be loaded for all raw files */
49#define RECIPE_KEYS_REGEXP_ALL \
50 VISIR_PFITS_REGEXP_IMG_RECOMBINE \
51 "|" VISIR_PFITS_REGEXP_SPC_GET_RES_WL
52
53/* FITS keys to be loaded for first raw file */
54#define RECIPE_KEYS_REGEXP \
55 RECIPE_KEYS_REGEXP_ALL \
56 "|" VISIR_PFITS_REGEXP_CAPA \
57 "|" VISIR_PFITS_REGEXP_SPC_WCAL_PAF
58
59/* FITS keys to be loaded for first raw file, in case WCS is used */
60#define RECIPE_KEYS_REGEXP_WCS \
61 RECIPE_KEYS_REGEXP \
62 "|" IRPLIB_PFITS_WCS_REGEXP
63
64#define RAW_INPUT 0
65#define PREPROCESSED_INPUT 1
66
67/*-----------------------------------------------------------------------------
68 Private Functions prototypes
69 -----------------------------------------------------------------------------*/
70static cpl_error_code visir_spc_ech_save(cpl_frameset *,
71 const cpl_parameterlist *,
72 const cpl_propertylist *,
73 const cpl_propertylist *,
74 const cpl_image *,
75 const cpl_image *,
76 const cpl_table *,
77 const char *,
78 const char *,
79 const char *);
80
81VISIR_RECIPE_DEFINE(visir_old_spc_obs_ech,
82 VISIR_PARAM_ZERODIST | VISIR_PARAM_ORDEROFF |
83 VISIR_PARAM_EMIS_TOL |
84 VISIR_PARAM_REFINE | VISIR_PARAM_XCORR |
85 VISIR_PARAM_OFFSETS | VISIR_PARAM_OBJECTS |
86 VISIR_PARAM_NODPOS | VISIR_PARAM_AUTOBPM |
87 VISIR_PARAM_GLITCH | VISIR_PARAM_PURGE |
88 VISIR_PARAM_UNION | VISIR_PARAM_REJECT |
89 VISIR_PARAM_STRIPITE | VISIR_PARAM_STRIPMOR |
90 VISIR_PARAM_PLOT | VISIR_PARAM_SLITSKEW |
91 VISIR_PARAM_SPECSKEW | VISIR_PARAM_VERTARC |
92 VISIR_PARAM_REJLEFT | VISIR_PARAM_REJRIGHT |
93 VISIR_PARAM_HORIARC | VISIR_PARAM_FIXCOMBI |
94 VISIR_PARAM_GAIN | VISIR_PARAM_RONOISE |
95 VISIR_PARAM_OXSIGMA | VISIR_PARAM_OXNITER |
96 VISIR_PARAM_OXSMOOTH | VISIR_PARAM_OXKERNEL |
97 VISIR_PARAM_BKG_CORRECT,
98 "Old DRS detector: Spectroscopic Observation recipe in Echelle mode",
99 "This recipe estimates the dispersion relation using the "
100 "atmospheric spectrum\n"
101 "in a grism spectroscopy half-cycle frame.\n"
102 "It also extracts the spectrum of an observed object using "
103 "a combined frame.\n"
104 "The files listed in the Set Of Frames (sof-file) "
105 "must be tagged:\n"
106 "VISIR-Echelle-Spectroscopy-file.fits "
107 VISIR_SPC_OBS_ECH_RAW "\n"
108 "VISIR-Quantum-Efficiency-Calibration-file.fits "
109 VISIR_CALIB_QEFF_SPC "\n"
110 "VISIR-Atmospheric-Emission-Lines-Calibration-file.fits "
111 VISIR_CALIB_LINES_SPC
112 "\n"
113 MAN_VISIR_CALIB_BPM_SPC);
114
115/*-----------------------------------------------------------------------------
116 Static variables
117 -----------------------------------------------------------------------------*/
118
119/*----------------------------------------------------------------------------*/
123/*----------------------------------------------------------------------------*/
124
125/*-----------------------------------------------------------------------------
126 Functions code
127 -----------------------------------------------------------------------------*/
128
129/*----------------------------------------------------------------------------*/
136/*----------------------------------------------------------------------------*/
137static int visir_old_spc_obs_ech(cpl_frameset * framelist,
138 const cpl_parameterlist * parlist)
139{
140 irplib_framelist * allframes = NULL;
141 irplib_framelist * rawframes = NULL;
142 irplib_framelist * skyframes = NULL;
143 cpl_propertylist * qclist = cpl_propertylist_new();
144 cpl_propertylist * paflist = cpl_propertylist_new();
145 const char * badpix;
146 const char * star_cat;
147 const char * spc_cal_qeff;
148 const char * spc_cal_lines;
149 const char * flat;
150 cpl_image * combined = NULL;
151 cpl_image * flipped = NULL;
152 cpl_image * comnarrow = NULL;
153 cpl_imagelist * hcycle = NULL;
154 cpl_table * spc_table = NULL;
155 cpl_image * weight2d = NULL;
156 cpl_image * imhcycle = NULL;
157 cpl_image * imhcyclenarrow = NULL;
158 cpl_image ** combinedpair;
159 double wlen, slitw, temp, fwhm;
160 visir_spc_resol resol;
161 cpl_boolean drop_wcs;
162 int input_mode;
163 cpl_errorstate cleanstate = cpl_errorstate_get();
164 visir_spc_config spc_config;
165 const char * dit_key = VISIR_PFITS_DOUBLE_DIT;
166 cpl_boolean has_phot = CPL_FALSE;
167
168 spc_config.recipename = RECIPE_STRING;
169 spc_config.parlist = parlist;
170 spc_config.orderoffset = 0;
171 spc_config.phot_emis_tol = 1.0;
172
173 /* Retrieve input parameters */
174 spc_config.plot = visir_parameterlist_get_int(
175 parlist, RECIPE_STRING, VISIR_PARAM_PLOT);
176 spc_config.phi = visir_parameterlist_get_double(
177 parlist, RECIPE_STRING, VISIR_PARAM_SLITSKEW);
178 spc_config.ksi = visir_parameterlist_get_double(
179 parlist, RECIPE_STRING, VISIR_PARAM_SPECSKEW);
180 spc_config.eps = visir_parameterlist_get_double(
181 parlist, RECIPE_STRING, VISIR_PARAM_VERTARC);
182 spc_config.delta = visir_parameterlist_get_double(
183 parlist, RECIPE_STRING, VISIR_PARAM_HORIARC);
184 spc_config.gain = visir_parameterlist_get_double(
185 parlist, RECIPE_STRING, VISIR_PARAM_GAIN);
186 spc_config.ron = visir_parameterlist_get_double(
187 parlist, RECIPE_STRING, VISIR_PARAM_RONOISE);
188 spc_config.ox_sigma = visir_parameterlist_get_double(
189 parlist, RECIPE_STRING, VISIR_PARAM_OXSIGMA);
190 spc_config.ox_niters = visir_parameterlist_get_int(
191 parlist, RECIPE_STRING, VISIR_PARAM_OXNITER);
192 spc_config.ox_smooth = visir_parameterlist_get_int(
193 parlist, RECIPE_STRING, VISIR_PARAM_OXSMOOTH);
194 spc_config.ox_kernel = visir_parameterlist_get_int(
195 parlist, RECIPE_STRING, VISIR_PARAM_OXKERNEL);
196 spc_config.orderoffset = visir_parameterlist_get_int(
197 parlist, RECIPE_STRING, VISIR_PARAM_ORDEROFF);
198 spc_config.do_fixcombi = visir_parameterlist_get_bool(
199 parlist, RECIPE_STRING, VISIR_PARAM_FIXCOMBI);
200 spc_config.phot_emis_tol = visir_parameterlist_get_double(
201 parlist, RECIPE_STRING, VISIR_PARAM_EMIS_TOL);
202 spc_config.bkgcorrect = visir_parameterlist_get_bool(
203 parlist, RECIPE_STRING, VISIR_PARAM_BKG_CORRECT);
204
205 skip_if (0);
206
207 /* Identify the RAW and CALIB frames in the input frameset */
208 skip_if (visir_dfs_set_groups(framelist));
209
210 /* Objects observation */
211 allframes = irplib_framelist_cast(framelist);
212 skip_if(allframes == NULL);
213 rawframes = irplib_framelist_extract(allframes, VISIR_SPC_OBS_ECH_RAW);
214 if (rawframes == NULL) {
215 cpl_errorstate_set(cleanstate);
216 rawframes = irplib_framelist_extract(allframes, VISIR_SPC_OBS_ECH_PP);
217 skip_if (rawframes == NULL);
218 skyframes = irplib_framelist_extract(allframes, VISIR_SPC_OBS_SKYFRAME);
219 skip_if (skyframes == NULL);
220 input_mode = PREPROCESSED_INPUT;
221 cpl_msg_info(cpl_func, "Input: preprocessed data");
222 } else {
223 cpl_msg_info(cpl_func, "Input: raw data");
224 input_mode = RAW_INPUT;
225 }
226 skip_if (rawframes == NULL);
227 const cpl_size nframes = irplib_framelist_get_size(rawframes);
228
229 irplib_framelist_empty(allframes);
230
231 skip_if(irplib_framelist_load_propertylist_all(rawframes, 0, "^("
232 VISIR_PFITS_REGEXP_SPC_SENSIT
233 "|" RECIPE_KEYS_REGEXP_ALL
234 "|" RECIPE_KEYS_REGEXP_WCS
235 "|" VISIR_PFITS_REGEXP_DIT
236 "|" "ESO DRS .*"
237 "|" "ESO PRO DATANCOM"
238 "|" "ESO QC EXPTIME"
239 "|" "ESO QC BACKGD MEAN"
240 ")$", CPL_FALSE));
241
242 skip_if(visir_dfs_check_framelist_tag(rawframes));
243
244 if (cpl_propertylist_has(irplib_framelist_get_propertylist(rawframes, 0),
245 VISIR_PFITS_DOUBLE_SEQ1_DIT))
246 dit_key = VISIR_PFITS_DOUBLE_SEQ1_DIT;
247 skip_if(0);
248
249 visir_data_type data_type;
250 const cpl_frame * frm = irplib_framelist_get_const(rawframes, 0);
251 skip_if(visir_get_data_type(frm,
252 irplib_framelist_get_propertylist(rawframes, 0), &data_type, NULL));
253
254 /* Standard star catalog */
255 star_cat = irplib_frameset_find_file(framelist, VISIR_CALIB_STDSTAR_SPC);
256
257 /* Quantum efficiency file */
258 spc_cal_qeff = irplib_frameset_find_file(framelist, VISIR_CALIB_QEFF_SPC);
259
260 /* Spectral lines calibration file */
261 spc_cal_lines = irplib_frameset_find_file(framelist, VISIR_CALIB_LINES_SPC);
262
263 /* Bad pixels calibration file */
264 badpix = irplib_frameset_find_file(framelist, VISIR_CALIB_BPM);
265
266 /* Flatfield calibration file */
267 flat = irplib_frameset_find_file(framelist, VISIR_CALIB_FLAT);
268
269 /* Get Resolution and Central Wavelength */
270 resol = visir_spc_get_res_wl(rawframes, &wlen, &slitw, &temp, &fwhm,
271 visir_data_is_aqu(data_type));
272
273 skip_if (0);
274
275 if (resol != VISIR_SPC_R_GHR) {
276 if (spc_config.orderoffset == 0) {
277 cpl_msg_warning(cpl_func,"Reducing non-HR Grism data as main order");
278 } else {
279 cpl_msg_error(cpl_func, "This recipe cannot reduce non-HR Grism "
280 "data with an order-offset of %d",
281 spc_config.orderoffset);
282 visir_error_set(CPL_ERROR_TYPE_MISMATCH);
283 skip_if(1);
284 }
285 }
286
287 if (input_mode == PREPROCESSED_INPUT) {
288 cpl_imagelist * imagelist = cpl_imagelist_new();
289 const cpl_propertylist ** plists =
290 cpl_malloc(nframes * sizeof(cpl_propertylist *));
291 double bg_sum = 0;
292
293 for (cpl_size i = 0; i < nframes; i++) {
294 cpl_frame * frame = irplib_framelist_get(rawframes, i);
295 const char * fname = cpl_frame_get_filename(frame);
296 const cpl_size next = cpl_fits_count_extensions(fname);
297 cpl_imagelist * tmplist = cpl_imagelist_new();
298 cpl_errorstate prestate = cpl_errorstate_get();
299 cpl_image * tmp;
300
301 plists[i] = irplib_framelist_get_propertylist_const(rawframes, i);
302 if (cpl_propertylist_has(plists[i], "ESO QC BACKGD MEAN"))
303 bg_sum += cpl_propertylist_get_double(plists[i],
304 "ESO QC BACKGD MEAN");
305 skip_if(0);
306
307 for (cpl_size j = 0; j < 1 + next; j++) {
308 cpl_image * img =
309 cpl_image_load(fname, CPL_TYPE_UNSPECIFIED, 0, j);
310 if (img == NULL) {
311 cpl_errorstate_set(prestate);
312 cpl_msg_info(cpl_func, "No image in extension %d", (int)j);
313 continue;
314 }
315 cpl_imagelist_set(tmplist, img, cpl_imagelist_get_size(tmplist));
316 skip_if(0);
317 }
318 tmp = cpl_imagelist_collapse_create(tmplist);
319
320 skip_if (visir_spc_det_fix(&tmp, 1, CPL_TRUE, wlen, resol,
321 spc_config.phi, spc_config.ksi,
322 spc_config.eps, spc_config.delta,
323 spc_config.plot));
324 cpl_imagelist_set(imagelist, tmp,
325 cpl_imagelist_get_size(imagelist));
326 cpl_imagelist_delete(tmplist);
327 }
328 combinedpair =
329 visir_img_recombine_list(RECIPE_STRING, parlist, imagelist,
330 plists, CPL_GEOM_FIRST, &drop_wcs);
331
332
333 cpl_propertylist_append_double(qclist, "ESO QC BACKGD MEAN",
334 bg_sum / nframes);
335 cpl_imagelist_delete(imagelist);
336 cpl_free(plists);
337 bug_if(0);
338
339 /* FIXME: make use of multiple skyframes */
340 {
341 cpl_frame * frame = irplib_framelist_get(skyframes, 0);
342 const char * fname = cpl_frame_get_filename(frame);
343 imhcycle = cpl_image_load(fname, CPL_TYPE_UNSPECIFIED, 0, 0);//1);
344 skip_if(imhcycle == NULL);
345 }
346
347 skip_if (visir_spc_det_fix(&imhcycle, 1, CPL_TRUE, wlen, resol,
348 spc_config.phi, spc_config.ksi,
349 spc_config.eps, spc_config.delta,
350 spc_config.plot));
351
352 } else if (input_mode == RAW_INPUT) {
353 combinedpair = visir_img_recombine(RECIPE_STRING, parlist, rawframes, badpix,
354 flat, CPL_GEOM_FIRST, &drop_wcs,
355 !spc_config.do_fixcombi, wlen, resol);
356
357 /* Get the hcycle image from the reference file */
358 hcycle = visir_load_hcycle(rawframes, 0);
359 skip_if (0);
360
361 imhcycle = cpl_imagelist_unset(hcycle, 0);
362
363 skip_if (visir_spc_det_fix(&imhcycle, 1, CPL_FALSE, wlen, resol,
364 spc_config.phi, spc_config.ksi,
365 spc_config.eps, spc_config.delta,
366 spc_config.plot));
367
368 skip_if(visir_qc_append_background(qclist, rawframes, 0, 0));
369 }
370 else
371 bug_if(1);
372
373 if (combinedpair == NULL) {
374 cpl_msg_error(cpl_func, "Could not combine the input frames");
375 skip_if (1);
376 }
377
378 cpl_image_delete(combinedpair[1]);
379 combined = cpl_image_cast(combinedpair[0], CPL_TYPE_DOUBLE);
380 cpl_image_delete(combinedpair[0]);
381 cpl_free(combinedpair);
382
383 /* Convert the combined image
384 * recipe only supported with drs data */
385 bool rev;
386 flipped = visir_spc_flip(combined, wlen, resol, VISIR_DATA_CUBE2, &rev);
387 skip_if (0);
388 cpl_image_delete(combined);
389 combined = flipped;
390 flipped = NULL;
391
392 /* Convert the half cycle image
393 * recipe only supported with drs data */
394 flipped = visir_spc_flip(imhcycle, wlen, resol, VISIR_DATA_CUBE2, NULL);
395 skip_if (0);
396 cpl_image_delete(imhcycle);
397 imhcycle = flipped;
398 flipped = NULL;
399
400 skip_if (0);
401
402 skip_if (spc_config.do_fixcombi && input_mode == RAW_INPUT &&
403 visir_spc_det_fix(&combined, 1, CPL_TRUE, wlen, resol,
404 spc_config.phi, spc_config.ksi,
405 spc_config.eps, spc_config.delta,
406 spc_config.plot));
407
408 const int ncomb = visir_get_ncombine(rawframes);
409 skip_if (!ncomb);
410
411 int lcol = -1, rcol = -1;
412 skip_if (visir_spc_extract_order(&imhcyclenarrow, &comnarrow, &lcol, &rcol,
413 combined, imhcycle, wlen, &spc_config,
414 CPL_TRUE, visir_data_is_aqu(data_type)));
415
416 int const ident = -1; // neg ident: use old extract alg
417 visir_apdefs * const aps = visir_apdefs_new(1, ident, 'O', 0);
418 aps->limits[0] = (visir_aplimits){ lcol, rcol };
419
420 skip_if (visir_spc_extract_wcal(comnarrow, imhcyclenarrow, lcol, rcol, wlen,
421 slitw, temp, fwhm, resol, &spc_config,
422 spc_cal_lines, spc_cal_qeff,
423 visir_data_is_aqu(data_type), aps, ncomb,
424 rev, &spc_table, &weight2d, qclist));
425
426
427
428 bug_if (visir_spectro_qc(qclist, paflist, drop_wcs, rawframes, NULL,
429 "^(" VISIR_PFITS_REGEXP_SPC_WCAL_PAF ")$"));
430
431 if (star_cat) {
432 cpl_errorstate prestate = cpl_errorstate_get();
433 const cpl_propertylist * plist =
434 irplib_framelist_get_propertylist_const(rawframes, 0);
435 skip_if(0);
436 spc_config.phu = qclist;
437 if (visir_spc_phot_sensit(rawframes, &spc_config, plist, star_cat,
438 &weight2d, qclist, spc_table, resol,
439 dit_key)) {
440 irplib_error_recover(prestate, "Could not perform photometric "
441 "calibration");
442 } else {
443 has_phot = CPL_TRUE;
444 }
445 } else {
446 /* This column is not part of the product */
447 skip_if (cpl_table_erase_column(spc_table, "SPC_EMISSIVITY"));
448 }
449
450 irplib_framelist_empty(rawframes);
451
452 /* Save the spectrum */
453 cpl_msg_info(cpl_func, "Saving the produced spectrum");
454
455 /* PRO.CATG */
456 bug_if (cpl_propertylist_append_string(paflist, CPL_DFS_PRO_CATG,
457 VISIR_SPC_OBS_ECH_COMBINED_PROCATG));
458
459 if (has_phot)
460 skip_if (visir_spc_ech_save(framelist, parlist, qclist, paflist,
461 combined, weight2d, spc_table,
462 VISIR_SPC_PHOT_ECH_TAB_PROCATG,
463 VISIR_SPC_PHOT_ECH_COMBINED_PROCATG,
464 VISIR_SPC_PHOT_ECH_WEIGHT_PROCATG));
465 else
466 skip_if (visir_spc_ech_save(framelist, parlist, qclist, paflist,
467 combined, weight2d, spc_table,
468 VISIR_SPC_OBS_ECH_TAB_PROCATG,
469 VISIR_SPC_OBS_ECH_COMBINED_PROCATG,
470 VISIR_SPC_OBS_ECH_WEIGHT_PROCATG));
471
472 end_skip;
473
474 cpl_propertylist_delete(qclist);
475 cpl_propertylist_delete(paflist);
476 irplib_framelist_delete(allframes);
477 irplib_framelist_delete(rawframes);
478 irplib_framelist_delete(skyframes);
479 cpl_image_delete(flipped);
480 cpl_image_delete(combined);
481 cpl_image_delete(comnarrow);
482 cpl_image_delete(imhcyclenarrow);
483 cpl_table_delete(spc_table);
484 cpl_image_delete(weight2d);
485 cpl_image_delete(imhcycle);
486 cpl_imagelist_delete(hcycle);
487
488 return cpl_error_get_code();
489}
490
491
492/*----------------------------------------------------------------------------*/
507/*----------------------------------------------------------------------------*/
508static cpl_error_code visir_spc_ech_save(cpl_frameset * set,
509 const cpl_parameterlist * parlist,
510 const cpl_propertylist * qclist,
511 const cpl_propertylist * paflist,
512 const cpl_image * combined,
513 const cpl_image * weight2d,
514 const cpl_table * table,
515 const char * tab_procatg,
516 const char * com_procatg,
517 const char * wgt_procatg)
518{
519
520 bug_if (0);
521
522 /* THE TABLE */
523 skip_if (irplib_dfs_save_table(set, parlist, set, table, NULL, RECIPE_STRING,
524 tab_procatg,
525 qclist, NULL, visir_pipe_id,
526 RECIPE_STRING "_tab" CPL_DFS_FITS));
527
528 /* THE COMBINED IMAGE */
529 skip_if (irplib_dfs_save_image(set, parlist, set, combined, CPL_BPP_IEEE_FLOAT,
530 RECIPE_STRING, com_procatg,
531 qclist, NULL, visir_pipe_id,
532 RECIPE_STRING CPL_DFS_FITS));
533
534 /* THE WEIGHT IMAGE */
535 skip_if (irplib_dfs_save_image(set, parlist, set, weight2d, CPL_BPP_IEEE_FLOAT,
536 RECIPE_STRING, wgt_procatg,
537 qclist, NULL, visir_pipe_id,
538 RECIPE_STRING "_weight" CPL_DFS_FITS));
539
540#ifdef VISIR_SAVE_PAF
541 /* THE PAF FILE FOR QC PARAMETERS */
542
543 skip_if (cpl_dfs_save_paf("VISIR", RECIPE_STRING, paflist,
544 RECIPE_STRING CPL_DFS_PAF));
545#else
546 bug_if(paflist == NULL);
547#endif
548
549 end_skip;
550
551 return cpl_error_get_code();
552
553}
cpl_error_code visir_dfs_check_framelist_tag(const irplib_framelist *self)
Check the tags in a frameset (group raw only)
Definition: visir_dfs.c:234
int visir_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
Definition: visir_dfs.c:72
cpl_image ** visir_img_recombine_list(const char *recipename, const cpl_parameterlist *parlist, cpl_imagelist *nodded, const cpl_propertylist **plists, cpl_geom_combine combine_mode, cpl_boolean *pdid_resize)
The VISIR imaging combination using cross correlation.
cpl_imagelist * visir_load_hcycle(const irplib_framelist *rawframes, int pos)
Load the HCYCLE images from a VISIR file.
cpl_image ** visir_img_recombine(const char *recipename, const cpl_parameterlist *parlist, const irplib_framelist *rawframes, const char *badpix, const char *flat, cpl_geom_combine combine_mode, cpl_boolean *pdid_resize, cpl_boolean do_spc_fix, double wlen, visir_spc_resol resol)
The VISIR imaging combination using cross correlation.
int visir_parameterlist_get_int(const cpl_parameterlist *self, const char *recipe, visir_parameter bitmask)
Retrieve the value of a VISIR integer parameter.
double visir_parameterlist_get_double(const cpl_parameterlist *self, const char *recipe, visir_parameter bitmask)
Retrieve the value of a VISIR parameter of type double.
cpl_boolean visir_parameterlist_get_bool(const cpl_parameterlist *self, const char *recipe, visir_parameter bitmask)
Retrieve the value of a VISIR boolean parameter.
cpl_error_code visir_spc_phot_sensit(const irplib_framelist *rawframes, const visir_spc_config *cfg, const cpl_propertylist *plist, const char *star_cat, cpl_image **pweight2d, cpl_propertylist *qclist, cpl_table *spc_table, const visir_spc_resol resol, const char *dit_key)
Compute the sensitivity from an extracted spectrum.