37 static int fors_align_sky_lss_create(cpl_plugin *);
38 static int fors_align_sky_lss_exec(cpl_plugin *);
39 static int fors_align_sky_lss_destroy(cpl_plugin *);
40 static int fors_align_sky_lss(cpl_parameterlist *, cpl_frameset *);
42 static char fors_align_sky_lss_description[] =
43 "This recipe is used to align the wavelength solution based on the arc\n"
44 "lamp exposure on a set of sky lines observed on a scientific exposure.\n"
45 "The input scientific frames are produced by the recipes fors_remove_bias\n"
46 "and fors_flatfield. An input catalog of sky lines can be specified, or\n"
47 "an internal one is used.\n"
49 "This recipe should be applied to LSS or long-slit like data (MOS/MXU with\n"
50 "all slits at the same offset). For multi-slit MOS/MXU data use recipe\n"
51 "fors_align_sky instead. Please refer to the FORS PIpeline User's Manual\n"
54 "In the table below the MXU acronym can be alternatively read as MOS and\n"
55 "LSS, and SCI as STD.\n\n"
57 " DO category: Type: Explanation: Required:\n"
58 " SCIENCE_UNBIAS_MXU\n"
59 " or SCIENCE_UNFLAT_MXU\n"
60 " or STANDARD_UNBIAS_MXU\n"
61 " or STANDARD_UNFLAT_MXU Calib Frame with sky lines Y\n"
62 " DISP_COEFF_MXU Calib Dispersion solution Y\n"
63 " SLIT_LOCATION_MXU Calib Slit location on CCD Y\n"
64 " MASTER_SKYLINECAT Calib Catalog of sky lines .\n"
65 " GRISM_TABLE Calib Grism table .\n\n"
67 " DO category: Data type: Explanation:\n"
68 " SKY_SHIFTS_LONG_SCI_MXU FITS table Observed sky lines offsets\n"
69 " WAVELENGTH_MAP_SCI_MXU FITS image Wavelength mapped on CCD\n"
70 " DISP_COEFF_SCI_MXU FITS image Upgraded dispersion solution\n\n";
72 #define fors_align_sky_lss_exit(message) \
74 if ((const char *)message != NULL) cpl_msg_error(recipe, message); \
75 cpl_image_delete(wavemap); \
76 cpl_image_delete(rainbow); \
77 cpl_image_delete(smapped); \
78 cpl_table_delete(grism_table); \
79 cpl_table_delete(maskslits); \
80 cpl_table_delete(wavelengths); \
81 cpl_table_delete(offsets); \
82 cpl_table_delete(slits); \
83 cpl_table_delete(idscoeff); \
84 cpl_vector_delete(lines); \
85 cpl_propertylist_delete(header); \
86 cpl_msg_indent_less(); \
90 #define fors_align_sky_lss_exit_memcheck(message) \
92 if ((const char *)message != NULL) cpl_msg_info(recipe, message); \
93 printf("free wavemap (%p)\n", wavemap); \
94 cpl_image_delete(wavemap); \
95 printf("free rainbow (%p)\n", rainbow); \
96 cpl_image_delete(rainbow); \
97 printf("free smapped (%p)\n", smapped); \
98 cpl_image_delete(smapped); \
99 printf("free grism_table (%p)\n", grism_table); \
100 cpl_table_delete(grism_table); \
101 printf("free maskslits (%p)\n", maskslits); \
102 cpl_table_delete(maskslits); \
103 printf("free wavelengths (%p)\n", wavelengths); \
104 cpl_table_delete(wavelengths); \
105 printf("free offsets (%p)\n", offsets); \
106 cpl_table_delete(offsets); \
107 printf("free idscoeff (%p)\n", idscoeff); \
108 cpl_table_delete(idscoeff); \
109 printf("free slits (%p)\n", slits); \
110 cpl_table_delete(slits); \
111 printf("free lines (%p)\n", lines); \
112 cpl_vector_delete(lines); \
113 printf("free header (%p)\n", header); \
114 cpl_propertylist_delete(header); \
115 cpl_msg_indent_less(); \
133 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe );
134 cpl_plugin *plugin = &recipe->interface;
136 cpl_plugin_init(plugin,
139 CPL_PLUGIN_TYPE_RECIPE,
140 "fors_align_sky_lss",
141 "Upgrade wavelength solution using sky lines",
142 fors_align_sky_lss_description,
145 "This file is currently part of the FORS Instrument Pipeline\n"
146 "Copyright (C) 2002-2010 European Southern Observatory\n\n"
147 "This program is free software; you can redistribute it and/or modify\n"
148 "it under the terms of the GNU General Public License as published by\n"
149 "the Free Software Foundation; either version 2 of the License, or\n"
150 "(at your option) any later version.\n\n"
151 "This program is distributed in the hope that it will be useful,\n"
152 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
153 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
154 "GNU General Public License for more details.\n\n"
155 "You should have received a copy of the GNU General Public License\n"
156 "along with this program; if not, write to the Free Software Foundation,\n"
157 "Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n",
158 fors_align_sky_lss_create,
159 fors_align_sky_lss_exec,
160 fors_align_sky_lss_destroy);
162 cpl_pluginlist_append(list, plugin);
178 static int fors_align_sky_lss_create(cpl_plugin *plugin)
187 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
188 recipe = (cpl_recipe *)plugin;
196 recipe->parameters = cpl_parameterlist_new();
202 p = cpl_parameter_new_value(
"fors.fors_align_sky_lss.dispersion",
204 "Expected spectral dispersion (Angstrom/pixel)",
205 "fors.fors_align_sky_lss",
207 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dispersion");
208 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
209 cpl_parameterlist_append(recipe->parameters, p);
215 p = cpl_parameter_new_value(
"fors.fors_align_sky_lss.startwavelength",
217 "Start wavelength in spectral extraction",
218 "fors.fors_align_sky_lss",
220 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"startwavelength");
221 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
222 cpl_parameterlist_append(recipe->parameters, p);
228 p = cpl_parameter_new_value(
"fors.fors_align_sky_lss.endwavelength",
230 "End wavelength in spectral extraction",
231 "fors.fors_align_sky_lss",
233 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"endwavelength");
234 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
235 cpl_parameterlist_append(recipe->parameters, p);
241 p = cpl_parameter_new_value(
"fors.fors_align_sky_lss.skyalign",
243 "Polynomial order for sky lines alignment",
244 "fors.fors_align_sky_lss",
246 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"skyalign");
247 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
248 cpl_parameterlist_append(recipe->parameters, p);
254 p = cpl_parameter_new_value(
"fors.fors_align_sky_lss.wcolumn",
256 "Name of sky line catalog table column "
258 "fors.fors_align_sky_lss",
260 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"wcolumn");
261 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
262 cpl_parameterlist_append(recipe->parameters, p);
276 static int fors_align_sky_lss_exec(cpl_plugin *plugin)
280 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
281 recipe = (cpl_recipe *)plugin;
285 return fors_align_sky_lss(recipe->parameters, recipe->frames);
297 static int fors_align_sky_lss_destroy(cpl_plugin *plugin)
301 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
302 recipe = (cpl_recipe *)plugin;
306 cpl_parameterlist_delete(recipe->parameters);
321 static int fors_align_sky_lss(cpl_parameterlist *parlist,
322 cpl_frameset *frameset)
325 const char *recipe =
"fors_align_sky_lss";
333 double startwavelength;
334 double endwavelength;
342 cpl_image *rainbow = NULL;
343 cpl_image *wavemap = NULL;
344 cpl_image *smapped = NULL;
345 cpl_image *dummy = NULL;
346 cpl_table *grism_table = NULL;
347 cpl_table *wavelengths = NULL;
348 cpl_table *slits = NULL;
349 cpl_table *idscoeff = NULL;
350 cpl_table *maskslits = NULL;
351 cpl_table *offsets = NULL;
352 cpl_vector *lines = NULL;
353 cpl_propertylist *header = NULL;
360 const char *slit_location_tag;
361 const char *rectified_tag;
362 const char *wavemap_tag;
363 const char *shifts_tag;
364 const char *disp_ali_tag;
365 const char *disp_coeff_tag;
370 int ccd_xsize, ccd_ysize;
371 int first_row, last_row;
383 int nslits_out_det = 0;
385 char *instrume = NULL;
388 cpl_msg_set_indentation(2);
395 cpl_msg_info(recipe,
"Recipe %s configuration parameters:", recipe);
396 cpl_msg_indent_more();
398 if (cpl_frameset_count_tags(frameset,
"GRISM_TABLE") > 1)
399 fors_align_sky_lss_exit(
"Too many in input: GRISM_TABLE");
404 "fors.fors_align_sky_lss.dispersion", grism_table);
406 if (dispersion <= 0.0)
407 fors_align_sky_lss_exit(
"Invalid spectral dispersion value");
410 "fors.fors_align_sky_lss.startwavelength", grism_table);
411 if (startwavelength > 1.0)
412 if (startwavelength < 3000.0 || startwavelength > 13000.0)
413 fors_align_sky_lss_exit(
"Invalid wavelength");
416 "fors.fors_align_sky_lss.endwavelength", grism_table);
417 if (endwavelength > 1.0) {
418 if (endwavelength < 3000.0 || endwavelength > 13000.0)
419 fors_align_sky_lss_exit(
"Invalid wavelength");
420 if (startwavelength < 1.0)
421 fors_align_sky_lss_exit(
"Invalid wavelength interval");
424 if (startwavelength > 1.0)
425 if (endwavelength - startwavelength <= 0.0)
426 fors_align_sky_lss_exit(
"Invalid wavelength interval");
429 "fors.fors_align_sky_lss.skyalign", NULL);
432 fors_align_sky_lss_exit(
"Invalid polynomial degree");
434 fors_align_sky_lss_exit(
"Max polynomial degree for sky alignment is 2");
437 "fors.fors_align_sky_lss.wcolumn", NULL);
439 cpl_table_delete(grism_table); grism_table = NULL;
441 if (cpl_error_get_code())
442 fors_align_sky_lss_exit(
"Failure reading the configuration parameters");
445 cpl_msg_indent_less();
446 cpl_msg_info(recipe,
"Check input set-of-frames:");
447 cpl_msg_indent_more();
449 mxu = cpl_frameset_count_tags(frameset,
"SLIT_LOCATION_MXU");
450 mos = cpl_frameset_count_tags(frameset,
"SLIT_LOCATION_MOS");
451 lss = cpl_frameset_count_tags(frameset,
"SLIT_LOCATION_LSS");
453 nframes = mos + mxu + lss;
456 fors_align_sky_lss_exit(
"Missing input slit location table");
459 cpl_msg_error(recipe,
460 "Too many input slit location tables (%d > 1)", nframes);
461 fors_align_sky_lss_exit(NULL);
465 rec_scib = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_MXU");
466 rec_stdb = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_MXU");
467 rec_scif = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_MXU");
468 rec_stdf = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_MXU");
471 rec_scib = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_MOS");
472 rec_stdb = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_MOS");
473 rec_scif = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_MOS");
474 rec_stdf = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_MOS");
477 rec_scib = cpl_frameset_count_tags(frameset,
"SCIENCE_UNBIAS_LSS");
478 rec_stdb = cpl_frameset_count_tags(frameset,
"STANDARD_UNBIAS_LSS");
479 rec_scif = cpl_frameset_count_tags(frameset,
"SCIENCE_UNFLAT_LSS");
480 rec_stdf = cpl_frameset_count_tags(frameset,
"STANDARD_UNFLAT_LSS");
483 nframes = rec_scib + rec_stdb + rec_scif + rec_stdf;
486 fors_align_sky_lss_exit(
"Missing input scientific spectra");
489 cpl_msg_error(recipe,
"Too many input scientific spectra (%d > 1)",
491 fors_align_sky_lss_exit(NULL);
494 if (cpl_frameset_count_tags(frameset,
"MASTER_SKYLINECAT") > 1)
495 fors_align_sky_lss_exit(
"Too many in input: MASTER_SKYLINECAT");
499 rectified_tag =
"SCIENCE_UNBIAS_MXU";
500 wavemap_tag =
"WAVELENGTH_MAP_SCI_MXU";
501 shifts_tag =
"SKY_SHIFTS_LONG_SCI_MXU";
502 disp_ali_tag =
"DISP_COEFF_SCI_MXU";
505 rectified_tag =
"SCIENCE_UNBIAS_MOS";
506 wavemap_tag =
"WAVELENGTH_MAP_SCI_MOS";
507 shifts_tag =
"SKY_SHIFTS_LONG_SCI_MOS";
508 disp_ali_tag =
"DISP_COEFF_SCI_MOS";
511 rectified_tag =
"SCIENCE_UNBIAS_LSS";
512 wavemap_tag =
"WAVELENGTH_MAP_SCI_LSS";
513 shifts_tag =
"SKY_SHIFTS_LONG_SCI_LSS";
514 disp_ali_tag =
"DISP_COEFF_SCI_LSS";
519 rectified_tag =
"STANDARD_UNBIAS_MXU";
520 wavemap_tag =
"WAVELENGTH_MAP_STD_MXU";
521 shifts_tag =
"SKY_SHIFTS_LONG_STD_MXU";
522 disp_ali_tag =
"DISP_COEFF_STD_MXU";
525 rectified_tag =
"STANDARD_UNBIAS_MOS";
526 wavemap_tag =
"WAVELENGTH_MAP_STD_MOS";
527 shifts_tag =
"SKY_SHIFTS_LONG_STD_MOS";
528 disp_ali_tag =
"DISP_COEFF_STD_MOS";
531 rectified_tag =
"STANDARD_UNBIAS_LSS";
532 wavemap_tag =
"WAVELENGTH_MAP_STD_LSS";
533 shifts_tag =
"SKY_SHIFTS_LONG_STD_LSS";
534 disp_ali_tag =
"DISP_COEFF_STD_LSS";
539 rectified_tag =
"SCIENCE_UNFLAT_MXU";
540 wavemap_tag =
"WAVELENGTH_MAP_SCI_MXU";
541 shifts_tag =
"SKY_SHIFTS_LONG_SCI_MXU";
542 disp_ali_tag =
"DISP_COEFF_SCI_MXU";
545 rectified_tag =
"SCIENCE_UNFLAT_MOS";
546 wavemap_tag =
"WAVELENGTH_MAP_SCI_MOS";
547 shifts_tag =
"SKY_SHIFTS_LONG_SCI_MOS";
548 disp_ali_tag =
"DISP_COEFF_SCI_MOS";
551 rectified_tag =
"SCIENCE_UNFLAT_LSS";
552 wavemap_tag =
"WAVELENGTH_MAP_SCI_LSS";
553 shifts_tag =
"SKY_SHIFTS_LONG_SCI_LSS";
554 disp_ali_tag =
"DISP_COEFF_SCI_LSS";
559 rectified_tag =
"STANDARD_UNFLAT_MXU";
560 wavemap_tag =
"WAVELENGTH_MAP_STD_MXU";
561 shifts_tag =
"SKY_SHIFTS_LONG_STD_MXU";
562 disp_ali_tag =
"DISP_COEFF_STD_MXU";
565 rectified_tag =
"STANDARD_UNFLAT_MOS";
566 wavemap_tag =
"WAVELENGTH_MAP_STD_MOS";
567 shifts_tag =
"SKY_SHIFTS_LONG_STD_MOS";
568 disp_ali_tag =
"DISP_COEFF_STD_MOS";
571 rectified_tag =
"STANDARD_UNFLAT_LSS";
572 wavemap_tag =
"WAVELENGTH_MAP_STD_LSS";
573 shifts_tag =
"SKY_SHIFTS_LONG_STD_LSS";
574 disp_ali_tag =
"DISP_COEFF_STD_LSS";
578 nframes = cpl_frameset_count_tags(frameset, rectified_tag);
581 cpl_msg_error(recipe,
"Missing input %s", rectified_tag);
582 fors_align_sky_lss_exit(NULL);
585 cpl_msg_error(recipe,
"Too many input %s (%d > 1)", rectified_tag,
587 fors_align_sky_lss_exit(NULL);
592 disp_coeff_tag =
"DISP_COEFF_MXU";
593 slit_location_tag =
"SLIT_LOCATION_MXU";
596 disp_coeff_tag =
"DISP_COEFF_MOS";
597 slit_location_tag =
"SLIT_LOCATION_MOS";
600 disp_coeff_tag =
"DISP_COEFF_LSS";
601 slit_location_tag =
"SLIT_LOCATION_LSS";
604 nframes = cpl_frameset_count_tags(frameset, disp_coeff_tag);
607 cpl_msg_error(recipe,
"Missing input %s", disp_coeff_tag);
608 fors_align_sky_lss_exit(NULL);
611 cpl_msg_error(recipe,
"Too many input %s (%d > 1)", disp_coeff_tag,
613 fors_align_sky_lss_exit(NULL);
620 fors_align_sky_lss_exit(
"Cannot load scientific frame header");
632 treat_as_lss = fors_mos_is_lss_like(maskslits, nslits_out_det);
634 cpl_table_delete(maskslits); maskslits = NULL;
637 fors_align_sky_lss_exit(
"This is not an LSS observation. "
638 "Please use recipe fors_align_sky");
642 cpl_msg_warning(cpl_func,
"Input frames are not from the same grism");
645 cpl_msg_warning(cpl_func,
"Input frames are not from the same filter");
648 cpl_msg_warning(cpl_func,
"Input frames are not from the same chip");
656 instrume = (
char *)cpl_propertylist_get_string(header,
"INSTRUME");
657 if (instrume == NULL)
658 fors_align_sky_lss_exit(
"Missing keyword INSTRUME in reference frame "
661 if (instrume[4] ==
'1')
662 snprintf(version, 80,
"%s/%s",
"fors1", VERSION);
663 if (instrume[4] ==
'2')
664 snprintf(version, 80,
"%s/%s",
"fors2", VERSION);
666 reference = cpl_propertylist_get_double(header,
"ESO INS GRIS1 WLEN");
668 if (cpl_error_get_code() != CPL_ERROR_NONE)
669 fors_align_sky_lss_exit(
"Missing keyword ESO INS GRIS1 WLEN "
670 "in reference frame header");
672 if (reference < 3000.0)
675 if (reference < 3000.0 || reference > 13000.0) {
676 cpl_msg_error(recipe,
"Invalid central wavelength %.2f read from "
677 "keyword ESO INS GRIS1 WLEN in reference frame header",
679 fors_align_sky_lss_exit(NULL);
682 cpl_msg_info(recipe,
"The central wavelength is: %.2f", reference);
684 rebin = cpl_propertylist_get_int(header,
"ESO DET WIN1 BINX");
686 if (cpl_error_get_code() != CPL_ERROR_NONE)
687 fors_align_sky_lss_exit(
"Missing keyword ESO DET WIN1 BINX "
688 "in reference frame header");
692 cpl_msg_warning(recipe,
"The rebin factor is %d, and therefore the "
693 "working dispersion used is %f A/pixel", rebin,
698 cpl_msg_indent_less();
699 cpl_msg_info(recipe,
"Load input frames...");
700 cpl_msg_indent_more();
702 smapped =
dfs_load_image(frameset, rectified_tag, CPL_TYPE_FLOAT, 0, 0);
704 fors_align_sky_lss_exit(
"Cannot load input scientific frame");
708 fors_align_sky_lss_exit(
"Cannot load slits location table");
710 first_row = cpl_table_get_double(slits,
"ybottom", 0, NULL);
711 last_row = cpl_table_get_double(slits,
"ytop", 0, NULL);
713 ylow = first_row + 1;
716 ccd_xsize = cpl_image_get_size_x(smapped);
717 ccd_ysize = cpl_image_get_size_x(smapped);
718 dummy = cpl_image_extract(smapped, 1, ylow, ccd_xsize, yhig);
719 cpl_image_delete(smapped); smapped = dummy;
722 cpl_table_delete(slits); slits = NULL;
725 if (idscoeff == NULL)
726 fors_align_sky_lss_exit(
"Cannot load dispersion solution");
736 nlines = cpl_table_get_nrow(wavelengths);
739 fors_align_sky_lss_exit(
"Empty input sky line catalog");
741 if (cpl_table_has_column(wavelengths, wcolumn) != 1) {
742 cpl_msg_error(recipe,
"Missing column %s in input line "
743 "catalog table", wcolumn);
744 fors_align_sky_lss_exit(NULL);
747 line = cpl_malloc(nlines *
sizeof(
double));
749 for (i = 0; i < nlines; i++)
750 line[i] = cpl_table_get(wavelengths, wcolumn, i, NULL);
752 cpl_table_delete(wavelengths); wavelengths = NULL;
754 lines = cpl_vector_wrap(nlines, line);
757 cpl_msg_info(recipe,
"No sky line catalog found in input - fine!");
761 cpl_msg_info(recipe,
"Align wavelength solution to reference "
762 "skylines applying %d order residual fit...", skyalign);
765 cpl_msg_info(recipe,
"Align wavelength solution to reference "
766 "skylines applying median offset...");
769 if (dispersion > 1.0)
778 startwavelength, endwavelength,
779 idscoeff, lines, highres,
780 skyalign, rainbow, 4);
782 cpl_vector_delete(lines); lines = NULL;
783 cpl_image_delete(smapped); smapped = NULL;
787 parlist, recipe, version))
788 fors_align_sky_lss_exit(NULL);
790 cpl_table_delete(offsets); offsets = NULL;
793 fors_align_sky_lss_exit(
"Alignment of the wavelength solution "
794 "to reference sky lines could not be done!");
797 parlist, recipe, version))
798 fors_align_sky_lss_exit(NULL);
800 cpl_table_delete(idscoeff); idscoeff = NULL;
802 wavemap = cpl_image_new(ccd_xsize, ccd_ysize, CPL_TYPE_FLOAT);
803 cpl_image_copy(wavemap, rainbow, 1, ylow);
805 cpl_image_delete(rainbow); rainbow = NULL;
808 header, parlist, recipe, version))
809 fors_align_sky_lss_exit(NULL);
811 cpl_image_delete(wavemap); wavemap = NULL;
812 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.
const char * dfs_get_parameter_string(cpl_parameterlist *parlist, const char *name, const cpl_table *defaults)
Reading a recipe string parameter value.
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_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_equal_keyword(cpl_frameset *frameset, const char *keyword)
Saving table data of given category.
cpl_table * mos_wavelength_align_lss(cpl_image *image, double refwave, double firstLambda, double lastLambda, cpl_table *idscoeff, cpl_vector *skylines, int highres, int order, cpl_image *calibration, int sradius)
Modify the input wavelength solution to match reference sky lines (LSS).
cpl_image * mos_map_idscoeff(cpl_table *idscoeff, int xsize, double reference, double blue, double red)
Create a wavelengths map from an IDS coefficients table.
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.
int dfs_get_parameter_int(cpl_parameterlist *parlist, const char *name, const cpl_table *defaults)
Reading a recipe integer parameter value.
int dfs_save_table(cpl_frameset *frameset, const cpl_table *table, const char *category, cpl_propertylist *header, const cpl_parameterlist *parlist, const char *recipename, const char *version)
Saving 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.