37 static int fors_align_sky_create(cpl_plugin *);
38 static int fors_align_sky_exec(cpl_plugin *);
39 static int fors_align_sky_destroy(cpl_plugin *);
40 static int fors_align_sky(cpl_parameterlist *, cpl_frameset *);
42 static char fors_align_sky_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 rectified frames are produced by the recipe fors_extract_slits.\n"
46 "An input catalog of sky lines can be specified, otherwise an internal one\n"
49 "This recipe should be applied to multi-slit MOS/MXU data: for LSS or\n"
50 "long-slit like data (MOS/MXU with all slits at the same offset) use recipe\n"
51 "fors_align_sky_lss 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"
57 " DO category: Type: Explanation: Required:\n"
58 " RECTIFIED_ALL_SCI_MXU\n"
59 " or RECTIFIED_SKY_SCI_MXU Calib Frame with sky lines Y\n"
60 " SPATIAL_MAP_MXU Calib Spatial coordinate map Y\n"
61 " CURV_COEFF_MXU Calib Spectral curvature Y\n"
62 " SLIT_LOCATION_MXU Calib Slit location on CCD Y\n"
63 " DISP_COEFF_MXU Calib Dispersion solution 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_SLIT_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_exit(message) \
74 if (message) cpl_msg_error(recipe, message); \
75 cpl_image_delete(wavemap); \
76 cpl_image_delete(coordinate); \
77 cpl_image_delete(rainbow); \
78 cpl_image_delete(smapped); \
79 cpl_table_delete(grism_table); \
80 cpl_table_delete(maskslits); \
81 cpl_table_delete(wavelengths); \
82 cpl_table_delete(offsets); \
83 cpl_table_delete(slits); \
84 cpl_table_delete(polytraces); \
85 cpl_table_delete(idscoeff); \
86 cpl_vector_delete(lines); \
87 cpl_propertylist_delete(header); \
88 cpl_msg_indent_less(); \
92 #define fors_align_sky_exit_memcheck(message) \
94 if (message) cpl_msg_info(recipe, message); \
95 printf("free wavemap (%p)\n", wavemap); \
96 cpl_image_delete(wavemap); \
97 printf("free coordinate (%p)\n", coordinate); \
98 cpl_image_delete(coordinate); \
99 printf("free rainbow (%p)\n", rainbow); \
100 cpl_image_delete(rainbow); \
101 printf("free smapped (%p)\n", smapped); \
102 cpl_image_delete(smapped); \
103 printf("free grism_table (%p)\n", grism_table); \
104 cpl_table_delete(grism_table); \
105 printf("free maskslits (%p)\n", maskslits); \
106 cpl_table_delete(maskslits); \
107 printf("free wavelengths (%p)\n", wavelengths); \
108 cpl_table_delete(wavelengths); \
109 printf("free offsets (%p)\n", offsets); \
110 cpl_table_delete(offsets); \
111 printf("free idscoeff (%p)\n", idscoeff); \
112 cpl_table_delete(idscoeff); \
113 printf("free slits (%p)\n", slits); \
114 cpl_table_delete(slits); \
115 printf("free polytraces (%p)\n", polytraces); \
116 cpl_table_delete(polytraces); \
117 printf("free lines (%p)\n", lines); \
118 cpl_vector_delete(lines); \
119 printf("free header (%p)\n", header); \
120 cpl_propertylist_delete(header); \
121 cpl_msg_indent_less(); \
139 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe );
140 cpl_plugin *plugin = &recipe->interface;
142 cpl_plugin_init(plugin,
145 CPL_PLUGIN_TYPE_RECIPE,
147 "Upgrade wavelength solution using sky lines",
148 fors_align_sky_description,
151 "This file is currently part of the FORS Instrument Pipeline\n"
152 "Copyright (C) 2002-2010 European Southern Observatory\n\n"
153 "This program is free software; you can redistribute it and/or modify\n"
154 "it under the terms of the GNU General Public License as published by\n"
155 "the Free Software Foundation; either version 2 of the License, or\n"
156 "(at your option) any later version.\n\n"
157 "This program is distributed in the hope that it will be useful,\n"
158 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
159 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
160 "GNU General Public License for more details.\n\n"
161 "You should have received a copy of the GNU General Public License\n"
162 "along with this program; if not, write to the Free Software Foundation,\n"
163 "Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n",
164 fors_align_sky_create,
166 fors_align_sky_destroy);
168 cpl_pluginlist_append(list, plugin);
184 static int fors_align_sky_create(cpl_plugin *plugin)
193 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
194 recipe = (cpl_recipe *)plugin;
202 recipe->parameters = cpl_parameterlist_new();
208 p = cpl_parameter_new_value(
"fors.fors_align_sky.dispersion",
210 "Expected spectral dispersion (Angstrom/pixel)",
211 "fors.fors_align_sky",
213 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dispersion");
214 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
215 cpl_parameterlist_append(recipe->parameters, p);
221 p = cpl_parameter_new_value(
"fors.fors_align_sky.startwavelength",
223 "Start wavelength in spectral extraction",
224 "fors.fors_align_sky",
226 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"startwavelength");
227 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
228 cpl_parameterlist_append(recipe->parameters, p);
234 p = cpl_parameter_new_value(
"fors.fors_align_sky.endwavelength",
236 "End wavelength in spectral extraction",
237 "fors.fors_align_sky",
239 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"endwavelength");
240 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
241 cpl_parameterlist_append(recipe->parameters, p);
247 p = cpl_parameter_new_value(
"fors.fors_align_sky.skyalign",
249 "Polynomial order for sky lines alignment",
250 "fors.fors_align_sky",
252 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"skyalign");
253 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
254 cpl_parameterlist_append(recipe->parameters, p);
260 p = cpl_parameter_new_value(
"fors.fors_align_sky.wcolumn",
262 "Name of sky line catalog table column "
264 "fors.fors_align_sky",
266 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"wcolumn");
267 cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
268 cpl_parameterlist_append(recipe->parameters, p);
282 static int fors_align_sky_exec(cpl_plugin *plugin)
286 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
287 recipe = (cpl_recipe *)plugin;
291 return fors_align_sky(recipe->parameters, recipe->frames);
303 static int fors_align_sky_destroy(cpl_plugin *plugin)
307 if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
308 recipe = (cpl_recipe *)plugin;
312 cpl_parameterlist_delete(recipe->parameters);
327 static int fors_align_sky(cpl_parameterlist *parlist,
328 cpl_frameset *frameset)
331 const char *recipe =
"fors_align_sky";
339 double startwavelength;
340 double endwavelength;
348 cpl_image *rainbow = NULL;
349 cpl_image *wavemap = NULL;
350 cpl_image *smapped = NULL;
351 cpl_image *coordinate = NULL;
352 cpl_table *grism_table = NULL;
353 cpl_table *wavelengths = NULL;
354 cpl_table *slits = NULL;
355 cpl_table *idscoeff = NULL;
356 cpl_table *polytraces = NULL;
357 cpl_table *maskslits = NULL;
358 cpl_table *offsets = NULL;
359 cpl_vector *lines = NULL;
360 cpl_propertylist *header = NULL;
367 const char *slit_location_tag;
368 const char *curv_coeff_tag;
369 const char *rectified_tag;
370 const char *wavemap_tag;
371 const char *shifts_tag;
372 const char *disp_ali_tag;
373 const char *disp_coeff_tag;
374 const char *spatial_map_tag;
390 int nslits_out_det = 0;
393 char *instrume = NULL;
396 cpl_msg_set_indentation(2);
403 cpl_msg_info(recipe,
"Recipe %s configuration parameters:", recipe);
404 cpl_msg_indent_more();
406 if (cpl_frameset_count_tags(frameset,
"GRISM_TABLE") > 1)
407 fors_align_sky_exit(
"Too many in input: GRISM_TABLE");
412 "fors.fors_align_sky.dispersion", grism_table);
414 if (dispersion <= 0.0)
415 fors_align_sky_exit(
"Invalid spectral dispersion value");
418 "fors.fors_align_sky.startwavelength", grism_table);
419 if (startwavelength > 1.0)
420 if (startwavelength < 3000.0 || startwavelength > 13000.0)
421 fors_align_sky_exit(
"Invalid wavelength");
424 "fors.fors_align_sky.endwavelength", grism_table);
425 if (endwavelength > 1.0) {
426 if (endwavelength < 3000.0 || endwavelength > 13000.0)
427 fors_align_sky_exit(
"Invalid wavelength");
428 if (startwavelength < 1.0)
429 fors_align_sky_exit(
"Invalid wavelength interval");
432 if (startwavelength > 1.0)
433 if (endwavelength - startwavelength <= 0.0)
434 fors_align_sky_exit(
"Invalid wavelength interval");
437 "fors.fors_align_sky.skyalign", NULL);
440 fors_align_sky_exit(
"Invalid polynomial degree");
442 fors_align_sky_exit(
"Max polynomial degree for sky alignment is 2");
445 "fors.fors_align_sky.wcolumn", NULL);
447 cpl_table_delete(grism_table); grism_table = NULL;
449 if (cpl_error_get_code())
450 fors_align_sky_exit(
"Failure reading the configuration parameters");
453 cpl_msg_indent_less();
454 cpl_msg_info(recipe,
"Check input set-of-frames:");
455 cpl_msg_indent_more();
457 mxu = cpl_frameset_count_tags(frameset,
"SPATIAL_MAP_MXU");
458 mos = cpl_frameset_count_tags(frameset,
"SPATIAL_MAP_MOS");
463 fors_align_sky_exit(
"Missing input spatial map");
466 cpl_msg_error(recipe,
467 "Too many input spatial maps (%d > 1)", nframes);
468 fors_align_sky_exit(NULL);
472 rec_scia = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_SCI_MXU");
473 rec_stda = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_STD_MXU");
474 rec_scis = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_SCI_MXU");
475 rec_stds = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_STD_MXU");
478 rec_scia = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_SCI_MOS");
479 rec_stda = cpl_frameset_count_tags(frameset,
"RECTIFIED_ALL_STD_MOS");
480 rec_scis = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_SCI_MOS");
481 rec_stds = cpl_frameset_count_tags(frameset,
"RECTIFIED_SKY_STD_MOS");
484 nframes = rec_scia + rec_stda + rec_scis + rec_stds;
487 fors_align_sky_exit(
"Missing input rectified scientific spectra");
490 cpl_msg_error(recipe,
491 "Too many input rectified scientific spectra (%d > 1)",
493 fors_align_sky_exit(NULL);
496 if (cpl_frameset_count_tags(frameset,
"MASTER_SKYLINECAT") > 1)
497 fors_align_sky_exit(
"Too many in input: MASTER_SKYLINECAT");
501 rectified_tag =
"RECTIFIED_ALL_SCI_MXU";
502 wavemap_tag =
"WAVELENGTH_MAP_SCI_MXU";
503 shifts_tag =
"SKY_SHIFTS_SLIT_SCI_MXU";
504 disp_ali_tag =
"DISP_COEFF_SCI_MXU";
507 rectified_tag =
"RECTIFIED_ALL_SCI_MOS";
508 wavemap_tag =
"WAVELENGTH_MAP_SCI_MOS";
509 shifts_tag =
"SKY_SHIFTS_SLIT_SCI_MOS";
510 disp_ali_tag =
"DISP_COEFF_SCI_MOS";
515 rectified_tag =
"RECTIFIED_ALL_STD_MXU";
516 wavemap_tag =
"WAVELENGTH_MAP_STD_MXU";
517 shifts_tag =
"SKY_SHIFTS_SLIT_STD_MXU";
518 disp_ali_tag =
"DISP_COEFF_STD_MXU";
521 rectified_tag =
"RECTIFIED_ALL_STD_MOS";
522 wavemap_tag =
"WAVELENGTH_MAP_STD_MOS";
523 shifts_tag =
"SKY_SHIFTS_SLIT_STD_MOS";
524 disp_ali_tag =
"DISP_COEFF_STD_MOS";
529 rectified_tag =
"RECTIFIED_SKY_SCI_MXU";
530 wavemap_tag =
"WAVELENGTH_MAP_SCI_MXU";
531 shifts_tag =
"SKY_SHIFTS_SLIT_SCI_MXU";
532 disp_ali_tag =
"DISP_COEFF_SCI_MXU";
535 rectified_tag =
"RECTIFIED_SKY_SCI_MOS";
536 wavemap_tag =
"WAVELENGTH_MAP_SCI_MOS";
537 shifts_tag =
"SKY_SHIFTS_SLIT_SCI_MOS";
538 disp_ali_tag =
"DISP_COEFF_SCI_MOS";
543 rectified_tag =
"RECTIFIED_SKY_STD_MXU";
544 wavemap_tag =
"WAVELENGTH_MAP_STD_MXU";
545 shifts_tag =
"SKY_SHIFTS_SLIT_STD_MXU";
546 disp_ali_tag =
"DISP_COEFF_STD_MXU";
549 rectified_tag =
"RECTIFIED_SKY_STD_MOS";
550 wavemap_tag =
"WAVELENGTH_MAP_STD_MOS";
551 shifts_tag =
"SKY_SHIFTS_SLIT_STD_MOS";
552 disp_ali_tag =
"DISP_COEFF_STD_MOS";
558 disp_coeff_tag =
"DISP_COEFF_MXU";
559 curv_coeff_tag =
"CURV_COEFF_MXU";
560 slit_location_tag =
"SLIT_LOCATION_MXU";
561 spatial_map_tag =
"SPATIAL_MAP_MXU";
564 disp_coeff_tag =
"DISP_COEFF_MOS";
565 curv_coeff_tag =
"CURV_COEFF_MOS";
566 slit_location_tag =
"SLIT_LOCATION_MOS";
567 spatial_map_tag =
"SPATIAL_MAP_MOS";
570 nframes = cpl_frameset_count_tags(frameset, disp_coeff_tag);
573 cpl_msg_error(recipe,
"Missing input %s\n", disp_coeff_tag);
574 fors_align_sky_exit(NULL);
577 cpl_msg_error(recipe,
578 "Too many input %s (%d > 1)", disp_coeff_tag, nframes);
579 fors_align_sky_exit(NULL);
582 nframes = cpl_frameset_count_tags(frameset, curv_coeff_tag);
585 cpl_msg_error(recipe,
"Missing input %s\n", curv_coeff_tag);
586 fors_align_sky_exit(NULL);
589 cpl_msg_error(recipe,
590 "Too many input %s (%d > 1)", curv_coeff_tag, nframes);
591 fors_align_sky_exit(NULL);
594 nframes = cpl_frameset_count_tags(frameset, spatial_map_tag);
597 cpl_msg_error(recipe,
"Missing input %s\n", spatial_map_tag);
598 fors_align_sky_exit(NULL);
601 cpl_msg_error(recipe,
602 "Too many input %s (%d > 1)", spatial_map_tag, nframes);
603 fors_align_sky_exit(NULL);
610 fors_align_sky_exit(
"Cannot load spatial map header");
621 treat_as_lss = fors_mos_is_lss_like(maskslits, nslits_out_det);
623 cpl_table_delete(maskslits); maskslits = NULL;
626 cpl_msg_error(recipe,
"All slits have the same offset: %.2f mm\n"
627 "The LSS data reduction strategy must be applied. "
628 "Please use recipe fors_align_sky_lss.", mxpos);
629 fors_align_sky_exit(NULL);
633 fors_align_sky_exit(
"Input frames are not from the same grism");
636 fors_align_sky_exit(
"Input frames are not from the same filter");
639 fors_align_sky_exit(
"Input frames are not from the same chip");
647 instrume = (
char *)cpl_propertylist_get_string(header,
"INSTRUME");
648 if (instrume == NULL)
649 fors_align_sky_exit(
"Missing keyword INSTRUME in reference frame "
652 if (instrume[4] ==
'1')
653 snprintf(version, 80,
"%s/%s",
"fors1", VERSION);
654 if (instrume[4] ==
'2')
655 snprintf(version, 80,
"%s/%s",
"fors2", VERSION);
657 reference = cpl_propertylist_get_double(header,
"ESO INS GRIS1 WLEN");
659 if (cpl_error_get_code() != CPL_ERROR_NONE)
660 fors_align_sky_exit(
"Missing keyword ESO INS GRIS1 WLEN "
661 "in reference frame header");
663 if (reference < 3000.0)
666 if (reference < 3000.0 || reference > 13000.0) {
667 cpl_msg_error(recipe,
"Invalid central wavelength %.2f read from "
668 "keyword ESO INS GRIS1 WLEN in reference frame header",
670 fors_align_sky_exit(NULL);
673 cpl_msg_info(recipe,
"The central wavelength is: %.2f", reference);
675 rebin = cpl_propertylist_get_int(header,
"ESO DET WIN1 BINX");
677 if (cpl_error_get_code() != CPL_ERROR_NONE)
678 fors_align_sky_exit(
"Missing keyword ESO DET WIN1 BINX "
679 "in reference frame header");
683 cpl_msg_warning(recipe,
"The rebin factor is %d, and therefore the "
684 "working dispersion used is %f A/pixel", rebin,
688 cpl_msg_indent_less();
689 cpl_msg_info(recipe,
"Load input frames...");
690 cpl_msg_indent_more();
693 CPL_TYPE_FLOAT, 0, 0);
694 if (coordinate == NULL)
695 fors_align_sky_exit(
"Cannot load input reference frame");
699 fors_align_sky_exit(
"Cannot load slits location table");
702 if (polytraces == NULL)
703 fors_align_sky_exit(
"Cannot load spectral curvature table");
706 if (idscoeff == NULL)
707 fors_align_sky_exit(
"Cannot load dispersion solution");
709 smapped =
dfs_load_image(frameset, rectified_tag, CPL_TYPE_FLOAT, 0, 0);
711 fors_align_sky_exit(
"Cannot load input rectified frame");
721 nlines = cpl_table_get_nrow(wavelengths);
724 fors_align_sky_exit(
"Empty input sky line catalog");
726 if (cpl_table_has_column(wavelengths, wcolumn) != 1) {
727 cpl_msg_error(recipe,
"Missing column %s in input line "
728 "catalog table", wcolumn);
729 fors_align_sky_exit(NULL);
732 line = cpl_malloc(nlines *
sizeof(
double));
734 for (i = 0; i < nlines; i++)
735 line[i] = cpl_table_get(wavelengths, wcolumn, i, NULL);
737 cpl_table_delete(wavelengths); wavelengths = NULL;
739 lines = cpl_vector_wrap(nlines, line);
742 cpl_msg_info(recipe,
"No sky line catalog found in input - fine!");
746 cpl_msg_info(recipe,
"Align wavelength solution to reference "
747 "skylines applying %d order residual fit...", skyalign);
750 cpl_msg_info(recipe,
"Align wavelength solution to reference "
751 "skylines applying median offset...");
754 if (dispersion > 1.0)
759 nx = cpl_image_get_size_x(coordinate);
765 startwavelength, endwavelength,
766 idscoeff, lines, highres, skyalign,
769 cpl_vector_delete(lines); lines = NULL;
770 cpl_image_delete(smapped); smapped = NULL;
774 parlist, recipe, version))
775 fors_align_sky_exit(NULL);
777 cpl_table_delete(offsets); offsets = NULL;
780 fors_align_sky_exit(
"Alignment of the wavelength solution "
781 "to reference sky lines could not be done!");
784 parlist, recipe, version))
785 fors_align_sky_exit(NULL);
787 cpl_table_delete(idscoeff); idscoeff = NULL;
790 polytraces, reference,
791 startwavelength, endwavelength,
794 cpl_image_delete(rainbow); rainbow = NULL;
795 cpl_image_delete(coordinate); coordinate = NULL;
796 cpl_table_delete(polytraces); polytraces = NULL;
797 cpl_table_delete(slits); slits = NULL;
800 header, parlist, recipe, version))
801 fors_align_sky_exit(NULL);
803 cpl_image_delete(wavemap); wavemap = NULL;
804 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_image * mos_map_wavelengths(cpl_image *spatial, cpl_image *calibration, cpl_table *slits, cpl_table *polytraces, double reference, double blue, double red, double dispersion)
Remapping of spatially rectified wavelengths to original CCD pixels.
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.
cpl_table * mos_wavelength_align(cpl_image *image, cpl_table *slits, 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.
int dfs_equal_keyword(cpl_frameset *frameset, const char *keyword)
Saving table data of given category.
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.