The fors_sumflux recipe
===============================================================

.. data:: fors_sumflux

Synopsis
--------

Integrate flux from all or part of the input frame

Description
-----------

This recipe is used to monitor any lamp flux on the CCD. The input raw
image should be either a FLUX_ARC_LSS or a FLUX_FLAT_LSS frame. After the
background subtraction the total signal is integrated and divided by the
exposure time and by the total number of CCD original pixels (keeping
into account a possible rebinned readout). In the case of FORS2 frames
the background is the median level evaluated from the available overscan
regions. In the case of FORS1 data, where overscan regions are missing,
the background is evaluated as the median level of the first 200 CCD columns
for flat field data, while for arc lamp data a background map evaluated
from the regions without spectral lines is computed and subtracted. The
background subtracted frame is written to output in all cases, and the QC
parameters QC LAMP FLUX and QC LAMP FLUXERR are computed.


Input files
^^^^^^^^^^^^
::

  DO category:      Type:       Explanation:         Required:
  FLUX_FLAT_LSS     Raw         Flat field exposure     Y
  or FLUX_ARC_LSS   Raw         Arc lamp exposure       Y

Output files
^^^^^^^^^^^^
::

  DO category:      Data type:  Explanation:
  FLUX_LAMP_LSS     FITS image  Background subtracted integration region


Constructor
-----------

.. method:: cpl.Recipe("fors_sumflux")
   :noindex:

   Create an object for the recipe fors_sumflux.

::

   import cpl
   fors_sumflux = cpl.Recipe("fors_sumflux")

Parameters
----------

.. py:attribute:: fors_sumflux.param.xlow

    X coordinate of lower left corner of integration region (pixel) (int;  default: 0) [default=0].
.. py:attribute:: fors_sumflux.param.ylow

    Y coordinate of lower left corner of integration region (pixel) (int;  default: 0) [default=0].
.. py:attribute:: fors_sumflux.param.xhigh

    X coordinate of upper right corner of integration region (pixel) (0 =  CCD size) (int; default: 0) [default=0].
.. py:attribute:: fors_sumflux.param.yhigh

    Y coordinate of upper right corner of integration region (pixel) (0 =  CCD size) (int; default: 0) [default=0].


The following code snippet shows the default settings for the available 
parameters.

::

   import cpl
   fors_sumflux = cpl.Recipe("fors_sumflux")

   fors_sumflux.param.xlow = 0
   fors_sumflux.param.ylow = 0
   fors_sumflux.param.xhigh = 0
   fors_sumflux.param.yhigh = 0


You may also set or overwrite some or all parameters by the recipe 
parameter `param`, as shown in the following example:

::

   import cpl
   fors_sumflux = cpl.Recipe("fors_sumflux")
   [...]
   res = fors_sumflux( ..., param = {"xlow":0, "ylow":0})


.. seealso:: `cpl.Recipe <https://packages.python.org/python-cpl/recipe.html>`_
   for more information about the recipe object.

Bug reports
-----------

Please report any problems to `Carlo Izzo <usd-help@eso.org>`_. Alternatively, you may 
send a report to the `ESO User Support Department <usd-help@eso.org>`_.

Copyright
---------

This file is currently part of the FORS Instrument Pipeline
Copyright (C) 2002-2010 European Southern Observatory

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA


.. codeauthor:: Carlo Izzo <usd-help@eso.org>
