Specific bugs in the code are marked in comments with XXX.

================================================================================

- check DPR keywords of all/raw input frames
  do not abort if a wrong one was found but issue a warning instead

- subtract constant or smoothed dark frame instead of only applying bad pixel
  maps (or subtracting whole frame). Add recipe flag for that?

- Change the edgefrac parameter of muse_flat to be -1 by default and let this
  -1 mean 0.5 for WFM and 0.3 (or 0.25) for NFM. This can only be done, if we
  can determine the instrument mode reliably in reality (not yet in headers as
  of 2012-10-05).

- rough idea how to use SGS ("banana") images to improve positioning:
  . detect objects on SGS images for each exposure
  . determine centroid for all objects
  . use pattern matching to identify common stars in each pair of
    exposures
  . fit offsets in x and y (TCCD pixel coordinates) using all common
    objects
  . transform x/y offsets to RA/DEC positions using known pixel scale
  All this would work, if the SGS images were available to the pipeline
  (e.g. as an extra extension in the raw FITS images), as discussed in the
  SGS videoconference on 2011-12-08.

- QC parameters as discussed during the MUSE progress meeting on 2012-11-15:
  . muse_standard recipe
    _ throughput / efficiency in three wavelength bands together with an
      error estimate
      --> cannot work because of convolution with lamp-flat spectrum!
    _ S/N in three wavelength ranges
    _ if master throughput given in input, add comparison statistics
    _ S/N in regions of the telluric absorption for the telluric
      correction spectrum

- geometry stuff:
  . check the lamps, using the new keywords
      HIERARCH ESO SEQ LAMP1 ONTIME = 0.0 / [s] Ignition time of lamp #i
      HIERARCH ESO SEQ LAMP2 ONTIME = 0.0 / [s] Ignition time of lamp #i
      HIERARCH ESO SEQ LAMP3 ONTIME = 1.0 / [s] Ignition time of lamp #i
      HIERARCH ESO SEQ LAMP4 ONTIME = 2.0 / [s] Ignition time of lamp #i
      HIERARCH ESO SEQ LAMP5 ONTIME = 4.0 / [s] Ignition time of lamp #i
      HIERARCH ESO SEQ LAMP6 ONTIME = 2.0 / [s] Ignition time of lamp #i
    once those are actually present in the data
  . investigate again to use mm units in the geometry table instead of pix.

