MUSE Pipeline Reference Manual  1.0.2
muse_standard_z.c
1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:set sw=2 sts=2 et cin: */
3 /*
4  * This file is part of the MUSE Instrument Pipeline
5  * Copyright (C) 2005-2014 European Southern Observatory
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 /* This file was automatically generated */
23 
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
27 
28 /*----------------------------------------------------------------------------*
29  * Includes *
30  *----------------------------------------------------------------------------*/
31 #include <string.h> /* strcmp(), strstr() */
32 #include <strings.h> /* strcasecmp() */
33 #include <cpl.h>
34 
35 #include "muse_standard_z.h" /* in turn includes muse.h */
36 
37 /*----------------------------------------------------------------------------*/
65 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*
69  * Static variables *
70  *----------------------------------------------------------------------------*/
71 static const char *muse_standard_help =
72  "Merge pixel tables from all IFUs and correct for differential atmospheric refraction. To derive the flux response curve, integrate the flux of all objects detected within the field of view using the given profile. Select one object as the standard star (either the brightest or the one nearest one, depending on --select) and compare its measured fluxes to tabulated fluxes to derive the sensitivity over wavelength. Postprocess this sensitivity curve to mark wavelength ranges affected by telluric absorption. Interpolate over the telluric regions and derive a telluric correction spectrum for them. The final response cuve is then linearly extrapolated to the largest possible MUSE wavelength range and smoothed (with the method given by --smooth). The derivation of the telluric correction spectrum assumes that the star has a smooth spectrum within the telluric regions. If there are more than one exposure given in the input data, the derivation of the flux response and telluric corrections are done separately for each exposure. For each exposure, the datacube used for flux integration is saved, together with collapsed images for each given filter.";
73 
74 static const char *muse_standard_help_esorex =
75  "\n\nInput frames for raw frame tag \"PIXTABLE_STD\":\n"
76  "\n Frame tag Type Req #Fr Description"
77  "\n -------------------- ---- --- --- ------------"
78  "\n PIXTABLE_STD raw Y Pixel table of a standard star field"
79  "\n EXTINCT_TABLE calib Y 1 Atmospheric extinction table"
80  "\n STD_FLUX_TABLE calib Y Flux reference table for standard stars"
81  "\n TELLURIC_REGIONS calib . 1 Definition of telluric regions"
82  "\n FILTER_LIST calib . 1 File to be used to create field-of-view images."
83  "\n\nProduct frames for raw frame tag \"PIXTABLE_STD\":\n"
84  "\n Frame tag Level Description"
85  "\n -------------------- -------- ------------"
86  "\n DATACUBE_STD final Reduced standard star field exposure"
87  "\n STD_FLUXES final The integrated flux per wavelength of all detected sources"
88  "\n STD_RESPONSE final Response curve as derived from standard star(s)"
89  "\n STD_TELLURIC final Telluric absorption as derived from standard star(s)";
90 
91 /*----------------------------------------------------------------------------*/
99 /*----------------------------------------------------------------------------*/
100 static cpl_recipeconfig *
101 muse_standard_new_recipeconfig(void)
102 {
103  cpl_recipeconfig *recipeconfig = cpl_recipeconfig_new();
104  const char *tag;
105 
106  tag = "PIXTABLE_STD";
107  cpl_recipeconfig_set_tag(recipeconfig, tag, 1, -1);
108  cpl_recipeconfig_set_input(recipeconfig, tag, "EXTINCT_TABLE", 1, 1);
109  cpl_recipeconfig_set_input(recipeconfig, tag, "STD_FLUX_TABLE", 1, -1);
110  cpl_recipeconfig_set_input(recipeconfig, tag, "TELLURIC_REGIONS", -1, 1);
111  cpl_recipeconfig_set_input(recipeconfig, tag, "FILTER_LIST", -1, 1);
112  cpl_recipeconfig_set_output(recipeconfig, tag, "DATACUBE_STD");
113  cpl_recipeconfig_set_output(recipeconfig, tag, "STD_FLUXES");
114  cpl_recipeconfig_set_output(recipeconfig, tag, "STD_RESPONSE");
115  cpl_recipeconfig_set_output(recipeconfig, tag, "STD_TELLURIC");
116 
117  return recipeconfig;
118 } /* muse_standard_new_recipeconfig() */
119 
120 /*----------------------------------------------------------------------------*/
130 /*----------------------------------------------------------------------------*/
131 static cpl_error_code
132 muse_standard_prepare_header(const char *aFrametag, cpl_propertylist *aHeader)
133 {
134  cpl_ensure_code(aFrametag, CPL_ERROR_NULL_INPUT);
135  cpl_ensure_code(aHeader, CPL_ERROR_NULL_INPUT);
136  if (!strcmp(aFrametag, "DATACUBE_STD")) {
137  muse_processing_prepare_property(aHeader, "ESO QC STANDARD POS[0-9]+ X",
138  CPL_TYPE_FLOAT,
139  "[pix] Position of source k in x-direction in combined frame");
140  muse_processing_prepare_property(aHeader, "ESO QC STANDARD POS[0-9]+ Y",
141  CPL_TYPE_FLOAT,
142  "[pix] Position of source k in y-direction in combined frame");
143  muse_processing_prepare_property(aHeader, "ESO QC STANDARD FWHM[0-9]+ X",
144  CPL_TYPE_FLOAT,
145  "[arcsec] FWHM of source k in x-direction in combined frame");
146  muse_processing_prepare_property(aHeader, "ESO QC STANDARD FWHM[0-9]+ Y",
147  CPL_TYPE_FLOAT,
148  "[arcsec] FWHM of source k in y-direction in combined frame");
149  } else if (!strcmp(aFrametag, "STD_FLUXES")) {
150  } else if (!strcmp(aFrametag, "STD_RESPONSE")) {
151  } else if (!strcmp(aFrametag, "STD_TELLURIC")) {
152  } else {
153  cpl_msg_warning(__func__, "Frame tag %s is not defined", aFrametag);
154  return CPL_ERROR_ILLEGAL_INPUT;
155  }
156  return CPL_ERROR_NONE;
157 } /* muse_standard_prepare_header() */
158 
159 /*----------------------------------------------------------------------------*/
168 /*----------------------------------------------------------------------------*/
169 static cpl_frame_level
170 muse_standard_get_frame_level(const char *aFrametag)
171 {
172  if (!aFrametag) {
173  return CPL_FRAME_LEVEL_NONE;
174  }
175  if (!strcmp(aFrametag, "DATACUBE_STD")) {
176  return CPL_FRAME_LEVEL_FINAL;
177  }
178  if (!strcmp(aFrametag, "STD_FLUXES")) {
179  return CPL_FRAME_LEVEL_FINAL;
180  }
181  if (!strcmp(aFrametag, "STD_RESPONSE")) {
182  return CPL_FRAME_LEVEL_FINAL;
183  }
184  if (!strcmp(aFrametag, "STD_TELLURIC")) {
185  return CPL_FRAME_LEVEL_FINAL;
186  }
187  return CPL_FRAME_LEVEL_NONE;
188 } /* muse_standard_get_frame_level() */
189 
190 /*----------------------------------------------------------------------------*/
199 /*----------------------------------------------------------------------------*/
200 static muse_frame_mode
201 muse_standard_get_frame_mode(const char *aFrametag)
202 {
203  if (!aFrametag) {
204  return MUSE_FRAME_MODE_ALL;
205  }
206  if (!strcmp(aFrametag, "DATACUBE_STD")) {
208  }
209  if (!strcmp(aFrametag, "STD_FLUXES")) {
211  }
212  if (!strcmp(aFrametag, "STD_RESPONSE")) {
214  }
215  if (!strcmp(aFrametag, "STD_TELLURIC")) {
217  }
218  return MUSE_FRAME_MODE_ALL;
219 } /* muse_standard_get_frame_mode() */
220 
221 /*----------------------------------------------------------------------------*/
231 /*----------------------------------------------------------------------------*/
232 static int
233 muse_standard_create(cpl_plugin *aPlugin)
234 {
235  /* Check that the plugin is part of a valid recipe */
236  cpl_recipe *recipe;
237  if (cpl_plugin_get_type(aPlugin) == CPL_PLUGIN_TYPE_RECIPE) {
238  recipe = (cpl_recipe *)aPlugin;
239  } else {
240  return -1;
241  }
242 
243  /* register the extended processing information (new FITS header creation, *
244  * getting of the frame level for a certain tag) */
246  muse_standard_new_recipeconfig(),
247  muse_standard_prepare_header,
248  muse_standard_get_frame_level,
249  muse_standard_get_frame_mode);
250 
251  /* XXX initialize timing in messages *
252  * since at least esorex is too stupid to turn it on, we have to do it */
254  cpl_msg_set_time_on();
255  }
256 
257  /* Create the parameter list in the cpl_recipe object */
258  recipe->parameters = cpl_parameterlist_new();
259  /* Fill the parameters list */
260  cpl_parameter *p;
261 
262  /* --profile: Type of flux integration to use. "gaussian" and "moffat" use 2D profile fitting, circle and square are non-optimal flux integrators. */
263  p = cpl_parameter_new_enum("muse.muse_standard.profile",
264  CPL_TYPE_STRING,
265  "Type of flux integration to use. \"gaussian\" and \"moffat\" use 2D profile fitting, circle and square are non-optimal flux integrators.",
266  "muse.muse_standard",
267  (const char *)"moffat",
268  4,
269  (const char *)"gaussian",
270  (const char *)"moffat",
271  (const char *)"circle",
272  (const char *)"square");
273  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "profile");
274  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "profile");
275 
276  cpl_parameterlist_append(recipe->parameters, p);
277 
278  /* --select: How to select the star for flux integration, "flux" uses the brightest star in the field, "distance" uses the detection nearest to the approximate coordinates of the reference source. */
279  p = cpl_parameter_new_enum("muse.muse_standard.select",
280  CPL_TYPE_STRING,
281  "How to select the star for flux integration, \"flux\" uses the brightest star in the field, \"distance\" uses the detection nearest to the approximate coordinates of the reference source.",
282  "muse.muse_standard",
283  (const char *)"flux",
284  2,
285  (const char *)"flux",
286  (const char *)"distance");
287  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "select");
288  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "select");
289 
290  cpl_parameterlist_append(recipe->parameters, p);
291 
292  /* --smooth: How to smooth the response curve before writing it to disk. "none" does not do any kind of smoothing (such a response curve is only useful, if smoothed externally; "median" does a median-filter of 15 Angstrom half-width; "ppoly" fits piecewise cubic polynomials postprocessed by a sliding average filter of 15 Angstrom half-width. */
293  p = cpl_parameter_new_enum("muse.muse_standard.smooth",
294  CPL_TYPE_STRING,
295  "How to smooth the response curve before writing it to disk. \"none\" does not do any kind of smoothing (such a response curve is only useful, if smoothed externally; \"median\" does a median-filter of 15 Angstrom half-width; \"ppoly\" fits piecewise cubic polynomials postprocessed by a sliding average filter of 15 Angstrom half-width.",
296  "muse.muse_standard",
297  (const char *)"ppoly",
298  3,
299  (const char *)"none",
300  (const char *)"median",
301  (const char *)"ppoly");
302  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "smooth");
303  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "smooth");
304 
305  cpl_parameterlist_append(recipe->parameters, p);
306 
307  /* --lambdamin: Cut off the data below this wavelength after loading the pixel table(s). */
308  p = cpl_parameter_new_value("muse.muse_standard.lambdamin",
309  CPL_TYPE_DOUBLE,
310  "Cut off the data below this wavelength after loading the pixel table(s).",
311  "muse.muse_standard",
312  (double)4000.);
313  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "lambdamin");
314  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "lambdamin");
315 
316  cpl_parameterlist_append(recipe->parameters, p);
317 
318  /* --lambdamax: Cut off the data above this wavelength after loading the pixel table(s). */
319  p = cpl_parameter_new_value("muse.muse_standard.lambdamax",
320  CPL_TYPE_DOUBLE,
321  "Cut off the data above this wavelength after loading the pixel table(s).",
322  "muse.muse_standard",
323  (double)10000.);
324  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "lambdamax");
325  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "lambdamax");
326 
327  cpl_parameterlist_append(recipe->parameters, p);
328 
329  /* --lambdaref: Reference wavelength used for correction of differential atmospheric refraction. The R-band (peak wavelength ~7000 Angstrom) that is usually used for guiding, is close to the central wavelength of MUSE, so a value of 7000.0 Angstrom should be used if nothing else is known. A value less than zero switches DAR correction off. */
330  p = cpl_parameter_new_value("muse.muse_standard.lambdaref",
331  CPL_TYPE_DOUBLE,
332  "Reference wavelength used for correction of differential atmospheric refraction. The R-band (peak wavelength ~7000 Angstrom) that is usually used for guiding, is close to the central wavelength of MUSE, so a value of 7000.0 Angstrom should be used if nothing else is known. A value less than zero switches DAR correction off.",
333  "muse.muse_standard",
334  (double)7000.);
335  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "lambdaref");
336  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "lambdaref");
337 
338  cpl_parameterlist_append(recipe->parameters, p);
339 
340  /* --darcheck: Carry out a check of the theoretical DAR correction using source centroiding. If "correct" it will also apply an empirical correction. */
341  p = cpl_parameter_new_enum("muse.muse_standard.darcheck",
342  CPL_TYPE_STRING,
343  "Carry out a check of the theoretical DAR correction using source centroiding. If \"correct\" it will also apply an empirical correction.",
344  "muse.muse_standard",
345  (const char *)"none",
346  3,
347  (const char *)"none",
348  (const char *)"check",
349  (const char *)"correct");
350  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "darcheck");
351  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "darcheck");
352 
353  cpl_parameterlist_append(recipe->parameters, p);
354 
355  /* --filter: 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. */
356  p = cpl_parameter_new_value("muse.muse_standard.filter",
357  CPL_TYPE_STRING,
358  "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.",
359  "muse.muse_standard",
360  (const char *)"white");
361  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CFG, "filter");
362  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "filter");
363 
364  cpl_parameterlist_append(recipe->parameters, p);
365 
366  return 0;
367 } /* muse_standard_create() */
368 
369 /*----------------------------------------------------------------------------*/
380 /*----------------------------------------------------------------------------*/
381 static int
382 muse_standard_params_fill(muse_standard_params_t *aParams, cpl_parameterlist *aParameters)
383 {
384  cpl_ensure_code(aParams, CPL_ERROR_NULL_INPUT);
385  cpl_ensure_code(aParameters, CPL_ERROR_NULL_INPUT);
386  cpl_parameter *p;
387 
388  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.profile");
389  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
390  aParams->profile_s = cpl_parameter_get_string(p);
391  aParams->profile =
392  (!strcasecmp(aParams->profile_s, "gaussian")) ? MUSE_STANDARD_PARAM_PROFILE_GAUSSIAN :
393  (!strcasecmp(aParams->profile_s, "moffat")) ? MUSE_STANDARD_PARAM_PROFILE_MOFFAT :
394  (!strcasecmp(aParams->profile_s, "circle")) ? MUSE_STANDARD_PARAM_PROFILE_CIRCLE :
395  (!strcasecmp(aParams->profile_s, "square")) ? MUSE_STANDARD_PARAM_PROFILE_SQUARE :
396  MUSE_STANDARD_PARAM_PROFILE_INVALID_VALUE;
397  cpl_ensure_code(aParams->profile != MUSE_STANDARD_PARAM_PROFILE_INVALID_VALUE,
398  CPL_ERROR_ILLEGAL_INPUT);
399 
400  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.select");
401  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
402  aParams->select_s = cpl_parameter_get_string(p);
403  aParams->select =
404  (!strcasecmp(aParams->select_s, "flux")) ? MUSE_STANDARD_PARAM_SELECT_FLUX :
405  (!strcasecmp(aParams->select_s, "distance")) ? MUSE_STANDARD_PARAM_SELECT_DISTANCE :
406  MUSE_STANDARD_PARAM_SELECT_INVALID_VALUE;
407  cpl_ensure_code(aParams->select != MUSE_STANDARD_PARAM_SELECT_INVALID_VALUE,
408  CPL_ERROR_ILLEGAL_INPUT);
409 
410  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.smooth");
411  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
412  aParams->smooth_s = cpl_parameter_get_string(p);
413  aParams->smooth =
414  (!strcasecmp(aParams->smooth_s, "none")) ? MUSE_STANDARD_PARAM_SMOOTH_NONE :
415  (!strcasecmp(aParams->smooth_s, "median")) ? MUSE_STANDARD_PARAM_SMOOTH_MEDIAN :
416  (!strcasecmp(aParams->smooth_s, "ppoly")) ? MUSE_STANDARD_PARAM_SMOOTH_PPOLY :
417  MUSE_STANDARD_PARAM_SMOOTH_INVALID_VALUE;
418  cpl_ensure_code(aParams->smooth != MUSE_STANDARD_PARAM_SMOOTH_INVALID_VALUE,
419  CPL_ERROR_ILLEGAL_INPUT);
420 
421  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.lambdamin");
422  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
423  aParams->lambdamin = cpl_parameter_get_double(p);
424 
425  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.lambdamax");
426  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
427  aParams->lambdamax = cpl_parameter_get_double(p);
428 
429  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.lambdaref");
430  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
431  aParams->lambdaref = cpl_parameter_get_double(p);
432 
433  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.darcheck");
434  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
435  aParams->darcheck_s = cpl_parameter_get_string(p);
436  aParams->darcheck =
437  (!strcasecmp(aParams->darcheck_s, "none")) ? MUSE_STANDARD_PARAM_DARCHECK_NONE :
438  (!strcasecmp(aParams->darcheck_s, "check")) ? MUSE_STANDARD_PARAM_DARCHECK_CHECK :
439  (!strcasecmp(aParams->darcheck_s, "correct")) ? MUSE_STANDARD_PARAM_DARCHECK_CORRECT :
440  MUSE_STANDARD_PARAM_DARCHECK_INVALID_VALUE;
441  cpl_ensure_code(aParams->darcheck != MUSE_STANDARD_PARAM_DARCHECK_INVALID_VALUE,
442  CPL_ERROR_ILLEGAL_INPUT);
443 
444  p = cpl_parameterlist_find(aParameters, "muse.muse_standard.filter");
445  cpl_ensure_code(p, CPL_ERROR_DATA_NOT_FOUND);
446  aParams->filter = cpl_parameter_get_string(p);
447 
448  return 0;
449 } /* muse_standard_params_fill() */
450 
451 /*----------------------------------------------------------------------------*/
458 /*----------------------------------------------------------------------------*/
459 static int
460 muse_standard_exec(cpl_plugin *aPlugin)
461 {
462  if (cpl_plugin_get_type(aPlugin) != CPL_PLUGIN_TYPE_RECIPE) {
463  return -1;
464  }
465  cpl_recipe *recipe = (cpl_recipe *)aPlugin;
466  cpl_msg_set_threadid_on();
467 
468  cpl_frameset *usedframes = cpl_frameset_new(),
469  *outframes = cpl_frameset_new();
470  muse_standard_params_t params;
471  muse_standard_params_fill(&params, recipe->parameters);
472 
473  cpl_errorstate prestate = cpl_errorstate_get();
474 
475  muse_processing *proc = muse_processing_new("muse_standard",
476  recipe);
477  int rc = muse_standard_compute(proc, &params);
478  cpl_frameset_join(usedframes, proc->usedframes);
479  cpl_frameset_join(outframes, proc->outframes);
481 
482  if (!cpl_errorstate_is_equal(prestate)) {
483  /* dump all errors from this recipe in chronological order */
484  cpl_errorstate_dump(prestate, CPL_FALSE, muse_cplerrorstate_dump_some);
485  /* reset message level to not get the same errors displayed again by esorex */
486  cpl_msg_set_level(CPL_MSG_INFO);
487  }
488  /* clean up duplicates in framesets of used and output frames */
491 
492  /* to get esorex to see our classification (frame groups etc.), *
493  * replace the original frameset with the list of used frames *
494  * before appending product output frames */
495  /* keep the same pointer, so just erase all frames, not delete the frameset */
496  muse_cplframeset_erase_all(recipe->frames);
497  cpl_frameset_join(recipe->frames, usedframes);
498  cpl_frameset_join(recipe->frames, outframes);
499  cpl_frameset_delete(usedframes);
500  cpl_frameset_delete(outframes);
501  return rc;
502 } /* muse_standard_exec() */
503 
504 /*----------------------------------------------------------------------------*/
511 /*----------------------------------------------------------------------------*/
512 static int
513 muse_standard_destroy(cpl_plugin *aPlugin)
514 {
515  /* Get the recipe from the plugin */
516  cpl_recipe *recipe;
517  if (cpl_plugin_get_type(aPlugin) == CPL_PLUGIN_TYPE_RECIPE) {
518  recipe = (cpl_recipe *)aPlugin;
519  } else {
520  return -1;
521  }
522 
523  /* Clean up */
524  cpl_parameterlist_delete(recipe->parameters);
526  return 0;
527 } /* muse_standard_destroy() */
528 
529 /*----------------------------------------------------------------------------*/
539 /*----------------------------------------------------------------------------*/
540 int
541 cpl_plugin_get_info(cpl_pluginlist *aList)
542 {
543  cpl_recipe *recipe = cpl_calloc(1, sizeof *recipe);
544  cpl_plugin *plugin = &recipe->interface;
545 
546  char *helptext;
548  helptext = cpl_sprintf("%s%s", muse_standard_help,
549  muse_standard_help_esorex);
550  } else {
551  helptext = cpl_sprintf("%s", muse_standard_help);
552  }
553 
554  /* Initialize the CPL plugin stuff for this module */
555  cpl_plugin_init(plugin, CPL_PLUGIN_API, MUSE_BINARY_VERSION,
556  CPL_PLUGIN_TYPE_RECIPE,
557  "muse_standard",
558  "Create a flux response curve from a standard star exposure.",
559  helptext,
560  "Peter Weilbacher",
561  "usd-help@eso.org",
563  muse_standard_create,
564  muse_standard_exec,
565  muse_standard_destroy);
566  cpl_pluginlist_append(aList, plugin);
567  cpl_free(helptext);
568 
569  return 0;
570 } /* cpl_plugin_get_info() */
571 
void muse_processing_delete(muse_processing *aProcessing)
Free the muse_processing structure.
int profile
Type of flux integration to use. "gaussian" and "moffat" use 2D profile fitting, circle and square ar...
muse_cplframework_type muse_cplframework(void)
Return the CPL framework the recipe is run under.
int select
How to select the star for flux integration, "flux" uses the brightest star in the field...
int smooth
How to smooth the response curve before writing it to disk. "none" does not do any kind of smoothing ...
const char * profile_s
Type of flux integration to use. "gaussian" and "moffat" use 2D profile fitting, circle and square ar...
const char * select_s
How to select the star for flux integration, "flux" uses the brightest star in the field...
const char * darcheck_s
Carry out a check of the theoretical DAR correction using source centroiding. If "correct" it will al...
cpl_frameset * usedframes
muse_processing * muse_processing_new(const char *aName, cpl_recipe *aRecipe)
Create a new processing structure.
const char * muse_get_license(void)
Get the pipeline copyright and license.
Definition: muse_utils.c:84
muse_frame_mode
cpl_frameset * outframes
double lambdamin
Cut off the data below this wavelength after loading the pixel table(s).
void muse_cplerrorstate_dump_some(unsigned aCurrent, unsigned aFirst, unsigned aLast)
Dump some CPL errors.
double lambdaref
Reference wavelength used for correction of differential atmospheric refraction. The R-band (peak wav...
void muse_processinginfo_delete(cpl_recipe *)
Clear all information from the processing info and from the recipe config.
double lambdamax
Cut off the data above this wavelength after loading the pixel table(s).
Structure to hold the parameters of the muse_standard recipe.
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.
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.
int darcheck
Carry out a check of the theoretical DAR correction using source centroiding. If "correct" it will al...
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...
const char * smooth_s
How to smooth the response curve before writing it to disk. "none" does not do any kind of smoothing ...
cpl_error_code muse_processing_prepare_property(cpl_propertylist *, const char *, cpl_type, const char *)
Prepare and check the specified property.