ERIS Pipeline Reference Manual 1.9.2
eris_nix_flat_twilight.c
1/* $Id$
2 *
3 * This file is part of the ERIS Pipeline
4 * Copyright (C) 2017 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 02110-1301 USA
19 */
20
21/*
22 * $Author$
23 * $Date$
24 * $Revision$
25 */
26
27#ifdef HAVE_CONFIG_H
28#include <config.h>
29#endif
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include <string.h>
36
37#include "eris_utils.h"
38#include "eris_nix_utils.h"
39#include "eris_pfits.h"
40#include "eris_dfs.h"
41#include "eris_nix_dfs.h"
42#include "eris_nix_master_bpm.h"
43#include "eris_nix_master_dark.h"
44#include "eris_nix_gain_linearity.h"
45#include <hdrl.h>
46
47#include <cpl.h>
48
49/*-----------------------------------------------------------------------------
50 Static variables
51 -----------------------------------------------------------------------------*/
52
53static const char eris_nix_flat_twilight_description[] =
54"This recipe reduces a set of twilight frames to produce a \n"
55ERIS_NIX_MASTER_FLAT_TWILIGHT_LOFREQ_PRO_CATG" result.\n"
56"\n"
57"Input files:\n"
58"\n"
59" DO CATG Explanation Req. #Frames\n"
60" ------- ----------- --- -------\n"
61" "ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG
62 " frames with a Y >min-frames\n"
63" range of twilight \n"
64" images\n"
65" "ERIS_NIX_MASTER_DARK_IMG_PRO_CATG
66 " a MASTER_DARK with Y 1\n"
67" matching detector \n"
68" configuration\n"
69" "ERIS_NIX_MASTER_BPM_LAMP_PRO_CATG
70 " a lamp MASTER_BPM Y 1\n"
71" "ERIS_NIX_GAIN_PRO_CATG
72 " DETMON gain information N 0 or 1\n"
73" e.g. in file \n"
74" detmon_ir_lg_gain_table.fits\n"
75" "ERIS_NIX_COEFFS_CUBE_PRO_CATG
76 " DETMON linearity curves N 0 or 1\n"
77" e.g. in file \n"
78" detmon_ir_coeffs_cube.fits\n"
79" "ERIS_NIX_NL_BPM_PRO_CATG
80 " DETMON non-linear bpm N 0 or 1\n"
81" e.g. in file \n"
82" detmon_ir_lg_bpm.fits\n"
83"\n"
84"Output files:\n"
85"\n"
86" DO CATG Explanation \n"
87" ------- ----------- \n"
88" "ERIS_NIX_MASTER_FLAT_TWILIGHT_LOFREQ_PRO_CATG
89 " The required LOFREQ twilight flatfield.\n"
90"\n"
91" The output will be a FITS file named 'master_flat_twilight_lofreq.fits',\n"
92" with extensions:\n"
93" - DATA, with the flatfield data.\n"
94" - ERR, with the flatfield error plane.\n"
95" - DQ, with the flatfield data quality plane.\n"
96" - CONFIDENCE, with the flatfield confidence plane.\n"
97"\n";
98#define RECIPE_NAME "eris_nix_flat_twilight"
99#define CONTEXT "eris."RECIPE_NAME
100/*-----------------------------------------------------------------------------
101 Private function prototypes
102 -----------------------------------------------------------------------------*/
103
104cpl_recipe_define(eris_nix_flat_twilight, ERIS_BINARY_VERSION,
105 "John Lightfoot",
106 PACKAGE_BUGREPORT, "2017",
107 "Calculate a MASTER_FLAT_TWILIGHT_LOFREQ",
108 eris_nix_flat_twilight_description);
109
110/*-----------------------------------------------------------------------------
111 Function code
112 -----------------------------------------------------------------------------*/
113
114/*----------------------------------------------------------------------------*/
122/*----------------------------------------------------------------------------*/
123
124static cpl_error_code eris_nix_flat_twilight_fill_parameterlist(
125 cpl_parameterlist *self) {
126
127 if (cpl_error_get_code() != CPL_ERROR_NONE) return cpl_error_get_code();
128
129 cpl_parameterlist * bpm_parlist = NULL;
130 cpl_parameterlist * collapse_parlist = NULL;
131 hdrl_parameter * filter_defaults = NULL;
132 hdrl_parameter * flat_defaults = NULL;
133 cpl_parameterlist * flat_parlist = NULL;
134 hdrl_parameter * legendre_defaults = NULL;
135 hdrl_parameter * minmax_defaults = NULL;
136 hdrl_parameter * sigclip_defaults = NULL;
137
138 /* generate the general parameter list for the flat-field calculation */
139
140 flat_defaults = hdrl_flat_parameter_create(21, 21, HDRL_FLAT_FREQ_LOW);
141 flat_parlist = hdrl_flat_parameter_create_parlist(CONTEXT, "flat",
142 flat_defaults);
143
144 for (cpl_parameter * p = cpl_parameterlist_get_first(flat_parlist);
145 p != NULL; p = cpl_parameterlist_get_next(flat_parlist)) {
146
147 const char * pname = cpl_parameter_get_name(p);
148 if (strstr(pname, "method")) {
149 cpl_parameter_disable(p, CPL_PARAMETER_MODE_CLI);
150 }
151 cpl_parameter * duplicate = cpl_parameter_duplicate(p);
152 cpl_parameterlist_append(self, duplicate);
153 }
154
155 cpl_parameter * cp = NULL;
156 cp = cpl_parameter_new_value(CONTEXT".min_frames", CPL_TYPE_INT,
157 "minimum acceptable number of twilight "
158 "images", CONTEXT, 2);
159 cpl_parameter_set_alias(cp, CPL_PARAMETER_MODE_CLI, "min-frames");
160 cpl_parameter_disable(cp, CPL_PARAMETER_MODE_ENV);
161 cpl_parameterlist_append(self, cp);
162
163 /* coords of pixel whose value to be used for diagnostics during
164 reduction */
165
166 cp = cpl_parameter_new_value(CONTEXT".x_probe", CPL_TYPE_INT,
167 "x coord of diagnostic pixel",
168 CONTEXT, -1);
169 cpl_parameter_set_alias(cp, CPL_PARAMETER_MODE_CLI, "x-probe");
170 cpl_parameter_disable(cp, CPL_PARAMETER_MODE_ENV);
171 cpl_parameterlist_append(self, cp);
172
173 cp = cpl_parameter_new_value(CONTEXT".y_probe", CPL_TYPE_INT,
174 "y coord of diagnostic pixel",
175 CONTEXT, -1);
176 cpl_parameter_set_alias(cp, CPL_PARAMETER_MODE_CLI, "y-probe");
177 cpl_parameter_disable(cp, CPL_PARAMETER_MODE_ENV);
178 cpl_parameterlist_append(self, cp);
179
180 cp = cpl_parameter_new_value(CONTEXT".threshold", CPL_TYPE_DOUBLE,
181 "positive saturation level (for QC)",
182 CONTEXT, 60000.);
183 cpl_parameter_set_alias(cp, CPL_PARAMETER_MODE_CLI, "threshold");
184 cpl_parameter_disable(cp, CPL_PARAMETER_MODE_ENV);
185 cpl_parameterlist_append(self, cp);
186
187 cp = cpl_parameter_new_value(CONTEXT".saturation_neg", CPL_TYPE_DOUBLE,
188 "negative saturation level (for QC)", CONTEXT, -4.5e7);
189 cpl_parameter_set_alias(cp, CPL_PARAMETER_MODE_CLI, "saturation_neg");
190 cpl_parameter_disable(cp, CPL_PARAMETER_MODE_ENV);
191 cpl_parameterlist_append(self, cp);
192
193 /* cleanup */
194
195 cpl_parameterlist_delete(bpm_parlist);
196 cpl_parameterlist_delete(collapse_parlist);
197 hdrl_parameter_delete(filter_defaults);
198 hdrl_parameter_delete(flat_defaults);
199 cpl_parameterlist_delete(flat_parlist);
200 hdrl_parameter_delete(legendre_defaults);
201 hdrl_parameter_delete(minmax_defaults);
202 hdrl_parameter_delete(sigclip_defaults);
203
204 return 0;
205}
206
207
208/*----------------------------------------------------------------------------*/
218/*----------------------------------------------------------------------------*/
219
220static hdrl_imagelist * eris_nix_reduce_twilight(
221 located_imagelist * twilight_limlist,
222 const master_dark * mdark,
223 const gain_linearity * gain_lin,
224 const master_bpm * master_bpm_lamp,
225 const cpl_size x_probe,
226 const cpl_size y_probe) {
227
228 cpl_ensure(twilight_limlist, CPL_ERROR_NULL_INPUT, NULL);
229 cpl_ensure(mdark, CPL_ERROR_NULL_INPUT, NULL);
230
231 cpl_imagelist * flat_fit = NULL;
232 cpl_image * flat_fit_error = NULL;
233 cpl_imagelist * twilight_imagelist = NULL;
234 cpl_vector * twilight_medians = NULL;
235
236 hdrl_imagelist * result = hdrl_imagelist_new();
237
238/*
239 const int debug = x_probe > 0 &&
240 x_probe <= hdrl_image_get_size_x(
241 twilight_limlist->limages[0]->himage) &&
242 y_probe > 0 &&
243 y_probe <= hdrl_image_get_size_y(
244 twilight_limlist->limages[0]->himage);
245*/
246
247 twilight_imagelist = cpl_imagelist_new();
248 twilight_medians = cpl_vector_new(twilight_limlist->size);
249
250 for (cpl_size i = 0; i < twilight_limlist->size; i++) {
251
252 /* do basic calibration: linearize, calculate error plane */
253
254 int flag_mask = 0;
255 flag_mask = ~flag_mask;
256 enu_basic_calibrate(twilight_limlist->limages[i],
257 CPL_TRUE,
258 NULL,
259 mdark,
260 gain_lin,
261 NULL,
262 NULL,
263 master_bpm_lamp,
264 flag_mask,
265 "noop",
266 0.0,
267 x_probe,
268 y_probe);
269 enu_check_error_code("error performing basic calibration of twilight "
270 "frames");
271
272 /* build the cpl_imagelist that will be use for fitting pixel response */
273
274 cpl_imagelist_set(twilight_imagelist, hdrl_image_get_image(
275 twilight_limlist->limages[i]->himage), i);
276 cpl_vector_set(twilight_medians, i,
277 cpl_image_get_median(hdrl_image_get_image(
278 twilight_limlist->limages[i]->himage)));
279 }
280 flat_fit = cpl_fit_imagelist_polynomial(twilight_medians,
281 twilight_imagelist,
282 0, 1, CPL_FALSE,
283 CPL_TYPE_DOUBLE,
284 flat_fit_error);
285 enu_check_error_code("error fitting twilight frames");
287 cpl_imagelist_get(flat_fit, 1), NULL), 0);
288
289 /* release image from the cpl_imagelist so that they don't get
290 deleted twice later */
291
292 while (cpl_imagelist_get_size(twilight_imagelist) > 0) {
293 cpl_imagelist_unset(twilight_imagelist, 0);
294 }
295
296 cleanup:
297 if (cpl_error_get_code() != CPL_ERROR_NONE) {
298 hdrl_imagelist_delete(result);
299 result = NULL;
300 }
301 cpl_imagelist_delete(flat_fit);
302 cpl_image_delete(flat_fit_error);
303 cpl_imagelist_delete(twilight_imagelist);
304 cpl_vector_delete(twilight_medians);
305
306 return result;
307}
308
309
310/*----------------------------------------------------------------------------*/
317/*----------------------------------------------------------------------------*/
318
319static int eris_nix_flat_twilight(cpl_frameset * frameset,
320 const cpl_parameterlist * parlist) {
321 cpl_mask * bpm_mask = NULL;
322 hdrl_parameter * collapse_params = NULL;
323 cpl_image * confidence_lo = NULL;
324 hdrl_parameter * flat_params = NULL;
325 cpl_propertylist * flat_plist = NULL;
326 const gain_linearity * gain_lin = NULL;
327 master_bpm * master_bpm_lamp = NULL;
328 master_dark * mdark = NULL;
329 hdrl_image * master_flat_lofreq = NULL;
330 cpl_mask * old_mask = NULL;
331 const cpl_parameter * param = NULL;
332 located_imagelist * twilight_limlist = NULL;
333 hdrl_imagelist * twilight_reduced = NULL;
334 cpl_frameset * used_frameset = NULL;
335
336 enu_check_error_code("%s():%d: An error is already set: %s",
337 cpl_func, __LINE__, cpl_error_get_where());
338
339 /* check input parameters */
340
341 cpl_ensure_code(frameset, CPL_ERROR_NULL_INPUT);
342 cpl_ensure_code(parlist, CPL_ERROR_NULL_INPUT);
343
344 /* set the msg verbosity level from environment variable CPL_MSG_LEVEL */
345
346 cpl_msg_set_level_from_env();
347 cpl_msg_severity severity = cpl_msg_get_level();
348 cpl_msg_info(cpl_func, "level %d", (int) severity);
349
350 /* check required input tags are present */
351 const int ntags = 6;
352 const char* required_tags[6] = {
353 ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG,
354 ERIS_NIX_NL_BPM_PRO_CATG,
355 ERIS_NIX_COEFFS_CUBE_PRO_CATG,
356 ERIS_NIX_GAIN_PRO_CATG,
357 ERIS_NIX_MASTER_BPM_LAMP_PRO_CATG,
358 ERIS_NIX_MASTER_DARK_IMG_PRO_CATG
359 };
360
361 const int nopt_tags = 2;
362 const char* optional_tags[2] = {
363 ERIS_NIX_MASTER_FLAT_LAMP_HIFREQ_PRO_CATG,
364 ERIS_NIX_MASTER_FLAT_LAMP_LOFREQ_PRO_CATG
365 };
366
367
368 cpl_ensure_code(CPL_ERROR_NONE ==
369 eris_dfs_check_input_tags(frameset, required_tags, ntags, 1),
370 CPL_ERROR_ILLEGAL_INPUT);
371 eris_dfs_check_input_tags(frameset, optional_tags, nopt_tags, 0);
372
373
374 /* retrieve input parameters for collapse, there is only one
375 flat to collapse so this should not matter */
376
377 collapse_params = hdrl_collapse_sigclip_parameter_create(3., 3., 5);
378
379 /* retrieve input filter parameters for HI and LO flat-field */
380
381 flat_params = hdrl_flat_parameter_parse_parlist(parlist,
382 CONTEXT".flat");
383 cpl_size filter_size_x = hdrl_flat_parameter_get_filter_size_x(
384 flat_params);
385 cpl_size filter_size_y = hdrl_flat_parameter_get_filter_size_y(
386 flat_params);
387
388 /* retrieve minimum acceptable number of coadds */
389
390 param = cpl_parameterlist_find_const(parlist, CONTEXT".min_frames");
391 int min_frames = cpl_parameter_get_int(param);
392
393 /* retrieve probe pixel coords */
394
395 param = cpl_parameterlist_find_const(parlist, CONTEXT".x_probe");
396 cpl_size x_probe = (cpl_size) cpl_parameter_get_int(param);
397 param = cpl_parameterlist_find_const(parlist, CONTEXT".y_probe");
398 cpl_size y_probe = (cpl_size) cpl_parameter_get_int(param);
399 enu_check_error_code("Could not retrieve input parameters");
400
401 /* identify the RAW and CALIB frames in the input frameset */
402
403 eris_nix_dfs_set_groups(frameset);
404 enu_check_error_code("Could not identify RAW and CALIB frames");
405
406 used_frameset = cpl_frameset_new();
407
408 /* read the gain and linearity information, if available */
409
410 int required = CPL_FALSE;
411 gain_lin = engl_gain_linearity_load_from_frameset(frameset,
412 ERIS_NIX_GAIN_PRO_CATG, ERIS_NIX_COEFFS_CUBE_PRO_CATG,
413 ERIS_NIX_NL_BPM_PRO_CATG, required, used_frameset);
414 enu_check_error_code("failed to read gain/linearity information from SoF");
415
416 /* read the mdark */
417
418 mdark = en_master_dark_load_from_frameset(frameset,
419 ERIS_NIX_MASTER_DARK_IMG_PRO_CATG, used_frameset);
420 enu_check_error_code("failed to read master dark from SoF");
421
422 /* read the master_bpm */
423
424 master_bpm_lamp = en_master_bpm_load_from_frameset(frameset,
425 ERIS_NIX_MASTER_BPM_LAMP_PRO_CATG, used_frameset,
426 CPL_TRUE);
427 enu_check_error_code("failed to read master BPM from SoF");
428
429 /* see what data the sof contains */
430
431 twilight_limlist = enu_limlist_load_from_frameset(frameset,
432 ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG, used_frameset);
433 cpl_msg_info(cpl_func, "read %d "ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG
434 " frames", (int) twilight_limlist->size);
435 enu_check(twilight_limlist->size >= min_frames, CPL_ERROR_ILLEGAL_INPUT,
436 "%d or more "ERIS_NIX_RAW_FLAT_TWILIGHT_DO_CATG
437 " frames required", min_frames);
438
439 /* reduce raw data to get input to flatfield calculation */
440
441 twilight_reduced = eris_nix_reduce_twilight(twilight_limlist,
442 mdark,
443 gain_lin,
444 master_bpm_lamp,
445 x_probe,
446 y_probe);
447 enu_check_error_code("failed basic reduction of twilight data");
448
449 /* get the LO freq flatfield */
450
451 master_flat_lofreq = enu_calc_flat(twilight_reduced,
452 1,
453 collapse_params,
454 filter_size_x,
455 filter_size_y,
456 HDRL_FLAT_FREQ_LOW);
457 enu_check_error_code("failed to calculate LOFREQ flat");
458
459 /* create a LOFREQ confidence array, essentially the flat field with
460 bad pixels set to 0 and median pixel value normalised to 100 */
461
462 confidence_lo = cpl_image_duplicate(hdrl_image_get_image_const(
463 master_flat_lofreq));
464 cpl_image_fill_rejected(confidence_lo, 0.0);
465 cpl_image_accept_all(confidence_lo);
466 enu_normalise_confidence(confidence_lo);
467 enu_check_error_code("error computing LOFREQ confidence map");
468 /* QC on FLAT_ON frames not using information from pixels of master_bpm */
469
470 const char* saturation_limit = cpl_propertylist_get_string(gain_lin->plist,
471 "ESO PRO REC1 PARAM25 VALUE");
472 double saturation = atof(saturation_limit);
473
474 cpl_propertylist* qclog = enu_raw_flats_qc(twilight_limlist,
475 gain_lin->bpm, parlist, CONTEXT, saturation, CPL_FALSE, CPL_TRUE);
476
477 /* now save the LOFREQ twilight flat */
478
479 enu_flat_save(ERIS_NIX_MASTER_FLAT_TWILIGHT_LOFREQ_PRO_CATG,
480 master_flat_lofreq,
481 confidence_lo,
482 NULL,
483 frameset,
484 parlist,
485 "master_flat_twilight_lofreq.fits",
486 RECIPE_NAME, qclog);
487 cpl_propertylist_delete(qclog);
488 enu_check_error_code("Failed to save LOFREQ flat");
489
490cleanup:
491 cpl_mask_delete(bpm_mask);
492 hdrl_parameter_delete(collapse_params);
493 cpl_image_delete(confidence_lo);
494 hdrl_parameter_delete(flat_params);
495 cpl_propertylist_delete(flat_plist);
496 engl_gain_linearity_delete((gain_linearity *) gain_lin);
497 en_master_bpm_delete(master_bpm_lamp);
499 hdrl_image_delete(master_flat_lofreq);
500 cpl_mask_delete(old_mask);
501 enu_located_imagelist_delete(twilight_limlist);
502 hdrl_imagelist_delete(twilight_reduced);
503 cpl_frameset_delete(used_frameset);
504
505 return (int)cpl_error_get_code();
506}
cpl_error_code eris_nix_dfs_set_groups(cpl_frameset *set)
Set the group as RAW or CALIB in a frameset.
Definition: eris_nix_dfs.c:58
void en_master_bpm_delete(master_bpm *target)
Delete a 'master_bpm' struct.
master_dark * en_master_dark_load_from_frameset(const cpl_frameset *frameset, const char *tag, cpl_frameset *used)
Load a 'master_dark' struct from a frameset.
void en_master_dark_delete(master_dark *target)
Delete a 'master_dark' struct.
void enu_located_imagelist_delete(located_imagelist *limlist)
Delete a located_imagelist and its contents.
cpl_propertylist * enu_raw_flats_qc(located_imagelist *lamp_on_limlist, cpl_mask *bp_map_nl_mask, const cpl_parameterlist *parlist, const char *context, const double threshold_pos, const cpl_boolean verbose, const cpl_boolean rescale_by_dit)
Compute QC on input raw flats.
cpl_error_code enu_flat_save(const char *pro_catg, const hdrl_image *flat, const cpl_image *confidence, const cpl_mask *cold_bpm, cpl_frameset *frameset, const cpl_parameterlist *parlist, const char *filename, const char *recipe_name, const cpl_propertylist *qclog)
Save a flatfield result.
hdrl_image * enu_calc_flat(hdrl_imagelist *himlist, const int min_coadds, const hdrl_parameter *collapse_params, const cpl_size filter_size_x, const cpl_size filter_size_y, const hdrl_flat_method method)
Calculate a flatfield result.
cpl_error_code enu_basic_calibrate(located_image *limage, const int read_offsets, const cpl_table *refine_wcs, const master_dark *mdark, const gain_linearity *gain_lin, const master_flat *flatfield_1, const master_flat *flatfield_2, const master_bpm *mbad_pix_map, const int flag_mask, const char *fill_rejected, const double fill_value, const cpl_size x_probe, const cpl_size y_probe)
Do basic calibration of located_image (single or cube)
located_imagelist * enu_limlist_load_from_frameset(cpl_frameset *frameset, const char *tag, cpl_frameset *used)
Load tagged data from a frameset into a located_imagelist.
cpl_error_code enu_normalise_confidence(cpl_image *confidence)
Normalise confidence array so that mean of good pixels is 100.
hdrl_parameter * hdrl_collapse_sigclip_parameter_create(double kappa_low, double kappa_high, int niter)
create a parameter object for sigclipped mean
cpl_size hdrl_flat_parameter_get_filter_size_x(const hdrl_parameter *p)
Access the filter_size_x in the FLAT parameter.
Definition: hdrl_flat.c:209
hdrl_parameter * hdrl_flat_parameter_create(cpl_size filter_size_x, cpl_size filter_size_y, hdrl_flat_method method)
Creates FLAT Parameters object.
Definition: hdrl_flat.c:173
cpl_size hdrl_flat_parameter_get_filter_size_y(const hdrl_parameter *p)
Access the filter_size_y in the FLAT parameter.
Definition: hdrl_flat.c:223
hdrl_parameter * hdrl_flat_parameter_parse_parlist(const cpl_parameterlist *parlist, const char *prefix)
Parse a parameterlist to create input parameters for the FLAT.
Definition: hdrl_flat.c:331
cpl_parameterlist * hdrl_flat_parameter_create_parlist(const char *base_context, const char *prefix, const hdrl_parameter *defaults)
Create a parameter list for the FLAT computation.
Definition: hdrl_flat.c:258
hdrl_image * hdrl_image_create(const cpl_image *image, const cpl_image *error)
create a new hdrl_image from to existing images by copying them
Definition: hdrl_image.c:295
cpl_image * hdrl_image_get_image(hdrl_image *himg)
get data as cpl image
Definition: hdrl_image.c:105
const cpl_image * hdrl_image_get_image_const(const hdrl_image *himg)
get data as cpl image
Definition: hdrl_image.c:118
void hdrl_image_delete(hdrl_image *himg)
delete hdrl_image
Definition: hdrl_image.c:379
cpl_error_code hdrl_imagelist_set(hdrl_imagelist *himlist, hdrl_image *himg, cpl_size pos)
Insert an image into an imagelist.
void hdrl_imagelist_delete(hdrl_imagelist *himlist)
Free all memory used by a hdrl_imagelist object including the images.
hdrl_imagelist * hdrl_imagelist_new(void)
Create an empty imagelist.
void hdrl_parameter_delete(hdrl_parameter *obj)
shallow delete of a parameter