The hawki_cal_dark recipe
===============================================================

.. data:: hawki_cal_dark

Synopsis
--------

(OBSOLETE) Dark recipe

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

(OBSOLETE) hawki_cal_dark -- Dark recipe
The files listed in the Set Of Frames (sof-file) must be tagged:
raw-file.fits DARK or
raw-file.fits TEC_FLAT.

The recipe creates as an output:
hawki_cal_dark.fits (DARK_IM): The master dark
hawki_cal_dark_bpmdark.fits(BPM_HOT): The bad pixel mask associated to the dark
hawki_cal_dark_stats.fits(DARK_STATS): Statistics of the raw darks
Optionally it also creates:
hawki_cal_dark_err.fits(DARK_ERR): The error in the master dark
Return code:
esorex exits with an error code of 0 if the recipe completes successfully
or 1 otherwise

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

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

   Create an object for the recipe hawki_cal_dark.

::

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

Parameters
----------

.. py:attribute:: hawki_cal_dark.param.sigma

    sigma for hot bad pixels detection (float; default: 10.0) [default=10.0].
.. py:attribute:: hawki_cal_dark.param.nsamples

    number of samples for RON computation (int; default: 100) [default=100].
.. py:attribute:: hawki_cal_dark.param.hsize

    half size of the window for RON computation (int; default: 6) [default=6].
.. py:attribute:: hawki_cal_dark.param.zone

    Stats zone (str; default: '512,512,1536,1536') [default="512,512,1536,1536"].
.. py:attribute:: hawki_cal_dark.param.gain

    Detector nominal gain (e-/ADU) (float; default: -1.0) [default=-1.0].
.. py:attribute:: hawki_cal_dark.param.ron

    Detector nominal RON for a single readout (ADU) (float; default: -1.0) [default=-1.0].


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

::

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

   hawki_cal_dark.param.sigma = 10.0
   hawki_cal_dark.param.nsamples = 100
   hawki_cal_dark.param.hsize = 6
   hawki_cal_dark.param.zone = "512,512,1536,1536"
   hawki_cal_dark.param.gain = -1.0
   hawki_cal_dark.param.ron = -1.0


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

::

   import cpl
   hawki_cal_dark = cpl.Recipe("hawki_cal_dark")
   [...]
   res = hawki_cal_dark( ..., param = {"sigma":10.0, "nsamples":100})


.. 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 `ESO Pipeline Group <https://support.eso.org>`_. Alternatively, you may 
send a report to the `ESO User Support Department <usd-help@eso.org>`_.

Copyright
---------

This file is part of the HAWKI Instrument Pipeline
Copyright (C) 2002,2011 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 Street, Fifth Floor, Boston, 
MA 02110-1301 USA

.. codeauthor:: ESO Pipeline Group <https://support.eso.org>