FORS Pipeline Reference Manual  5.0.9
fors_sumflux.c
1 /* $Id: fors_sumflux.c,v 1.11 2013-04-24 14:14:13 cgarcia Exp $
2  *
3  * This file is part of the FORS Data Reduction Pipeline
4  * Copyright (C) 2002-2010 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author: cgarcia $
23  * $Date: 2013-04-24 14:14:13 $
24  * $Revision: 1.11 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifdef HAVE_CONFIG_H
29 #include <config.h>
30 #endif
31 
32 #include <math.h>
33 #include <cpl.h>
34 #include <moses.h>
35 #include <fors_dfs.h>
36 #include <fors_qc.h>
37 
38 static int fors_sumflux_create(cpl_plugin *);
39 static int fors_sumflux_exec(cpl_plugin *);
40 static int fors_sumflux_destroy(cpl_plugin *);
41 static int fors_sumflux(cpl_parameterlist *, cpl_frameset *);
42 
43 static char fors_sumflux_description[] =
44 "This recipe is used to monitor any lamp flux on the CCD. The input raw\n"
45 "image should be either a FLUX_ARC_LSS or a FLUX_FLAT_LSS frame. After the\n"
46 "background subtraction the total signal is integrated and divided by the\n"
47 "exposure time and by the total number of CCD original pixels (keeping\n"
48 "into account a possible rebinned readout). In the case of FORS2 frames\n"
49 "the background is the median level evaluated from the available overscan\n"
50 "regions. In the case of FORS1 data, where overscan regions are missing,\n"
51 "the background is evaluated as the median level of the first 200 CCD columns\n"
52 "for flat field data, while for arc lamp data a background map evaluated\n"
53 "from the regions without spectral lines is computed and subtracted. The\n"
54 "background subtracted frame is written to output in all cases, and the QC\n"
55 "parameters QC LAMP FLUX and QC LAMP FLUXERR are computed.\n\n"
56 "Input files:\n\n"
57 " DO category: Type: Explanation: Required:\n"
58 " FLUX_FLAT_LSS Raw Flat field exposure Y\n"
59 " or FLUX_ARC_LSS Raw Arc lamp exposure Y\n\n"
60 "Output files:\n\n"
61 " DO category: Data type: Explanation:\n"
62 " FLUX_LAMP_LSS FITS image Background subtracted integration region\n\n";
63 
64 #define fors_sumflux_exit(message) \
65 { \
66 if ((const char *)message != NULL) cpl_msg_error(recipe, message); \
67 cpl_free(instrume); \
68 cpl_free(pipefile); \
69 cpl_image_delete(master_bias); \
70 cpl_image_delete(exposure); \
71 cpl_propertylist_delete(header); \
72 cpl_propertylist_delete(qclist); \
73 cpl_table_delete(overscans); \
74 cpl_msg_indent_less(); \
75 return -1; \
76 }
77 
78 #define fors_sumflux_exit_memcheck(message) \
79 { \
80 if ((const char *)message != NULL) cpl_msg_info(recipe, message); \
81 cpl_free(instrume); \
82 cpl_free(pipefile); \
83 cpl_image_delete(master_bias); \
84 cpl_image_delete(exposure); \
85 cpl_propertylist_delete(header); \
86 cpl_propertylist_delete(qclist); \
87 cpl_table_delete(overscans); \
88 cpl_msg_indent_less(); \
89 return 0; \
90 }
91 
92 
104 int cpl_plugin_get_info(cpl_pluginlist *list)
105 {
106  cpl_recipe *recipe = cpl_calloc(1, sizeof *recipe );
107  cpl_plugin *plugin = &recipe->interface;
108 
109  cpl_plugin_init(plugin,
110  CPL_PLUGIN_API,
111  FORS_BINARY_VERSION,
112  CPL_PLUGIN_TYPE_RECIPE,
113  "fors_sumflux",
114  "Integrate flux from all or part of the input frame",
115  fors_sumflux_description,
116  "Carlo Izzo",
117  PACKAGE_BUGREPORT,
118  "This file is currently part of the FORS Instrument Pipeline\n"
119  "Copyright (C) 2002-2010 European Southern Observatory\n\n"
120  "This program is free software; you can redistribute it and/or modify\n"
121  "it under the terms of the GNU General Public License as published by\n"
122  "the Free Software Foundation; either version 2 of the License, or\n"
123  "(at your option) any later version.\n\n"
124  "This program is distributed in the hope that it will be useful,\n"
125  "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
126  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
127  "GNU General Public License for more details.\n\n"
128  "You should have received a copy of the GNU General Public License\n"
129  "along with this program; if not, write to the Free Software Foundation,\n"
130  "Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n",
131  fors_sumflux_create,
132  fors_sumflux_exec,
133  fors_sumflux_destroy);
134 
135  cpl_pluginlist_append(list, plugin);
136 
137  return 0;
138 }
139 
140 
151 static int fors_sumflux_create(cpl_plugin *plugin)
152 {
153  cpl_recipe *recipe;
154  cpl_parameter *p;
155 
156 
157  /*
158  * Check that the plugin is part of a valid recipe
159  */
160 
161  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
162  recipe = (cpl_recipe *)plugin;
163  else
164  return -1;
165 
166  /*
167  * Create the parameters list in the cpl_recipe object
168  */
169 
170  recipe->parameters = cpl_parameterlist_new();
171 
172 
173  /*
174  * X coordinate of lower left corner
175  */
176 
177  p = cpl_parameter_new_value("fors.fors_sumflux.xlow",
178  CPL_TYPE_INT,
179  "X coordinate of lower left corner "
180  "of integration region (pixel)",
181  "fors.fors_sumflux",
182  0);
183  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "xlow");
184  cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
185  cpl_parameterlist_append(recipe->parameters, p);
186 
187  /*
188  * Y coordinate of lower left corner
189  */
190 
191  p = cpl_parameter_new_value("fors.fors_sumflux.ylow",
192  CPL_TYPE_INT,
193  "Y coordinate of lower left corner "
194  "of integration region (pixel)",
195  "fors.fors_sumflux",
196  0);
197  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "ylow");
198  cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
199  cpl_parameterlist_append(recipe->parameters, p);
200 
201  /*
202  * X coordinate of upper right corner
203  */
204 
205  p = cpl_parameter_new_value("fors.fors_sumflux.xhigh",
206  CPL_TYPE_INT,
207  "X coordinate of upper right corner "
208  "of integration region (pixel) (0 = CCD size)",
209  "fors.fors_sumflux",
210  0);
211  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "xhigh");
212  cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
213  cpl_parameterlist_append(recipe->parameters, p);
214 
215  /*
216  * Y coordinate of upper right corner
217  */
218 
219  p = cpl_parameter_new_value("fors.fors_sumflux.yhigh",
220  CPL_TYPE_INT,
221  "Y coordinate of upper right corner "
222  "of integration region (pixel) (0 = CCD size)",
223  "fors.fors_sumflux",
224  0);
225  cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "yhigh");
226  cpl_parameter_disable(p, CPL_PARAMETER_MODE_ENV);
227  cpl_parameterlist_append(recipe->parameters, p);
228 
229  return 0;
230 }
231 
232 
241 static int fors_sumflux_exec(cpl_plugin *plugin)
242 {
243  cpl_recipe *recipe;
244 
245  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
246  recipe = (cpl_recipe *)plugin;
247  else
248  return -1;
249 
250  return fors_sumflux(recipe->parameters, recipe->frames);
251 }
252 
253 
262 static int fors_sumflux_destroy(cpl_plugin *plugin)
263 {
264  cpl_recipe *recipe;
265 
266  if (cpl_plugin_get_type(plugin) == CPL_PLUGIN_TYPE_RECIPE)
267  recipe = (cpl_recipe *)plugin;
268  else
269  return -1;
270 
271  cpl_parameterlist_delete(recipe->parameters);
272 
273  return 0;
274 }
275 
276 
286 static int fors_sumflux(cpl_parameterlist *parlist, cpl_frameset *frameset)
287 {
288 
289  const char *recipe = "fors_sumflux";
290 
291 
292  /*
293  * Input parameters
294  */
295 
296  int xlow;
297  int ylow;
298  int xhig;
299  int yhig;
300 
301  /*
302  * CPL objects
303  */
304 
305  cpl_image *master_bias = NULL;
306  cpl_image *exposure = NULL;
307  cpl_image *dummy = NULL;
308 
309  cpl_table *overscans = NULL;
310 
311  cpl_propertylist *header = NULL;
312  cpl_propertylist *qclist = NULL;
313 
314  /*
315  * Auxiliary variables
316  */
317 
318  const char *arc_tag = "FLUX_ARC_LSS";
319  const char *flat_tag = "FLUX_FLAT_LSS";
320 
321  char version[80];
322  char lamp[20];
323  const char *exposure_tag;
324  const char *flux_tag = "FLUX_LAMP_LSS";
325  double time;
326  double norm_factor;
327  int nframes;
328  int rebin;
329  int nx, ny;
330  double gain;
331  double flux, flux_err;
332  int i;
333 
334  char *instrume = NULL;
335  char *pipefile = NULL;
336 
337 
338  snprintf(version, 80, "%s-%s", PACKAGE, PACKAGE_VERSION);
339 
340  cpl_msg_set_indentation(2);
341 
342  /*
343  * Get configuration parameters
344  */
345 
346  cpl_msg_info(recipe, "Recipe %s configuration parameters:", recipe);
347  cpl_msg_indent_more();
348 
349  xlow = dfs_get_parameter_int(parlist, "fors.fors_sumflux.xlow", NULL);
350  ylow = dfs_get_parameter_int(parlist, "fors.fors_sumflux.ylow", NULL);
351  xhig = dfs_get_parameter_int(parlist, "fors.fors_sumflux.xhigh", NULL);
352  yhig = dfs_get_parameter_int(parlist, "fors.fors_sumflux.yhigh", NULL);
353 
354  if (cpl_error_get_code())
355  fors_sumflux_exit("Failure getting the configuration parameters");
356 
357  if (xlow > xhig || ylow > yhig || xhig < 0 || yhig < 0)
358  fors_sumflux_exit("Invalid integration region");
359 
360 
361  /*
362  * Check input set-of-frames
363  */
364 
365  cpl_msg_indent_less();
366  cpl_msg_info(recipe, "Check input set-of-frames:");
367  cpl_msg_indent_more();
368 
369  if (!dfs_equal_keyword(frameset, "ESO DET CHIP1 ID"))
370  cpl_msg_warning(cpl_func,"Input frames are not from the same chip");
371 
372  nframes = cpl_frameset_count_tags(frameset, arc_tag)
373  + cpl_frameset_count_tags(frameset, flat_tag);
374 
375  if (nframes == 0)
376  fors_sumflux_exit("Missing input LSS calibration exposures");
377 
378  if (nframes > 1) {
379  cpl_msg_error(recipe, "Too many LSS calibration exposures found (%d). "
380  "Just one is required.", nframes);
381  fors_sumflux_exit(NULL);
382  }
383 
384  if (cpl_frameset_count_tags(frameset, arc_tag) > 0)
385  exposure_tag = arc_tag;
386  else
387  exposure_tag = flat_tag;
388 
389 /*** MASTER BIAS
390 
391  if (cpl_frameset_count_tags(frameset, "MASTER_BIAS") == 0)
392  fors_sumflux_exit("Missing required input: MASTER_BIAS");
393 
394  if (cpl_frameset_count_tags(frameset, "MASTER_BIAS") > 1)
395  fors_sumflux_exit("Too many in input: MASTER_BIAS");
396 
397  cpl_msg_info(recipe, "Load master bias frame...");
398  cpl_msg_indent_more();
399 
400  master_bias = dfs_load_image(frameset, "MASTER_BIAS", CPL_TYPE_FLOAT, 0, 1);
401  if (master_bias == NULL)
402  fors_sumflux_exit("Cannot load master bias");
403 
404 MASTER BIAS ***/
405 
406  cpl_msg_indent_less();
407  cpl_msg_info(recipe, "Load %s frame...", exposure_tag);
408  cpl_msg_indent_more();
409 
410  exposure = dfs_load_image(frameset, exposure_tag, CPL_TYPE_FLOAT, 0, 0);
411  if (exposure == NULL)
412  fors_sumflux_exit("Cannot load input frame");
413 
414  /*
415  * Get exposure time, rebin factor, gain, etc.
416  */
417 
418  header = dfs_load_header(frameset, exposure_tag, 0);
419 
420  if (header == NULL)
421  fors_sumflux_exit("Cannot load input frame header");
422 
423  time = cpl_propertylist_get_double(header, "EXPTIME");
424 
425  if (cpl_error_get_code() != CPL_ERROR_NONE)
426  fors_sumflux_exit("Missing keyword EXPTIME in input frame header");
427 
428  instrume = (char *)cpl_propertylist_get_string(header, "INSTRUME");
429  if (instrume == NULL)
430  fors_sumflux_exit("Missing keyword INSTRUME in input frame header");
431  instrume = cpl_strdup(instrume);
432 
433  if (instrume[4] == '1')
434  snprintf(version, 80, "%s/%s", "fors1", VERSION);
435  if (instrume[4] == '2')
436  snprintf(version, 80, "%s/%s", "fors2", VERSION);
437 
438  rebin = cpl_propertylist_get_int(header, "ESO DET WIN1 BINX");
439 
440  if (cpl_error_get_code() != CPL_ERROR_NONE)
441  fors_sumflux_exit("Missing keyword ESO DET WIN1 BINX in input "
442  "frame header");
443 
444  rebin *= cpl_propertylist_get_int(header, "ESO DET WIN1 BINY");
445 
446  if (cpl_error_get_code() != CPL_ERROR_NONE)
447  fors_sumflux_exit("Missing keyword ESO DET WIN1 BINY in input "
448  "frame header");
449 
450  if (rebin > 1) {
451  cpl_msg_info(recipe,
452  "One readout pixel corresponds to %d chip pixels", rebin);
453  }
454 
455  gain = cpl_propertylist_get_double(header, "ESO DET OUT1 CONAD");
456 
457  if (cpl_error_get_code() != CPL_ERROR_NONE)
458  fors_sumflux_exit("Missing keyword ESO DET OUT1 CONAD in arc lamp "
459  "frame header");
460 
461  cpl_msg_info(recipe, "The gain factor is: %.2f e-/ADU", gain);
462 
463  /* Leave the header on for the next step... */
464 
465 
466  /*
467  * Remove the bias if possible (FORS2), otherwise remove the flux from a
468  * presumably darker part of the image (FORS1).
469  */
470 
471  switch (instrume[4]) {
472  case '1':
473 #ifdef OLD_FORS1
474  cpl_msg_info(recipe, "Remove low-flux region level...");
475  if (exposure_tag == flat_tag) {
476  overscans = cpl_table_new(2);
477  cpl_table_new_column(overscans, "xlow", CPL_TYPE_INT);
478  cpl_table_new_column(overscans, "ylow", CPL_TYPE_INT);
479  cpl_table_new_column(overscans, "xhig", CPL_TYPE_INT);
480  cpl_table_new_column(overscans, "yhig", CPL_TYPE_INT);
481 
482  nx = cpl_image_get_size_x(exposure);
483  ny = cpl_image_get_size_y(exposure);
484 
485  /* "Valid" region */
486 
487  cpl_table_set_int(overscans, "xlow", 0, 200);
488  cpl_table_set_int(overscans, "ylow", 0, 0);
489  cpl_table_set_int(overscans, "xhig", 0, nx);
490  cpl_table_set_int(overscans, "yhig", 0, ny);
491 
492  /* "Overscan" (background) region */
493 
494  cpl_table_set_int(overscans, "xlow", 1, 0);
495  cpl_table_set_int(overscans, "ylow", 1, 0);
496  cpl_table_set_int(overscans, "xhig", 1, 200);
497  cpl_table_set_int(overscans, "yhig", 1, ny);
498  }
499  else {
500  background = mos_arc_background(exposure, 15, 15);
501  cpl_image_subtract(exposure, background);
502  cpl_image_delete(background);
503  }
504 #else
505  cpl_msg_info(recipe, "Remove bias, evaluated on overscan regions...");
506  overscans = mos_load_overscans_vimos(header, 1);
507 #endif
508  break;
509  case '2':
510  cpl_msg_info(recipe, "Remove bias, evaluated on overscan regions...");
511  overscans = mos_load_overscans_vimos(header, 1);
512  break;
513  default:
514  cpl_msg_error(recipe, "Invalid instrument name: %s", instrume);
515  fors_sumflux_exit(NULL);
516  }
517 
518  if (overscans) {
519  dummy = mos_remove_bias(exposure, NULL, overscans);
520  cpl_table_delete(overscans); overscans = NULL;
521  cpl_image_delete(exposure); exposure = dummy;
522 
523  if (exposure == NULL)
524  fors_sumflux_exit("Cannot remove bias from input frame");
525  }
526 
527  nx = cpl_image_get_size_x(exposure);
528  ny = cpl_image_get_size_y(exposure);
529 
530  if (xhig == 0)
531  xhig = nx;
532 
533  if (yhig == 0)
534  yhig = ny;
535 
536  if (xlow > nx || ylow > ny || xhig < 0 || yhig < 0)
537  fors_sumflux_exit("The integration region lays outside the CCD");
538 
539  if (xlow == xhig || ylow == yhig)
540  fors_sumflux_exit("The integration area is zero");
541 
542  norm_factor = rebin * time * (xhig - xlow) * (yhig - ylow);
543 
544  flux = cpl_image_get_flux(exposure);
545  if (flux > 0.0) {
546  flux_err = sqrt(flux/gain);
547  }
548  else {
549  flux = 0.0;
550  flux_err = 0.0;
551  }
552 
553  flux /= norm_factor;
554  flux_err /= norm_factor;
555 
556  cpl_msg_info(recipe, "Flux: %.4f +/- %.4f (ADU/s*pixel)", flux, flux_err);
557 
558  cpl_image_divide_scalar(exposure, norm_factor);
559 
560  /* Leave the header on for the next step... */
561 
562 
563  /*
564  * QC1 group header
565  */
566 
567  qclist = cpl_propertylist_new();
568 
569  fors_qc_start_group(qclist, "2.0", instrume);
570 
571  if (fors_qc_write_string("PRO.CATG", flux_tag,
572  "Product category", instrume))
573  fors_sumflux_exit("Cannot write product category to QC log file");
574 
575  if (fors_qc_keyword_to_paf(header, "ESO DPR TYPE", NULL,
576  "DPR type", instrume))
577  fors_sumflux_exit("Missing keyword DPR TYPE in frame header");
578 
579  if (fors_qc_keyword_to_paf(header, "ESO TPL ID", NULL,
580  "Template", instrume))
581  fors_sumflux_exit("Missing keyword TPL ID in frame header");
582 
583  if (fors_qc_keyword_to_paf(header, "ESO INS GRIS1 NAME", NULL,
584  "Grism name", instrume))
585  fors_sumflux_exit("Missing keyword INS GRIS1 NAME in frame header");
586 
587  if (fors_qc_keyword_to_paf(header, "ESO INS GRIS1 ID", NULL,
588  "Grim identifier", instrume))
589  fors_sumflux_exit("Missing keyword INS GRIS1 ID in frame header");
590 
591  if (cpl_propertylist_has(header, "ESO INS FILT1 NAME"))
592  fors_qc_keyword_to_paf(header, "ESO INS FILT1 NAME", NULL,
593  "Filter name", instrume);
594 
595  if (fors_qc_keyword_to_paf(header, "ESO INS COLL NAME", NULL,
596  "Collimator name", instrume))
597  fors_sumflux_exit("Missing keyword INS COLL NAME in frame header");
598 
599  if (fors_qc_keyword_to_paf(header, "ESO DET CHIP1 ID", NULL,
600  "Chip identifier", instrume))
601  fors_sumflux_exit("Missing keyword DET CHIP1 ID in frame header");
602 
603  if (fors_qc_keyword_to_paf(header, "ESO INS SLIT WID",
604  "arcsec", "Slit width", instrume))
605  fors_sumflux_exit("Missing keyword ESO INS SLIT WID in frame header");
606 
607  if (fors_qc_keyword_to_paf(header, "ESO DET OUT1 CONAD", "e-/ADU",
608  "Conversion from ADUs to electrons", instrume))
609  fors_sumflux_exit("Missing keyword ESO DET OUT1 CONAD in frame header");
610 
611  if (fors_qc_keyword_to_paf(header, "ESO DET WIN1 BINX", NULL,
612  "Binning factor along X", instrume))
613  fors_sumflux_exit("Missing keyword ESO DET WIN1 BINX in frame header");
614 
615  if (fors_qc_keyword_to_paf(header, "ESO DET WIN1 BINY", NULL,
616  "Binning factor along Y", instrume))
617  fors_sumflux_exit("Missing keyword ESO DET WIN1 BINY in frame header");
618 
619  for (i = 1; i < 7; i++) {
620  snprintf(lamp, 20, "ESO INS LAMP%d NAME", i);
621  if (cpl_propertylist_has(header, lamp))
622  fors_qc_keyword_to_paf(header, lamp, NULL,
623  "Name of lamp on", instrume);
624  }
625 
626  if (fors_qc_keyword_to_paf(header, "ARCFILE", NULL,
627  "Archive name of input data", instrume))
628  fors_sumflux_exit("Missing keyword ARCFILE in frame header");
629 
630  cpl_propertylist_delete(header); header = NULL;
631 
632  pipefile = dfs_generate_filename(flux_tag);
633  if (fors_qc_write_string("PIPEFILE", pipefile,
634  "Pipeline product name", instrume))
635  fors_sumflux_exit("Cannot write PIPEFILE to QC log file");
636  cpl_free(pipefile); pipefile = NULL;
637 
638 
639  /*
640  * QC1 parameters
641  */
642 
643  if (fors_qc_write_qc_double(qclist, flux, "QC.LAMP.FLUX", "ADU/s*pixel",
644  "Total lamp flux", instrume)) {
645  fors_sumflux_exit("Cannot write total lamp flux to QC log file");
646  }
647 
648  if (fors_qc_write_qc_double(qclist, flux_err, "QC.LAMP.FLUXERR",
649  "ADU/s*pixel",
650  "Error on lamp flux", instrume)) {
651  fors_sumflux_exit("Cannot write error on lamp flux to QC log file");
652  }
653 
655 
656  cpl_free(instrume); instrume = NULL;
657 
658  if (dfs_save_image(frameset, exposure, flux_tag, qclist,
659  parlist, recipe, version))
660  fors_sumflux_exit(NULL);
661 
662  cpl_image_delete(exposure); exposure = NULL;
663  cpl_propertylist_delete(qclist); qclist = NULL;
664 
665  return 0;
666 
667 }
int cpl_plugin_get_info(cpl_pluginlist *list)
Build the list of available plugins, for this module.
Definition: fors_bias.c:62
cpl_image * dfs_load_image(cpl_frameset *frameset, const char *category, cpl_type type, int ext, int calib)
Loading image data of given category.
Definition: fors_dfs.c:860
cpl_propertylist * dfs_load_header(cpl_frameset *frameset, const char *category, int ext)
Loading header associated to data of given category.
Definition: fors_dfs.c:964
cpl_error_code fors_qc_write_qc_double(cpl_propertylist *header, double value, const char *name, const char *unit, const char *comment, const char *instrument)
Write an integer value to the active QC1 PAF object and to a header.
Definition: fors_qc.c:604
cpl_error_code fors_qc_keyword_to_paf(cpl_propertylist *header, const char *name, const char *unit, const char *comment, const char *instrument)
Copy a keyword value to the currently active QC1 PAF object.
Definition: fors_qc.c:425
cpl_error_code fors_qc_start_group(cpl_propertylist *header, const char *qcdic_version, const char *instrument)
Initiate a new QC1 group.
Definition: fors_qc.c:77
cpl_image * mos_remove_bias(cpl_image *image, cpl_image *bias, cpl_table *overscans)
Subtract the bias from a CCD exposure.
Definition: moses.c:3694
cpl_error_code fors_qc_write_string(const char *name, const char *value, const char *comment, const char *instrument)
Add string parameter to current QC1 group.
Definition: fors_qc.c:235
int dfs_equal_keyword(cpl_frameset *frameset, const char *keyword)
Saving table data of given category.
Definition: fors_dfs.c:1683
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.
Definition: fors_dfs.c:1451
int dfs_get_parameter_int(cpl_parameterlist *parlist, const char *name, const cpl_table *defaults)
Reading a recipe integer parameter value.
Definition: fors_dfs.c:407
cpl_error_code fors_qc_end_group(void)
Close current QC1 PAF file.
Definition: fors_qc.c:200
Definition: list.c:74
cpl_image * mos_arc_background(cpl_image *image, int msize, int fsize)
Background determination on emission line spectrum (arc)
Definition: moses.c:3969
cpl_table * mos_load_overscans_vimos(const cpl_propertylist *header, int check_consistency)
Get the overscan positions from FITS header of VIMOS data.
Definition: moses.c:15723