37 static int fors_resample_create(cpl_plugin *);
38 static int fors_resample_exec(cpl_plugin *);
39 static int fors_resample_destroy(cpl_plugin *);
40 static int fors_resample(cpl_parameterlist *, cpl_frameset *);
42 static char fors_resample_description[] =
43 "This recipe is used to resample at constant wavelength step spatially\n"
44 "rectified spectra. The input frames are produced using either the recipe\n"
45 "fors_extract_slits in the case of MOS/MXU multi slit exposures, or the\n"
46 "recipes fors_remove_bias and fors_flatfield in the case of LSS or long-slit\n"
47 "like MOS/MXU data. Only in case of LSS or LSS-like data the SLIT_LOCATION\n"
48 "table is required in input. Please refer to the FORS Pipeline User's Manual\n"
51 "In the table below the MXU acronym can also be read as MOS and LSS, SCI\n"
52 "can be read as STD, and SCIENCE as STANDARD.\n\n"
54 " DO category: Type: Explanation: Required:\n"
56 " or SCIENCE_UNBIAS_MXU\n"
57 " or SCIENCE_UNFLAT_MXU\n"
58 " or RECTIFIED_LAMP_MXU\n"
59 " or RECTIFIED_ALL_SCI_MXU\n"
60 " or RECTIFIED_SCI_MXU\n"
61 " or RECTIFIED_SKY_SCI_MXU Calib Frame to resample Y\n"
63 " or DISP_COEFF_SCI_MXU Calib Dispersion coefficients Y\n"
64 " SLIT_LOCATION_MXU Calib Slit location table Y\n"
65 " GRISM_TABLE Calib Grism table .\n\n"
67 " DO category: Data type: Explanation:\n"
69 " or MAPPED_ALL_SCI_MXU\n"
70 " or MAPPED_SCI_MXU\n"
71 " or MAPPED_SKY_SCI_MXU FITS image Resampled spectra\n\n";
73 #define fors_resample_exit(message) \
75 if ((const char *)message != NULL) cpl_msg_error(recipe, message); \
76 cpl_image_delete(spectra); \
77 cpl_image_delete(mapped); \
78 cpl_table_delete(grism_table); \
79 cpl_table_delete(idscoeff); \
80 cpl_table_delete(slits); \
81 cpl_propertylist_delete(header); \
82 cpl_msg_indent_less(); \
86 #define fors_resample_exit_memcheck(message) \
88 if ((const char *)message != NULL) cpl_msg_info(recipe, message); \
89 printf("free spectra (%p)\n", spectra); \
90 cpl_image_delete(spectra); \
91 printf("free mapped (%p)\n", mapped); \
92 cpl_image_delete(mapped); \
93 printf("free grism_table (%p)\n", grism_table); \
94 cpl_table_delete(grism_table); \
95 printf("free idscoeff (%p)\n", idscoeff); \
96 cpl_table_delete(idscoeff); \
97 printf("free slits (%p)\n", slits); \
98 cpl_table_delete(slits); \
99 printf("free header (%p)\n", header); \
100 cpl_propertylist_delete(header); \
101 cpl_msg_indent_less(); \
119 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe );
120 cpl_plugin *plugin = &recipe->interface;
122 cpl_plugin_init(plugin,
125 CPL_PLUGIN_TYPE_RECIPE,
127 "Resample input spectra at constant wavelength step",
128 fors_resample_description,
131 "This file is currently part of the FORS Instrument Pipeline\n"
132 "Copyright (C) 2002-2010 European Southern Observatory\n\n"
133 "This program is free software; you can redistribute it and/or modify\n"
134 "it under the terms of the GNU General Public License as published by\n"
135 "the Free Software Foundation; either version 2 of the License, or\n"
136 "(at your option) any later version.\n\n"
137 "This program is distributed in the hope that it will be useful,\n"
138 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
139 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
140 "GNU General Public License for more details.\n\n"
141 "You should have received a copy of the GNU General Public License\n"
142 "along with this program; if not, write to the Free Software Foundation,\n"
143 "Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n",
144 fors_resample_create,
146 fors_resample_destroy);
148 cpl_pluginlist_append(list, plugin);
164 static int fors_resample_create(cpl_plugin *plugin)
173 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
174 recipe = (cpl_recipe *)plugin;
182 recipe->parameters = cpl_parameterlist_new();
188 p = cpl_parameter_new_value(
"fors.fors_resample.dispersion",
190 "Expected spectral dispersion (Angstrom/pixel)",
191 "fors.fors_resample",
193 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dispersion");
194 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
195 cpl_parameterlist_append(recipe->parameters, p);
201 p = cpl_parameter_new_value(
"fors.fors_resample.startwavelength",
203 "Start wavelength in spectral extraction",
204 "fors.fors_resample",
206 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"startwavelength");
207 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
208 cpl_parameterlist_append(recipe->parameters, p);
214 p = cpl_parameter_new_value(
"fors.fors_resample.endwavelength",
216 "End wavelength in spectral extraction",
217 "fors.fors_resample",
219 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"endwavelength");
220 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
221 cpl_parameterlist_append(recipe->parameters, p);
227 p = cpl_parameter_new_value(
"fors.fors_resample.flux",
229 "Apply flux conservation",
230 "fors.fors_resample",
232 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"flux");
233 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
234 cpl_parameterlist_append(recipe->parameters, p);
248 static int fors_resample_exec(cpl_plugin *plugin)
252 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
253 recipe = (cpl_recipe *)plugin;
257 return fors_resample(recipe->parameters, recipe->frames);
269 static int fors_resample_destroy(cpl_plugin *plugin)
273 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
274 recipe = (cpl_recipe *)plugin;
278 cpl_parameterlist_delete(recipe->parameters);
293 static int fors_resample(cpl_parameterlist *parlist,
294 cpl_frameset *frameset)
297 const char *recipe =
"fors_resample";
305 double startwavelength;
306 double endwavelength;
313 cpl_image *spectra = NULL;
314 cpl_image *mapped = NULL;
315 cpl_table *grism_table = NULL;
316 cpl_table *maskslits = NULL;
317 cpl_table *slits = NULL;
318 cpl_table *idscoeff = NULL;
319 cpl_propertylist *header = NULL;
326 const char *disp_coeff_tag;
327 const char *slit_location_tag;
328 const char *rectified_tag;
329 const char *mapped_tag;
333 int treat_as_lss = 0;
346 char *instrume = NULL;
349 cpl_msg_set_indentation(2);
355 cpl_msg_info(recipe,
"Recipe %s configuration parameters:", recipe);
356 cpl_msg_indent_more();
358 if (cpl_frameset_count_tags(frameset,
"GRISM_TABLE") > 1)
359 fors_resample_exit(
"Too many in input: GRISM_TABLE");
364 "fors.fors_resample.dispersion", grism_table);
366 if (dispersion <= 0.0)
367 fors_resample_exit(
"Invalid spectral dispersion value");
370 "fors.fors_resample.startwavelength", grism_table);
371 if (startwavelength > 1.0)
372 if (startwavelength < 3000.0 || startwavelength > 13000.0)
373 fors_resample_exit(
"Invalid wavelength");
376 "fors.fors_resample.endwavelength", grism_table);
377 if (endwavelength > 1.0) {
378 if (endwavelength < 3000.0 || endwavelength > 13000.0)
379 fors_resample_exit(
"Invalid wavelength");
380 if (startwavelength < 1.0)
381 fors_resample_exit(
"Invalid wavelength interval");
384 if (startwavelength > 1.0)
385 if (endwavelength - startwavelength <= 0.0)
386 fors_resample_exit(
"Invalid wavelength interval");
390 cpl_table_delete(grism_table); grism_table = NULL;
392 if (cpl_error_get_code())
393 fors_resample_exit(
"Failure reading the configuration parameters");
396 cpl_msg_indent_less();
397 cpl_msg_info(recipe,
"Check input set-of-frames:");
398 cpl_msg_indent_more();
400 mxu = cpl_frameset_count_tags(frameset,
"DISP_COEFF_MXU");
401 mxu += cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_MXU");
402 mxu += cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_MXU");
403 mos = cpl_frameset_count_tags(frameset,
"DISP_COEFF_MOS");
404 mos += cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_MOS");
405 mos += cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_MOS");
406 lss = cpl_frameset_count_tags(frameset,
"DISP_COEFF_LSS");
407 lss += cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_LSS");
408 lss += cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_LSS");
410 nframes = mos + mxu + lss;
413 fors_resample_exit(
"Missing dispersion coefficients table");
416 cpl_msg_error(recipe,
417 "Too many input dispersion coefficients tables (%d > 1)",
419 fors_resample_exit(NULL);
422 disp = cpl_frameset_count_tags(frameset,
"DISP_COEFF_MXU");
423 disp += cpl_frameset_count_tags(frameset,
"DISP_COEFF_MOS");
424 disp += cpl_frameset_count_tags(frameset,
"DISP_COEFF_LSS");
425 dispsci = cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_MXU");
426 dispsci += cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_MOS");
427 dispsci += cpl_frameset_count_tags(frameset,
"DISP_COEFF_SCI_LSS");
428 dispstd = cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_MXU");
429 dispstd += cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_MOS");
430 dispstd += cpl_frameset_count_tags(frameset,
"DISP_COEFF_STD_LSS");
433 slit_location_tag =
"SLIT_LOCATION_MXU";
435 disp_coeff_tag =
"DISP_COEFF_MXU";
437 disp_coeff_tag =
"DISP_COEFF_SCI_MXU";
439 disp_coeff_tag =
"DISP_COEFF_STD_MXU";
442 slit_location_tag =
"SLIT_LOCATION_MOS";
444 disp_coeff_tag =
"DISP_COEFF_MOS";
446 disp_coeff_tag =
"DISP_COEFF_SCI_MOS";
448 disp_coeff_tag =
"DISP_COEFF_STD_MOS";
451 slit_location_tag =
"SLIT_LOCATION_LSS";
453 disp_coeff_tag =
"DISP_COEFF_LSS";
455 disp_coeff_tag =
"DISP_COEFF_SCI_LSS";
457 disp_coeff_tag =
"DISP_COEFF_STD_LSS";
463 fors_resample_exit(
"Cannot load dispersion coefficients table header");
466 int nslits_out_det = 0;
477 treat_as_lss = fors_mos_is_lss_like(maskslits, nslits_out_det);
479 cpl_table_delete(maskslits); maskslits = NULL;
482 cpl_propertylist_delete(header); header = NULL;
486 sciall = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_MXU");
487 stdall = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_MXU");
490 sci = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_MXU");
491 std = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_MXU");
492 lamp = cpl_frameset_count_tags(frameset,
"LAMP_UNBIAS_MXU");
495 sciall = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_SCI_MXU");
496 stdall = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_STD_MXU");
497 scisky = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_SCI_MXU");
498 stdsky = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_STD_MXU");
499 sci = cpl_frameset_count_tags(frameset,
"RECTIFIED_SCI_MXU");
500 std = cpl_frameset_count_tags(frameset,
"RECTIFIED_STD_MXU");
501 lamp = cpl_frameset_count_tags(frameset,
"RECTIFIED_LAMP_MXU");
506 sciall = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_MOS");
507 stdall = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_MOS");
510 sci = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_MOS");
511 std = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_MOS");
512 lamp = cpl_frameset_count_tags(frameset,
"LAMP_UNBIAS_MOS");
515 sciall = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_SCI_MOS");
516 stdall = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_STD_MOS");
517 scisky = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_SCI_MOS");
518 stdsky = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_STD_MOS");
519 sci = cpl_frameset_count_tags(frameset,
"RECTIFIED_SCI_MOS");
520 std = cpl_frameset_count_tags(frameset,
"RECTIFIED_STD_MOS");
521 lamp = cpl_frameset_count_tags(frameset,
"RECTIFIED_LAMP_MOS");
525 sciall = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_LSS");
526 stdall = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_LSS");
529 sci = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_LSS");
530 std = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_LSS");
531 lamp = cpl_frameset_count_tags(frameset,
"LAMP_UNBIAS_LSS");
534 nframes = sciall + stdall + scisky + stdsky + sci + std + lamp;
537 fors_resample_exit(
"Missing input spectral frame");
540 cpl_msg_error(recipe,
"Too many input spectral frames (%d > 1)",
542 fors_resample_exit(NULL);
548 rectified_tag =
"SCIENCE_UNFLAT_MXU";
549 mapped_tag =
"MAPPED_ALL_SCI_MXU";
552 rectified_tag =
"RECTIFIED_ALL_SCI_MXU";
553 mapped_tag =
"MAPPED_ALL_SCI_MXU";
558 rectified_tag =
"SCIENCE_UNFLAT_MOS";
559 mapped_tag =
"MAPPED_ALL_SCI_MOS";
562 rectified_tag =
"RECTIFIED_ALL_SCI_MOS";
563 mapped_tag =
"MAPPED_ALL_SCI_MOS";
567 rectified_tag =
"SCIENCE_UNFLAT_LSS";
568 mapped_tag =
"MAPPED_ALL_SCI_LSS";
574 rectified_tag =
"STANDARD_UNFLAT_MXU";
575 mapped_tag =
"MAPPED_ALL_STD_MXU";
578 rectified_tag =
"RECTIFIED_ALL_STD_MXU";
579 mapped_tag =
"MAPPED_ALL_STD_MXU";
584 rectified_tag =
"STANDARD_UNFLAT_MOS";
585 mapped_tag =
"MAPPED_ALL_STD_MOS";
588 rectified_tag =
"RECTIFIED_ALL_STD_MOS";
589 mapped_tag =
"MAPPED_ALL_STD_MOS";
593 rectified_tag =
"STANDARD_UNFLAT_LSS";
594 mapped_tag =
"MAPPED_ALL_STD_LSS";
599 rectified_tag =
"RECTIFIED_SKY_SCI_MXU";
600 mapped_tag =
"MAPPED_SKY_SCI_MXU";
603 rectified_tag =
"RECTIFIED_SKY_SCI_MOS";
604 mapped_tag =
"MAPPED_SKY_SCI_MOS";
609 rectified_tag =
"RECTIFIED_SKY_STD_MXU";
610 mapped_tag =
"MAPPED_SKY_STD_MXU";
613 rectified_tag =
"RECTIFIED_SKY_STD_MOS";
614 mapped_tag =
"MAPPED_SKY_STD_MOS";
620 rectified_tag =
"SCIENCE_UNBIAS_MXU";
621 mapped_tag =
"MAPPED_ALL_SCI_MXU";
624 rectified_tag =
"RECTIFIED_SCI_MXU";
625 mapped_tag =
"MAPPED_SCI_MXU";
630 rectified_tag =
"SCIENCE_UNBIAS_MOS";
631 mapped_tag =
"MAPPED_ALL_SCI_MOS";
634 rectified_tag =
"RECTIFIED_SCI_MOS";
635 mapped_tag =
"MAPPED_SCI_MOS";
639 rectified_tag =
"SCIENCE_UNBIAS_LSS";
640 mapped_tag =
"MAPPED_ALL_SCI_LSS";
646 rectified_tag =
"STANDARD_UNBIAS_MXU";
647 mapped_tag =
"MAPPED_ALL_STD_MXU";
650 rectified_tag =
"RECTIFIED_STD_MXU";
651 mapped_tag =
"MAPPED_STD_MXU";
656 rectified_tag =
"STANDARD_UNBIAS_MOS";
657 mapped_tag =
"MAPPED_ALL_STD_MOS";
660 rectified_tag =
"RECTIFIED_STD_MOS";
661 mapped_tag =
"MAPPED_STD_MOS";
665 rectified_tag =
"STANDARD_UNBIAS_LSS";
666 mapped_tag =
"MAPPED_ALL_STD_LSS";
672 rectified_tag =
"LAMP_UNBIAS_MXU";
673 mapped_tag =
"MAPPED_LAMP_MXU";
676 rectified_tag =
"RECTIFIED_LAMP_MXU";
677 mapped_tag =
"MAPPED_LAMP_MXU";
682 rectified_tag =
"LAMP_UNBIAS_MOS";
683 mapped_tag =
"MAPPED_LAMP_MOS";
686 rectified_tag =
"RECTIFIED_LAMP_MOS";
687 mapped_tag =
"MAPPED_LAMP_MOS";
691 rectified_tag =
"LAMP_UNBIAS_LSS";
692 mapped_tag =
"MAPPED_LAMP_LSS";
699 fors_resample_exit(
"Cannot load spectral frame header");
703 cpl_msg_warning(cpl_func,
"Input frames are not from the same grism");
706 cpl_msg_warning(cpl_func,
"Input frames are not from the same filter");
709 cpl_msg_warning(cpl_func,
"Input frames are not from the same chip");
717 instrume = (
char *)cpl_propertylist_get_string(header,
"INSTRUME");
718 if (instrume == NULL)
719 fors_resample_exit(
"Missing keyword INSTRUME in reference frame "
722 if (instrume[4] ==
'1')
723 snprintf(version, 80,
"%s/%s",
"fors1", VERSION);
724 if (instrume[4] ==
'2')
725 snprintf(version, 80,
"%s/%s",
"fors2", VERSION);
727 reference = cpl_propertylist_get_double(header,
"ESO INS GRIS1 WLEN");
729 if (cpl_error_get_code() != CPL_ERROR_NONE)
730 fors_resample_exit(
"Missing keyword ESO INS GRIS1 WLEN "
731 "in reference frame header");
733 if (reference < 3000.0)
736 if (reference < 3000.0 || reference > 13000.0) {
737 cpl_msg_error(recipe,
"Invalid central wavelength %.2f read from "
738 "keyword ESO INS GRIS1 WLEN in reference frame header",
740 fors_resample_exit(NULL);
743 cpl_msg_info(recipe,
"The central wavelength is: %.2f", reference);
745 rebin = cpl_propertylist_get_int(header,
"ESO DET WIN1 BINX");
747 if (cpl_error_get_code() != CPL_ERROR_NONE)
748 fors_resample_exit(
"Missing keyword ESO DET WIN1 BINX "
749 "in reference frame header");
753 cpl_msg_warning(recipe,
"The rebin factor is %d, and therefore the "
754 "working dispersion used is %f A/pixel", rebin,
759 cpl_msg_indent_less();
760 cpl_msg_info(recipe,
"Load input frames...");
761 cpl_msg_indent_more();
763 spectra =
dfs_load_image(frameset, rectified_tag, CPL_TYPE_FLOAT, 0, 0);
765 fors_resample_exit(
"Cannot load input spectral frame");
768 if (idscoeff == NULL)
769 fors_resample_exit(
"Cannot load dispersion solution table");
771 if (lss || treat_as_lss) {
772 int first_row, last_row, ylow, yhig, nx;
777 fors_resample_exit(
"Cannot load slit location table");
779 first_row = cpl_table_get_double(slits,
"ybottom", 0, NULL);
780 last_row = cpl_table_get_double(slits,
"ytop", 0, NULL);
782 ylow = first_row + 1;
785 nx = cpl_image_get_size_x(spectra);
787 dummy = cpl_image_extract(spectra, 1, ylow, nx, yhig);
788 cpl_image_delete(spectra); spectra = dummy;
791 cpl_msg_indent_less();
792 cpl_msg_info(recipe,
"Spectral resampling...");
793 cpl_msg_indent_more();
796 startwavelength, endwavelength,
797 dispersion, idscoeff, flux);
799 cpl_table_delete(idscoeff); idscoeff = NULL;
800 cpl_image_delete(spectra); spectra = NULL;
802 cpl_propertylist_update_double(header,
"CRPIX1", 1.0);
803 cpl_propertylist_update_double(header,
"CRPIX2", 1.0);
804 cpl_propertylist_update_double(header,
"CRVAL1",
805 startwavelength + dispersion/2);
806 cpl_propertylist_update_double(header,
"CRVAL2", 1.0);
809 cpl_propertylist_update_double(header,
"CD1_1", dispersion);
810 cpl_propertylist_update_double(header,
"CD1_2", 0.0);
811 cpl_propertylist_update_double(header,
"CD2_1", 0.0);
812 cpl_propertylist_update_double(header,
"CD2_2", 1.0);
813 cpl_propertylist_update_string(header,
"CTYPE1",
"LINEAR");
814 cpl_propertylist_update_string(header,
"CTYPE2",
"PIXEL");
817 header, parlist, recipe, version))
818 fors_resample_exit(NULL);
820 cpl_image_delete(mapped); mapped = NULL;
821 cpl_propertylist_delete(header); header = NULL;
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
cpl_image * dfs_load_image(cpl_frameset *frameset, const char *category, cpl_type type, int ext, int calib)
Loading image data of given category.
cpl_propertylist * dfs_load_header(cpl_frameset *frameset, const char *category, int ext)
Loading header associated to data of given category.
cpl_table * mos_load_slits_fors_mxu(cpl_propertylist *header)
Create slit location table from FITS header of FORS2-MXU data.
cpl_image * mos_wavelength_calibration(cpl_image *image, double refwave, double firstLambda, double lastLambda, double dispersion, cpl_table *idscoeff, int flux)
Remap at constant wavelength step an image of rectified scientific spectra.
cpl_table * mos_load_slits_fors_mos(cpl_propertylist *header, int *nslits_out_det)
Create slit location table from FITS header of FORS1/2 MOS data.
int dfs_get_parameter_bool(cpl_parameterlist *parlist, const char *name, const cpl_table *defaults)
Reading a recipe boolean parameter value.
int dfs_equal_keyword(cpl_frameset *frameset, const char *keyword)
Saving table data of given category.
int dfs_save_image(cpl_frameset *frameset, const cpl_image *image, const char *category, cpl_propertylist *header, const cpl_parameterlist *parlist, const char *recipename, const char *version)
Saving image data of given category.
cpl_table * dfs_load_table(cpl_frameset *frameset, const char *category, int ext)
Loading table data of given category.
double dfs_get_parameter_double(cpl_parameterlist *parlist, const char *name, const cpl_table *defaults)
Reading a recipe double parameter value.