The visir_img_dark recipe
===============================================================

.. data:: visir_img_dark

Synopsis
--------

Dark recipe

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

This recipe computes the dark.

The files listed in the Set Of Frames (sof-file) must be tagged either
VISIR-dark-image-raw-file.fits IM_CAL_DARK or
VISIR-dark-spectro-raw-file.fits SPEC_CAL_DARK

The corresponding four products will each have a FITS card
'HIERARCH ESO PRO CATG' with values (for imaging)
IMG_DARK_AVG
IMG_DARK_HOT
IMG_DARK_COLD
IMG_DARK_DEV
  or (for spectroscopy)
SPEC_DARK_AVG
SPEC_DARK_HOT
SPEC_DARK_COLD
SPEC_DARK_DEV

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

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

   Create an object for the recipe visir_img_dark.

::

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

Parameters
----------

.. py:attribute:: visir_img_dark.param.r

    Rejected left right bottom and top border (pixel) (str; default: '50  50 50 50') [default="50 50 50 50"].
.. py:attribute:: visir_img_dark.param.hot_t

    Hot pixel map threshold (float; default: 10.0) [default=10.0].
.. py:attribute:: visir_img_dark.param.cold_t

    Cold pixel map threshold (float; default: 6.0) [default=6.0].
.. py:attribute:: visir_img_dark.param.dev_t

    Deviant pixel map threshold (float; default: 5.0) [default=5.0].
.. py:attribute:: visir_img_dark.param.nsamples

    Number of samples for Read-Out Noise (RON) computation (long; default:  100) [default=100].
.. py:attribute:: visir_img_dark.param.hsize

    Half size of the window for Read-Out Noise (RON) computation (long;  default: 2) [default=2].


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

::

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

   visir_img_dark.param.r = "50 50 50 50"
   visir_img_dark.param.hot_t = 10.0
   visir_img_dark.param.cold_t = 6.0
   visir_img_dark.param.dev_t = 5.0
   visir_img_dark.param.nsamples = 100
   visir_img_dark.param.hsize = 2


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

::

   import cpl
   visir_img_dark = cpl.Recipe("visir_img_dark")
   [...]
   res = visir_img_dark( ..., param = {"r":"50 50 50 50", "hot_t":10.0})


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

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

Please report any problems to `Lars Lundin <llundin@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 VISIR Instrument Pipeline
Copyright (C) 2004, 2005 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  02111-1307  USA

.. codeauthor:: Lars Lundin <llundin@eso.org>
