IIINSTRUMENT Pipeline Reference Manual 4.5.1
visir_img_chain.c
1/*
2 * This file is part of the VISIR Pipeline
3 * Copyright (C) 2012,2013,2014,2015 European Southern Observatory
4 *
5 * This program 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, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
18 */
19
20
21#ifdef HAVE_CONFIG_H
22#include <config.h>
23#endif
24
25/*-----------------------------------------------------------------------------
26 Includes
27 -----------------------------------------------------------------------------*/
28
29#ifndef ESO_COVERAGE_BUILD
30#define ESO_COVERAGE_BUILD 0
31#endif
32
33#include "visir_recipe.h"
34
35#include "visir_utils.h"
36#include "irplib_utils.h"
37#include <cxlist.h>
38#include <string.h>
39#include <stdio.h>
40#include <stdlib.h>
41/* for strcasecmp */
42#include <strings.h>
43
44int visir_util_repack_get_info(cpl_pluginlist *);
45int visir_util_detect_shift_get_info(cpl_pluginlist *);
46int visir_util_clip_get_info(cpl_pluginlist *);
47int visir_util_run_swarp_get_info(cpl_pluginlist *);
48int visir_util_qc_get_info(cpl_pluginlist *);
49int visir_old_img_phot_get_info(cpl_pluginlist *);
50int visir_util_join_get_info(cpl_pluginlist *);
51static cpl_error_code visir_img_reduce_fill_parameterlist(cpl_parameterlist *);
52static int visir_img_reduce(cpl_frameset *,
53 const cpl_parameterlist *);
54
55
56/*-----------------------------------------------------------------------------
57 Defines
58 -----------------------------------------------------------------------------*/
59
60#define RECIPE_STRING "visir_img_reduce"
61#define DEFAULT_CONFIG VISIR_CONFIG_PATH "/visir_default.swarp"
62
63/*-----------------------------------------------------------------------------
64 Private Functions prototypes
65 -----------------------------------------------------------------------------*/
66
67/* FIXME: this code is littered with many unimportant memory leaks */
68
69static int visir_img_reduce_create(cpl_plugin * plugin)
70{
71 cpl_recipe * recipe = (cpl_recipe *)plugin; /* Needed for the fill */
72 cpl_errorstate prestate = cpl_errorstate_get(); /* To check the fill */
73
74 /* Propagate error, if any */
75 /* - Need two function calls to ensure plugin validity before the fill */
76 return cpl_recipedefine_create(plugin)
77 || cpl_recipedefine_create_is_ok(prestate,
78 visir_img_reduce_fill_parameterlist(recipe->parameters))
79 ? (int)cpl_error_set_where(cpl_func) : 0;
80}
81
82
83/*----------------------------------------------------------------------------*/
96/*----------------------------------------------------------------------------*/
97static int visir_img_reduce_exec(cpl_plugin * plugin)
98{
99 char * progname = getenv("_");
100 char * classpath = getenv("CLASSPATH");
101 cpl_msg_debug(cpl_func, "Program name: %s", progname);
102 cpl_msg_debug(cpl_func, "CLASSPATH: %s", classpath);
103 if ((progname && strstr(progname, "gasgano")) ||
104 (classpath && strstr(classpath, "gasgano.jar"))) {
105 cpl_msg_info(cpl_func, "Running under gasgano, disabling OpenMP");
106 setenv("OMP_NUM_THREADS", "0", 1);
107 return visir_tmpdir_exec(RECIPE_STRING, plugin, visir_img_reduce);
108 }
109 else if (ESO_COVERAGE_BUILD || getenv("VISIR_NO_FORK") != NULL) {
110 /* debugging and coverage is better without fork */
111 return cpl_recipedefine_exec(plugin, visir_img_reduce)
112 ? (int)cpl_error_set_where(cpl_func) : 0;
113 }
114 else
115 return visir_forking_exec(RECIPE_STRING, plugin, visir_img_reduce);
116}
117
118
119/* The definition of the recipe destroy function */
120static int visir_img_reduce_destroy(cpl_plugin * plugin)
121{
122 /* Propagate error, if any */
123 return cpl_recipedefine_destroy(plugin)
124 ? (int)cpl_error_set_where(cpl_func) : 0;
125}
126
127int cpl_plugin_get_info(cpl_pluginlist * list)
128{
129 /* Propagate error, if any. Return 1 on failure */
130 return cpl_recipedefine_init(list, CPL_VERSION_CODE,
131 VISIR_BINARY_VERSION,
132 "visir_img_reduce",
133 "Combines a stack of chopped, jittered and/or "
134 "nodded exposures and can compute the "
135 "sensitivity for standard star observations",
136 "This recipe recombines the data observed in "
137 "chopping/nodding or\n"
138 "chopping or nodding modes into one combined image using "
139 "optionally\n"
140 "cross-correlation methods.\n"
141 "The files listed in the Set Of Frames (sof-file) "
142 "must be tagged:\n"
143 "VISIR-observation-file.fits " VISIR_IMG_COMBINE_CNJ " or\n"
144 "VISIR-observation-file.fits " VISIR_IMG_COMBINE_CJ " or\n"
145 "VISIR-observation-file.fits " VISIR_IMG_COMBINE_NJ " or\n"
146 "VISIR-observation-file.fits " VISIR_IMG_COMBINE_DJ " or\n"
147 "VISIR-observation-file.fits BURST\n"
148 "VISIR-Standard-star-catalog " VISIR_CALIB_STDSTAR_IMG " (optional)\n"
149 "VISIR-linearty-table.fits "VISIR_CALIB_LIN" (optional)"
150 MAN_VISIR_CALIB_BPM_IMG,
151 "Julian Taylor",
152 "jtaylor@partner.eso.org",
153 cpl_get_license(PACKAGE_NAME, "2015"),
154 visir_img_reduce_create,
155 visir_img_reduce_exec,
156 visir_img_reduce_destroy)
157 ? ((void)cpl_error_set_where(cpl_func), 1) : 0;
158}
159
160/* FIXME:
161cpl_recipe_define(visir_img_reduce, VISIR_BINARY_VERSION,
162 "Julian Taylor", PACKAGE_BUGREPORT, "2012",
163 "Attempt to remove stripes in spectral data",
164 "The files listed in the Set Of Frames (sof-file) "
165 "must be tagged:\n"
166 "VISIR-chopnod-corrected-file.fits "
167 "\nThe product(s) will have a FITS card\n"
168 "'HIERARCH ESO PRO CATG' with a value of:\n");
169*/
170
171/*----------------------------------------------------------------------------*/
175/*----------------------------------------------------------------------------*/
176
177/*-----------------------------------------------------------------------------
178 Functions code
179 -----------------------------------------------------------------------------*/
180
181/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190static cpl_error_code
191visir_img_reduce_fill_parameterlist(cpl_parameterlist * self)
192{
193 cpl_pluginlist * plugins = cpl_pluginlist_new();
194 const char * context = PACKAGE ".visir_img_reduce";
195
196 cpl_recipe * repack = visir_init_recipe("visir_util_repack",
197 &visir_util_repack_get_info,
198 plugins);
199 cpl_recipe * shift = visir_init_recipe("visir_util_detect_shift",
200 &visir_util_detect_shift_get_info,
201 plugins);
202 cpl_recipe * clip = visir_init_recipe("visir_util_clip",
203 &visir_util_clip_get_info,
204 plugins);
205 cpl_recipe * swarp = visir_init_recipe("visir_util_run_swarp",
206 &visir_util_run_swarp_get_info,
207 plugins);
208 cpl_recipe * phot = visir_init_recipe("visir_old_img_phot",
209 &visir_old_img_phot_get_info,
210 plugins);
211
212 cpl_plugin_get_init(&repack->interface)(&repack->interface);
213 cpl_plugin_get_init(&shift->interface)(&shift->interface);
214 cpl_plugin_get_init(&clip->interface)(&clip->interface);
215 cpl_plugin_get_init(&swarp->interface)(&swarp->interface);
216 cpl_plugin_get_init(&phot->interface)(&phot->interface);
217 cpl_parameterlist * repack_par = repack->parameters;
218 cpl_parameterlist * clip_par = clip->parameters;
219 cpl_parameterlist * shift_par = shift->parameters;
220 cpl_parameterlist * swarp_par = swarp->parameters;
221 cpl_parameterlist * phot_par = phot->parameters;
222 skip_if(0);
223
224 for (cpl_parameter * p = cpl_parameterlist_get_first(repack_par);
225 p != NULL; p = cpl_parameterlist_get_next(repack_par)) {
226 const char * name = cpl_parameter_get_name(p);
227 if (strstr(name, "bkgcorrect"))
228 continue;
229 if (strstr(name, "normalize"))
230 continue;
231 if (strstr(name, "compress"))
232 continue;
233 if (strstr(name, "ncycles"))
234 continue;
235 cpl_parameterlist_append(self, visir_parameter_duplicate(p));
236 }
237
238 skip_if(0);
239
240 for (cpl_parameter * p = cpl_parameterlist_get_first(shift_par);
241 p != NULL; p = cpl_parameterlist_get_next(shift_par)) {
242 cpl_parameterlist_append(self, visir_parameter_duplicate(p));
243 }
244
245 skip_if(0);
246
247 for (cpl_parameter * p = cpl_parameterlist_get_first(clip_par);
248 p != NULL; p = cpl_parameterlist_get_next(clip_par)) {
249 const char * name = cpl_parameter_get_name(p);
250 if (strstr(name, "error-out-type"))
251 continue;
252 cpl_parameterlist_append(self, visir_parameter_duplicate(p));
253 }
254
255 skip_if(0);
256
257 for (cpl_parameter * p = cpl_parameterlist_get_first(swarp_par);
258 p != NULL; p = cpl_parameterlist_get_next(swarp_par)) {
259 cpl_parameterlist_append(self, visir_parameter_duplicate(p));
260 }
261
262 skip_if(0);
263
264 for (cpl_parameter * p = cpl_parameterlist_get_first(phot_par);
265 p != NULL; p = cpl_parameterlist_get_next(phot_par)) {
266 const char * name = cpl_parameter_get_name(p);
267 if (strstr(name, "jy_val") || strstr(name, "radii"))
268 cpl_parameterlist_append(self, visir_parameter_duplicate(p));
269 }
270
271 skip_if(irplib_parameterlist_set_bool(self, PACKAGE, RECIPE_STRING,
272 "delete-temp", CPL_TRUE, NULL,
273 context, "Delete temporary files "
274 "created during processing"));
275 end_skip;
276
277 cpl_parameterlist_delete(repack->parameters);
278 cpl_parameterlist_delete(shift->parameters);
279 cpl_parameterlist_delete(clip->parameters);
280 cpl_parameterlist_delete(swarp->parameters);
281 cpl_parameterlist_delete(phot->parameters);
282 cpl_plugin_delete(&repack->interface);
283 cpl_plugin_delete(&shift->interface);
284 cpl_plugin_delete(&clip->interface);
285 cpl_plugin_delete(&swarp->interface);
286 cpl_plugin_delete(&phot->interface);
287 cpl_pluginlist_delete(plugins);
288
289 return cpl_error_get_code();
290}
291
292static cpl_error_code
293util_repack_set_parameters(cpl_parameterlist * rec_pars,
294 const cpl_parameterlist * chain_pars)
295{
296 cpl_parameter * par;
297
298 skip_if(visir_copy_parameters(rec_pars, chain_pars));
299
300 par = cpl_parameterlist_find(rec_pars, PACKAGE".visir_util_repack.bkgcorrect");
301
302 if (par)
303 cpl_parameter_set_string(par, "chopnod");
304
305 par = cpl_parameterlist_find(rec_pars, PACKAGE".visir_util_repack.normalize");
306
307 if (par)
308 cpl_parameter_set_bool(par, CPL_TRUE);
309
310 par = cpl_parameterlist_find(rec_pars, PACKAGE".visir_util_repack.compress");
311
312 if (par)
313 cpl_parameter_set_bool(par, CPL_TRUE);
314
315 end_skip;
316
317 return cpl_error_get_code();
318}
319
320
321static cpl_error_code
322check_swarp(void)
323{
324 int ret = system(VISIR_SWARP_BIN " -v > /dev/null 2>/dev/null");
325 if (ret != 0) {
326 const char * path = getenv("PATH");
327 return cpl_error_set_message(cpl_func, CPL_ERROR_UNSUPPORTED_MODE,
328 VISIR_SWARP_BIN " not found in PATH: %s",
329 path ? path : "<NULL>");
330 }
331 return CPL_ERROR_NONE;
332}
333
334
335static cpl_frame *
336run_phot(cpl_recipe * phot, cpl_frameset *photset,
337 const cpl_parameterlist * parlist,
338 cpl_frame * imgf_, cpl_frame * wgtf_,
339 cpl_frame * qcf_,
340 const int idx)
341{
342 cpl_frame * imgf = cpl_frame_duplicate(imgf_);
343 cpl_frame * wgtf = cpl_frame_duplicate(wgtf_);
344 cpl_frame * qcf = cpl_frame_duplicate(qcf_);
345 cpl_frame * res = NULL;
346 char buffer[128];
347
348 skip_if(0);
349
350 cpl_frame_set_tag(imgf, VISIR_IMG_CAL_PHOT_PP);
351 cpl_frameset_insert(photset, imgf);
352 cpl_frame_set_tag(wgtf, VISIR_UTIL_WEIGHT_MAP_PROCATG);
353 cpl_frameset_insert(photset, wgtf);
354 cpl_frame_set_group(qcf, CPL_FRAME_GROUP_RAW);
355 cpl_frame_set_tag(qcf, VISIR_UTIL_QC_PROCATG);
356 cpl_frameset_insert(photset, qcf);
357
358 skip_if(visir_run_recipe(phot, photset, parlist, &visir_copy_parameters));
359 res = cpl_frameset_find(photset, VISIR_IMG_PHOT_COMBINED_PROCATG);
360 if (res == NULL)
361 res = cpl_frameset_find(photset, VISIR_IMG_PHOT_ONEBEAM_PROCATG);
362
363 sprintf(buffer, "visir_img_phot_%03d.fits", idx);
364 skip_if(rename(cpl_frame_get_filename(res), buffer) == -1);
365 cpl_frame_set_filename(res, buffer);
366
367 end_skip;
368
369 return res;
370}
371
372/*----------------------------------------------------------------------------*/
379/*----------------------------------------------------------------------------*/
380static int visir_img_reduce(cpl_frameset * framelist,
381 const cpl_parameterlist * parlist)
382{
383 cpl_errorstate cleanstate = cpl_errorstate_get();
384 cpl_frameset * repackset = cpl_frameset_new();
385 cpl_frameset * photset = cpl_frameset_new();
386 cpl_recipe * repack = NULL;
387 cpl_recipe * shift = NULL;
388 cpl_recipe * clip = NULL;
389 cpl_recipe * qc = NULL;
390 cpl_recipe * swarp = NULL;
391 cpl_recipe * join = NULL;
392 cpl_recipe * phot = NULL;
393 cpl_pluginlist * plugins = cpl_pluginlist_new();
394 cpl_frameset * usedframes = cpl_frameset_new();
395 cpl_frame * meanfrm = NULL;
396
397 skip_if(check_swarp());
398
399
400 repack = visir_init_recipe("visir_util_repack",
401 &visir_util_repack_get_info, plugins);
402 shift = visir_init_recipe("visir_util_detect_shift",
403 &visir_util_detect_shift_get_info, plugins);
404 clip = visir_init_recipe("visir_util_clip",
405 &visir_util_clip_get_info, plugins);
406 qc = visir_init_recipe("visir_util_qc",
407 &visir_util_qc_get_info, plugins);
408 swarp = visir_init_recipe("visir_util_run_swarp",
409 &visir_util_run_swarp_get_info, plugins);
410 join = visir_init_recipe("visir_util_join",
411 &visir_util_join_get_info, plugins);
412
413 visir_dfs_set_groups(framelist);
414
415 FOR_EACH_FRAMESET(frame_, framelist) {
416 cpl_frame * frame = cpl_frame_duplicate(frame_);
417 cpl_frameset_insert(usedframes, cpl_frame_duplicate(frame));
418 if (strcmp(cpl_frame_get_tag(frame), VISIR_IMA_STD_CAT_PROCATG) == 0)
419 cpl_frameset_insert(photset, frame);
420 else
421 cpl_frameset_insert(repackset, frame);
422 }
423 skip_if(visir_run_recipe(repack, repackset, parlist,
424 &util_repack_set_parameters));
425 meanfrm = cpl_frame_duplicate(cpl_frameset_find(repackset,
426 VISIR_UTIL_REPACK_MEAN_PROCATG));
427
428
429 cpl_frameset * shiftset = visir_prepare_frameset(repackset, NULL, 0,
430 CPL_TRUE);
431 /* jitter correction modifies input calib file and adds a new one
432 * to the recipe output, so drop the original one from the frameset */
433 shiftset = visir_remove_modified_calib(shiftset);
434 cpl_frameset_delete(repackset);
435 repackset = NULL;
436 skip_if(visir_run_recipe(shift, shiftset, parlist, &visir_copy_parameters));
437 shiftset = visir_remove_modified_calib(shiftset);
438
439
440 const char * tagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_INPUTS_RAW};
441 cpl_frameset * clipset =
442 visir_prepare_frameset(shiftset, tagmap, ARRAY_LEN(tagmap), CPL_FALSE);
443 skip_if(visir_run_recipe(clip, clipset, parlist, &visir_copy_parameters));
444
445
446 const char * qctagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_CORRECTED};
447 cpl_frameset * qcset = visir_prepare_frameset(shiftset, qctagmap,
448 ARRAY_LEN(qctagmap),
449 CPL_FALSE);
450 skip_if(visir_run_recipe(qc, qcset, parlist, &visir_copy_parameters));
451
452
453 const char * swarptagmap[] = {VISIR_UTIL_DETECT_SHIFT_PROCATG, VISIR_UTIL_CORRECTED};
454 cpl_frameset * swarpset = visir_prepare_frameset(shiftset, swarptagmap,
455 ARRAY_LEN(swarptagmap),
456 CPL_FALSE);
457 cpl_frameset_delete(shiftset);
458 shiftset = NULL;
459 FOR_EACH_FRAMESET(frm, clipset) {
460 if (strcmp(cpl_frame_get_tag(frm), VISIR_UTIL_ERROR_MAP) != 0)
461 continue;
462 cpl_frame * frame = cpl_frame_duplicate(frm);
463 cpl_frame_set_group(frame, CPL_FRAME_GROUP_RAW);
464 cpl_frameset_insert(swarpset, frame);
465 }
466 cpl_frameset_delete(clipset);
467 clipset = NULL;
468 skip_if(visir_run_recipe(swarp, swarpset, parlist, &visir_copy_parameters));
469 irplib_framelist * swarpfl = irplib_framelist_cast(swarpset);
470 irplib_framelist * qcfl = irplib_framelist_cast(qcset);
471
472 irplib_framelist * imgs = irplib_framelist_extract(swarpfl, "COADDED_IMAGE");
473 irplib_framelist * wgts = irplib_framelist_extract(swarpfl, "COADDED_WEIGHT");
474 irplib_framelist * qcs = irplib_framelist_extract(qcfl, VISIR_UTIL_QC_PROCATG);
475 if (cpl_error_get_code() == CPL_ERROR_DATA_NOT_FOUND) {
476 imgs = irplib_framelist_new();
477 wgts = irplib_framelist_new();
478 qcs = irplib_framelist_new();
479 cpl_errorstate_set(cleanstate);
480 }
481 cpl_frame * coadd_imgf = cpl_frameset_find(swarpset, VISIR_IMG_COADDED_IMG);
482 cpl_frame * coadd_wgtf = cpl_frameset_find(swarpset, VISIR_IMG_COADDED_WGT);
483 skip_if(coadd_imgf == NULL || coadd_wgtf == NULL);
484
485
486 if (cpl_frameset_get_size(photset) != 0) {
487 phot = visir_init_recipe("visir_old_img_phot",
488 &visir_old_img_phot_get_info, plugins);
489 cpl_frameset *orig_phot = cpl_frameset_duplicate(photset);
490 run_phot(phot, photset, parlist, coadd_imgf, coadd_wgtf,
491 cpl_frameset_find(qcset, VISIR_UTIL_QC_PROCATG"_COMBINED"), 0);
492 skip_if(0);
493
494 for (int i = 0; i < irplib_framelist_get_size(imgs); i++) {
495 cpl_frame * imgf = irplib_framelist_get(imgs, i);
496 cpl_frame * wgtf = irplib_framelist_get(wgts, i);
497 cpl_frame * qcf = irplib_framelist_get(qcs, i);
498 cpl_frameset *copy = cpl_frameset_duplicate(orig_phot);
499 cpl_frame * res = run_phot(phot, copy, parlist, imgf, wgtf, qcf, i + 1);
500 cpl_frameset_insert(photset, res);
501 skip_if(0);
502 }
503 }
504
505 {
506 cpl_frame * wgtf = cpl_frame_duplicate(coadd_wgtf);
507 cpl_frameset * joinset = cpl_frameset_new();
508 if (cpl_frameset_get_size(photset) != 0) {
509 FOR_EACH_FRAMESET(frm, photset) {
510 if (strcmp(cpl_frame_get_tag(frm),
511 VISIR_IMG_PHOT_COMBINED_PROCATG) == 0 ||
512 strcmp(cpl_frame_get_tag(frm),
513 VISIR_IMG_PHOT_ONEBEAM_PROCATG) == 0) {
514 cpl_frame * dfrm = cpl_frame_duplicate(frm);
515 cpl_frameset_insert(joinset, dfrm);
516 }
517 }
518
519 }
520 else {
521 cpl_frame * imgf = cpl_frame_duplicate(coadd_imgf);
522 cpl_frame * qcf =
523 cpl_frameset_find(qcset, VISIR_UTIL_QC_PROCATG"_COMBINED");
524 qcf = cpl_frame_duplicate(qcf);
525 cpl_frameset_insert(joinset, imgf);
526 for (int i = 0; i < irplib_framelist_get_size(imgs); i++) {
527 imgf = cpl_frame_duplicate(irplib_framelist_get(imgs, i));
528 cpl_frameset_insert(joinset, imgf);
529 }
530 cpl_frame_set_tag(qcf, VISIR_UTIL_QC_PROCATG);
531 cpl_frame_set_group(qcf, CPL_FRAME_GROUP_RAW);
532 cpl_frameset_insert(joinset, qcf);
533 for (int i = 0; i < irplib_framelist_get_size(qcs); i++) {
534 qcf = cpl_frame_duplicate(irplib_framelist_get(qcs, i));
535 cpl_frame_set_group(qcf, CPL_FRAME_GROUP_RAW);
536 cpl_frameset_insert(joinset, qcf);
537 }
538 }
539
540 cpl_frame_set_tag(wgtf, VISIR_UTIL_WEIGHT_MAP_PROCATG);
541 cpl_frameset_insert(joinset, wgtf);
542 for (int i = 0; i < irplib_framelist_get_size(wgts); i++) {
543 wgtf = cpl_frame_duplicate(irplib_framelist_get(wgts, i));
544 cpl_frame_set_tag(wgtf, VISIR_UTIL_WEIGHT_MAP_PROCATG);
545 cpl_frameset_insert(joinset, wgtf);
546 }
547
548 skip_if(visir_run_recipe(join, joinset, parlist,
549 &visir_copy_parameters));
550
551 FOR_EACH_FRAMESET(frm, joinset)
552 if (cpl_frame_get_group(frm) == CPL_FRAME_GROUP_PRODUCT)
553 cpl_frameset_insert(framelist, cpl_frame_duplicate(frm));
554 cpl_frameset_delete(joinset);
555 cpl_frameset_insert(framelist, meanfrm);
556 meanfrm = NULL;
557 skip_if(0);
558 }
559
560 end_skip;
561
562 {
563 cpl_recipe * recipes[] = {repack, shift, clip, qc, swarp, phot, join};
564 for (size_t i = 0; i < ARRAY_LEN(recipes); i++)
565 if (recipes[i])
566 cpl_plugin_delete(&(recipes[i]->interface));
567 }
568 cpl_pluginlist_delete(plugins);
569
570 irplib_framelist_delete(imgs);
571 irplib_framelist_delete(wgts);
572 irplib_framelist_delete(qcs);
573 cpl_frame_delete(meanfrm);
574 cpl_frameset_delete(photset);
575 cpl_frameset_delete(usedframes);
576
577 return cpl_error_get_code();
578}
int visir_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
Definition: visir_dfs.c:72