35 #include "muse_exp_combine_z.h" 52 static const char *muse_exp_combine_help =
53 "Sort reduced pixel tables, one per exposure, by exposure and combine them with applied weights into one final datacube.";
55 static const char *muse_exp_combine_help_esorex =
56 "\n\nInput frames for raw frame tag \"PIXTABLE_REDUCED\":\n" 57 "\n Frame tag Type Req #Fr Description" 58 "\n -------------------- ---- --- --- ------------" 59 "\n PIXTABLE_REDUCED raw Y >=2 Input pixel tables" 60 "\n OFFSET_LIST calib . 1 List of coordinate offsets (and optional flux scale factors)" 61 "\n FILTER_LIST calib . 1 File to be used to create field-of-view images." 62 "\n OUTPUT_WCS calib . 1 WCS to override output cube location / dimensions" 63 "\n\nProduct frames for raw frame tag \"PIXTABLE_REDUCED\":\n" 64 "\n Frame tag Level Description" 65 "\n -------------------- -------- ------------" 66 "\n DATACUBE_FINAL final Output datacube (if --save contains \"cube\")" 67 "\n IMAGE_FOV final Field-of-view images corresponding to the \"filter\" parameter (if --save contains \"cube\")." 68 "\n PIXTABLE_COMBINED intermed Combined pixel table (if --save contains \"combined\")";
79 static cpl_recipeconfig *
80 muse_exp_combine_new_recipeconfig(
void)
82 cpl_recipeconfig *recipeconfig = cpl_recipeconfig_new();
84 cpl_recipeconfig_set_tag(recipeconfig,
"PIXTABLE_REDUCED", 2, -1);
85 cpl_recipeconfig_set_input(recipeconfig,
"PIXTABLE_REDUCED",
"OFFSET_LIST", -1, 1);
86 cpl_recipeconfig_set_input(recipeconfig,
"PIXTABLE_REDUCED",
"FILTER_LIST", -1, 1);
87 cpl_recipeconfig_set_input(recipeconfig,
"PIXTABLE_REDUCED",
"OUTPUT_WCS", -1, 1);
88 cpl_recipeconfig_set_output(recipeconfig,
"PIXTABLE_REDUCED",
"DATACUBE_FINAL");
89 cpl_recipeconfig_set_output(recipeconfig,
"PIXTABLE_REDUCED",
"IMAGE_FOV");
90 cpl_recipeconfig_set_output(recipeconfig,
"PIXTABLE_REDUCED",
"PIXTABLE_COMBINED");
106 static cpl_error_code
107 muse_exp_combine_prepare_header(
const char *aFrametag, cpl_propertylist *aHeader)
109 cpl_ensure_code(aFrametag, CPL_ERROR_NULL_INPUT);
110 cpl_ensure_code(aHeader, CPL_ERROR_NULL_INPUT);
111 if (!strcmp(aFrametag,
"DATACUBE_FINAL")) {
114 "Number of detected sources in combined cube.");
117 "[Angstrom] Wavelength of plane in combined cube that was used for object detection.");
120 "[pix] Position of source k in x-direction in combined cube. If the FWHM measurement fails, this value will be -1.");
123 "[pix] Position of source k in y-direction in combined cube. If the FWHM measurement fails, this value will be -1.");
126 "[arcsec] FWHM of source k in x-direction in combined cube. If the FWHM measurement fails, this value will be -1.");
129 "[arcsec] FWHM of source k in y-direction in combined cube. If the FWHM measurement fails, this value will be -1.");
132 "Number of detected sources with valid FWHM in combined cube.");
135 "[arcsec] Median FWHM of all sources with valid FWHM measurement (in x- and y-direction) in combined cube. If less than three sources with valid FWHM are detected, this value is zero.");
138 "[arcsec] Median absolute deviation of the FWHM of all sources with valid FWHM measurement (in x- and y-direction) in combined cube. If less than three sources with valid FWHM are detected, this value is zero.");
139 }
else if (!strcmp(aFrametag,
"IMAGE_FOV")) {
140 }
else if (!strcmp(aFrametag,
"PIXTABLE_COMBINED")) {
142 cpl_msg_warning(__func__,
"Frame tag %s is not defined", aFrametag);
143 return CPL_ERROR_ILLEGAL_INPUT;
145 return CPL_ERROR_NONE;
158 static cpl_frame_level
159 muse_exp_combine_get_frame_level(
const char *aFrametag)
162 return CPL_FRAME_LEVEL_NONE;
164 if (!strcmp(aFrametag,
"DATACUBE_FINAL")) {
165 return CPL_FRAME_LEVEL_FINAL;
167 if (!strcmp(aFrametag,
"IMAGE_FOV")) {
168 return CPL_FRAME_LEVEL_FINAL;
170 if (!strcmp(aFrametag,
"PIXTABLE_COMBINED")) {
171 return CPL_FRAME_LEVEL_INTERMEDIATE;
173 return CPL_FRAME_LEVEL_NONE;
187 muse_exp_combine_get_frame_mode(
const char *aFrametag)
192 if (!strcmp(aFrametag,
"DATACUBE_FINAL")) {
195 if (!strcmp(aFrametag,
"IMAGE_FOV")) {
198 if (!strcmp(aFrametag,
"PIXTABLE_COMBINED")) {
216 muse_exp_combine_create(cpl_plugin *aPlugin)
220 if (cpl_plugin_get_type(aPlugin) == CPL_PLUGIN_TYPE_RECIPE) {
221 recipe = (cpl_recipe *)aPlugin;
229 muse_exp_combine_new_recipeconfig(),
230 muse_exp_combine_prepare_header,
231 muse_exp_combine_get_frame_level,
232 muse_exp_combine_get_frame_mode);
237 cpl_msg_set_time_on();
241 recipe->parameters = cpl_parameterlist_new();
246 p = cpl_parameter_new_value(
"muse.muse_exp_combine.save",
248 "Select output product(s) to save. Can contain one or more of \"cube\" (output cube and associated images; if this is not given, no resampling is done at all) or \"combined\" (fully reduced and combined pixel table for the full set of exposures; this is useful, if the final resampling step is to be done again separately). If several options are given, they have to be comma-separated.",
249 "muse.muse_exp_combine",
250 (
const char *)
"cube");
251 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"save");
252 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"save");
254 cpl_parameterlist_append(recipe->parameters, p);
257 p = cpl_parameter_new_enum(
"muse.muse_exp_combine.resample",
259 "The resampling technique to use for the final output cube.",
260 "muse.muse_exp_combine",
261 (
const char *)
"drizzle",
263 (
const char *)
"nearest",
264 (
const char *)
"linear",
265 (
const char *)
"quadratic",
266 (
const char *)
"renka",
267 (
const char *)
"drizzle",
268 (
const char *)
"lanczos");
269 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"resample");
270 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"resample");
272 cpl_parameterlist_append(recipe->parameters, p);
275 p = cpl_parameter_new_value(
"muse.muse_exp_combine.dx",
277 "Horizontal step size for resampling (in arcsec or pixel). The following defaults are taken when this value is set to 0.0: 0.2'' for WFM, 0.075'' for NFM, 1.0 if data is in pixel units.",
278 "muse.muse_exp_combine",
280 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"dx");
281 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dx");
283 cpl_parameterlist_append(recipe->parameters, p);
286 p = cpl_parameter_new_value(
"muse.muse_exp_combine.dy",
288 "Vertical step size for resampling (in arcsec or pixel). The following defaults are taken when this value is set to 0.0: 0.2'' for WFM, 0.075'' for NFM, 1.0 if data is in pixel units.",
289 "muse.muse_exp_combine",
291 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"dy");
292 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dy");
294 cpl_parameterlist_append(recipe->parameters, p);
297 p = cpl_parameter_new_value(
"muse.muse_exp_combine.dlambda",
299 "Wavelength step size (in Angstrom). Natural instrument sampling is used, if this is 0.0",
300 "muse.muse_exp_combine",
302 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"dlambda");
303 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"dlambda");
305 cpl_parameterlist_append(recipe->parameters, p);
308 p = cpl_parameter_new_enum(
"muse.muse_exp_combine.crtype",
310 "Type of statistics used for detection of cosmic rays during final resampling. \"iraf\" uses the variance information, \"mean\" uses standard (mean/stdev) statistics, \"median\" uses median and the median median of the absolute median deviation.",
311 "muse.muse_exp_combine",
312 (
const char *)
"median",
314 (
const char *)
"iraf",
315 (
const char *)
"mean",
316 (
const char *)
"median");
317 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"crtype");
318 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"crtype");
320 cpl_parameterlist_append(recipe->parameters, p);
323 p = cpl_parameter_new_value(
"muse.muse_exp_combine.crsigma",
325 "Sigma rejection factor to use for cosmic ray rejection during final resampling. A zero or negative value switches cosmic ray rejection off.",
326 "muse.muse_exp_combine",
328 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"crsigma");
329 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"crsigma");
331 cpl_parameterlist_append(recipe->parameters, p);
334 p = cpl_parameter_new_value(
"muse.muse_exp_combine.rc",
336 "Critical radius for the \"renka\" resampling method.",
337 "muse.muse_exp_combine",
339 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"rc");
340 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"rc");
342 cpl_parameterlist_append(recipe->parameters, p);
345 p = cpl_parameter_new_value(
"muse.muse_exp_combine.pixfrac",
347 "Pixel down-scaling factor for the \"drizzle\" resampling method. Up to three, comma-separated, floating-point values can be given. If only one value is given, it applies to all dimensions, two values are interpreted as spatial and spectral direction, respectively, while three are taken as horizontal, vertical, and spectral.",
348 "muse.muse_exp_combine",
349 (
const char *)
"0.6,0.6");
350 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"pixfrac");
351 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"pixfrac");
353 cpl_parameterlist_append(recipe->parameters, p);
356 p = cpl_parameter_new_value(
"muse.muse_exp_combine.ld",
358 "Number of adjacent pixels to take into account during resampling in all three directions (loop distance); this affects all resampling methods except \"nearest\".",
359 "muse.muse_exp_combine",
361 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"ld");
362 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"ld");
364 cpl_parameterlist_append(recipe->parameters, p);
367 p = cpl_parameter_new_enum(
"muse.muse_exp_combine.format",
369 "Type of output file format, \"Cube\" is a standard FITS cube with NAXIS=3 and multiple extensions (for data and variance). The extended \"x\" formats include the reconstructed image(s) in FITS image extensions within the same file. \"sdpCube\" does some extra calculations to create FITS keywords for the ESO Science Data Products.",
370 "muse.muse_exp_combine",
371 (
const char *)
"Cube",
373 (
const char *)
"Cube",
374 (
const char *)
"Euro3D",
375 (
const char *)
"xCube",
376 (
const char *)
"xEuro3D",
377 (
const char *)
"sdpCube");
378 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"format");
379 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"format");
381 cpl_parameterlist_append(recipe->parameters, p);
384 p = cpl_parameter_new_enum(
"muse.muse_exp_combine.weight",
386 "Type of weighting scheme to use when combining multiple exposures. \"exptime\" just uses the exposure time to weight the exposures, \"fwhm\" uses the best available seeing information from the headers as well, \"none\" preserves an existing weight column in the input pixel tables without changes.",
387 "muse.muse_exp_combine",
388 (
const char *)
"exptime",
390 (
const char *)
"exptime",
391 (
const char *)
"fwhm",
392 (
const char *)
"none");
393 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"weight");
394 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"weight");
396 cpl_parameterlist_append(recipe->parameters, p);
399 p = cpl_parameter_new_value(
"muse.muse_exp_combine.filter",
401 "The filter name(s) to be used for the output field-of-view image. Each name has to correspond to an EXTNAME in an extension of the FILTER_LIST file. If an unsupported filter name is given, creation of the respective image is omitted. If multiple filter names are given, they have to be comma separated.",
402 "muse.muse_exp_combine",
403 (
const char *)
"white");
404 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"filter");
405 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"filter");
407 cpl_parameterlist_append(recipe->parameters, p);
410 p = cpl_parameter_new_value(
"muse.muse_exp_combine.lambdamin",
412 "Cut off the data below this wavelength after loading the pixel table(s).",
413 "muse.muse_exp_combine",
415 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"lambdamin");
416 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"lambdamin");
418 cpl_parameterlist_append(recipe->parameters, p);
421 p = cpl_parameter_new_value(
"muse.muse_exp_combine.lambdamax",
423 "Cut off the data above this wavelength after loading the pixel table(s).",
424 "muse.muse_exp_combine",
426 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG,
"lambdamax");
427 cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI,
"lambdamax");
429 cpl_parameterlist_append(recipe->parameters, p);
449 cpl_ensure_code(aParams, CPL_ERROR_NULL_INPUT);
450 cpl_ensure_code(aParameters, CPL_ERROR_NULL_INPUT);
453 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.save");
454 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
455 aParams->
save = cpl_parameter_get_string(p);
457 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.resample");
458 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
459 aParams->
resample_s = cpl_parameter_get_string(p);
461 (!strcasecmp(aParams->
resample_s,
"nearest")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_NEAREST :
462 (!strcasecmp(aParams->
resample_s,
"linear")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_LINEAR :
463 (!strcasecmp(aParams->
resample_s,
"quadratic")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_QUADRATIC :
464 (!strcasecmp(aParams->
resample_s,
"renka")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_RENKA :
465 (!strcasecmp(aParams->
resample_s,
"drizzle")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_DRIZZLE :
466 (!strcasecmp(aParams->
resample_s,
"lanczos")) ? MUSE_EXP_COMBINE_PARAM_RESAMPLE_LANCZOS :
467 MUSE_EXP_COMBINE_PARAM_RESAMPLE_INVALID_VALUE;
468 cpl_ensure_code(aParams->
resample != MUSE_EXP_COMBINE_PARAM_RESAMPLE_INVALID_VALUE,
469 CPL_ERROR_ILLEGAL_INPUT);
471 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.dx");
472 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
473 aParams->
dx = cpl_parameter_get_double(p);
475 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.dy");
476 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
477 aParams->
dy = cpl_parameter_get_double(p);
479 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.dlambda");
480 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
481 aParams->
dlambda = cpl_parameter_get_double(p);
483 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.crtype");
484 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
485 aParams->
crtype_s = cpl_parameter_get_string(p);
487 (!strcasecmp(aParams->
crtype_s,
"iraf")) ? MUSE_EXP_COMBINE_PARAM_CRTYPE_IRAF :
488 (!strcasecmp(aParams->
crtype_s,
"mean")) ? MUSE_EXP_COMBINE_PARAM_CRTYPE_MEAN :
489 (!strcasecmp(aParams->
crtype_s,
"median")) ? MUSE_EXP_COMBINE_PARAM_CRTYPE_MEDIAN :
490 MUSE_EXP_COMBINE_PARAM_CRTYPE_INVALID_VALUE;
491 cpl_ensure_code(aParams->
crtype != MUSE_EXP_COMBINE_PARAM_CRTYPE_INVALID_VALUE,
492 CPL_ERROR_ILLEGAL_INPUT);
494 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.crsigma");
495 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
496 aParams->
crsigma = cpl_parameter_get_double(p);
498 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.rc");
499 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
500 aParams->
rc = cpl_parameter_get_double(p);
502 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.pixfrac");
503 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
504 aParams->
pixfrac = cpl_parameter_get_string(p);
506 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.ld");
507 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
508 aParams->
ld = cpl_parameter_get_int(p);
510 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.format");
511 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
512 aParams->
format_s = cpl_parameter_get_string(p);
514 (!strcasecmp(aParams->
format_s,
"Cube")) ? MUSE_EXP_COMBINE_PARAM_FORMAT_CUBE :
515 (!strcasecmp(aParams->
format_s,
"Euro3D")) ? MUSE_EXP_COMBINE_PARAM_FORMAT_EURO3D :
516 (!strcasecmp(aParams->
format_s,
"xCube")) ? MUSE_EXP_COMBINE_PARAM_FORMAT_XCUBE :
517 (!strcasecmp(aParams->
format_s,
"xEuro3D")) ? MUSE_EXP_COMBINE_PARAM_FORMAT_XEURO3D :
518 (!strcasecmp(aParams->
format_s,
"sdpCube")) ? MUSE_EXP_COMBINE_PARAM_FORMAT_SDPCUBE :
519 MUSE_EXP_COMBINE_PARAM_FORMAT_INVALID_VALUE;
520 cpl_ensure_code(aParams->
format != MUSE_EXP_COMBINE_PARAM_FORMAT_INVALID_VALUE,
521 CPL_ERROR_ILLEGAL_INPUT);
523 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.weight");
524 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
525 aParams->
weight_s = cpl_parameter_get_string(p);
527 (!strcasecmp(aParams->
weight_s,
"exptime")) ? MUSE_EXP_COMBINE_PARAM_WEIGHT_EXPTIME :
528 (!strcasecmp(aParams->
weight_s,
"fwhm")) ? MUSE_EXP_COMBINE_PARAM_WEIGHT_FWHM :
529 (!strcasecmp(aParams->
weight_s,
"none")) ? MUSE_EXP_COMBINE_PARAM_WEIGHT_NONE :
530 MUSE_EXP_COMBINE_PARAM_WEIGHT_INVALID_VALUE;
531 cpl_ensure_code(aParams->
weight != MUSE_EXP_COMBINE_PARAM_WEIGHT_INVALID_VALUE,
532 CPL_ERROR_ILLEGAL_INPUT);
534 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.filter");
535 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
536 aParams->
filter = cpl_parameter_get_string(p);
538 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.lambdamin");
539 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
540 aParams->
lambdamin = cpl_parameter_get_double(p);
542 p = cpl_parameterlist_find(aParameters,
"muse.muse_exp_combine.lambdamax");
543 cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
544 aParams->
lambdamax = cpl_parameter_get_double(p);
558 muse_exp_combine_exec(cpl_plugin *aPlugin)
560 if (cpl_plugin_get_type(aPlugin) != CPL_PLUGIN_TYPE_RECIPE) {
564 cpl_recipe *recipe = (cpl_recipe *)aPlugin;
565 cpl_msg_set_threadid_on();
567 cpl_frameset *usedframes = cpl_frameset_new(),
568 *outframes = cpl_frameset_new();
570 muse_exp_combine_params_fill(¶ms, recipe->parameters);
572 cpl_errorstate prestate = cpl_errorstate_get();
576 int rc = muse_exp_combine_compute(proc, ¶ms);
577 cpl_frameset_join(usedframes, proc->
usedframes);
578 cpl_frameset_join(outframes, proc->
outframes);
581 if (!cpl_errorstate_is_equal(prestate)) {
585 cpl_msg_set_level(CPL_MSG_INFO);
596 cpl_frameset_join(recipe->frames, usedframes);
597 cpl_frameset_join(recipe->frames, outframes);
598 cpl_frameset_delete(usedframes);
599 cpl_frameset_delete(outframes);
612 muse_exp_combine_destroy(cpl_plugin *aPlugin)
616 if (cpl_plugin_get_type(aPlugin) == CPL_PLUGIN_TYPE_RECIPE) {
617 recipe = (cpl_recipe *)aPlugin;
623 cpl_parameterlist_delete(recipe->parameters);
640 cpl_plugin_get_info(cpl_pluginlist *aList)
642 cpl_recipe *recipe = cpl_calloc(1,
sizeof *recipe);
643 cpl_plugin *plugin = &recipe->interface;
647 helptext = cpl_sprintf(
"%s%s", muse_exp_combine_help,
648 muse_exp_combine_help_esorex);
650 helptext = cpl_sprintf(
"%s", muse_exp_combine_help);
654 cpl_plugin_init(plugin, CPL_PLUGIN_API, MUSE_BINARY_VERSION,
655 CPL_PLUGIN_TYPE_RECIPE,
657 "Combine several exposures into one datacube.",
662 muse_exp_combine_create,
663 muse_exp_combine_exec,
664 muse_exp_combine_destroy);
665 cpl_pluginlist_append(aList, plugin);
void muse_processing_delete(muse_processing *aProcessing)
Free the muse_processing structure.
int ld
Number of adjacent pixels to take into account during resampling in all three directions (loop distan...
const char * crtype_s
Type of statistics used for detection of cosmic rays during final resampling. "iraf" uses the varianc...
const char * resample_s
The resampling technique to use for the final output cube. (as string)
const char * pixfrac
Pixel down-scaling factor for the "drizzle" resampling method. Up to three, comma-separated, floating-point values can be given. If only one value is given, it applies to all dimensions, two values are interpreted as spatial and spectral direction, respectively, while three are taken as horizontal, vertical, and spectral.
muse_cplframework_type muse_cplframework(void)
Return the CPL framework the recipe is run under.
double crsigma
Sigma rejection factor to use for cosmic ray rejection during final resampling. A zero or negative va...
const char * format_s
Type of output file format, "Cube" is a standard FITS cube with NAXIS=3 and multiple extensions (for ...
int format
Type of output file format, "Cube" is a standard FITS cube with NAXIS=3 and multiple extensions (for ...
cpl_frameset * usedframes
muse_processing * muse_processing_new(const char *aName, cpl_recipe *aRecipe)
Create a new processing structure.
double dy
Vertical step size for resampling (in arcsec or pixel). The following defaults are taken when this va...
const char * muse_get_license(void)
Get the pipeline copyright and license.
Structure to hold the parameters of the muse_exp_combine recipe.
const char * weight_s
Type of weighting scheme to use when combining multiple exposures. "exptime" just uses the exposure t...
int crtype
Type of statistics used for detection of cosmic rays during final resampling. "iraf" uses the varianc...
double lambdamax
Cut off the data above this wavelength after loading the pixel table(s).
int weight
Type of weighting scheme to use when combining multiple exposures. "exptime" just uses the exposure t...
const char * filter
The filter name(s) to be used for the output field-of-view image. Each name has to correspond to an E...
void muse_cplerrorstate_dump_some(unsigned aCurrent, unsigned aFirst, unsigned aLast)
Dump some CPL errors.
void muse_processinginfo_delete(cpl_recipe *)
Clear all information from the processing info and from the recipe config.
int resample
The resampling technique to use for the final output cube.
double lambdamin
Cut off the data below this wavelength after loading the pixel table(s).
const char * save
Select output product(s) to save. Can contain one or more of "cube" (output cube and associated image...
double dlambda
Wavelength step size (in Angstrom). Natural instrument sampling is used, if this is 0...
double dx
Horizontal step size for resampling (in arcsec or pixel). The following defaults are taken when this ...
cpl_error_code muse_cplframeset_erase_duplicate(cpl_frameset *aFrames)
Erase all duplicate frames from a frameset.
cpl_error_code muse_cplframeset_erase_all(cpl_frameset *aFrames)
Erase all frames in a frameset.
double rc
Critical radius for the "renka" resampling method.
void muse_processinginfo_register(cpl_recipe *, cpl_recipeconfig *, muse_processing_prepare_header_func *, muse_processing_get_frame_level_func *, muse_processing_get_frame_mode_func *)
Register extended functionalities for MUSE recipes.
void muse_processing_recipeinfo(cpl_plugin *)
Output main pipeline configuration, inputs, and parameters.
cpl_error_code muse_processing_prepare_property(cpl_propertylist *, const char *, cpl_type, const char *)
Prepare and check the specified property.