The hawki_detector_noise recipe
===============================================================

.. data:: hawki_detector_noise

Synopsis
--------

HAWKI detector noise recipe

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

hawki_detector_noise -- HAWKI recipe to find readnoise and gain.


Compute the readnoise and gain for the hawki detectors using two
dark frames and two flat field frames. Both must have been exposed
with NDIT=1
The program accepts the following files in the SOF:

    Tag                   Description
    DARK                  A list of raw dark images
    FLAT_TWILIGHT         A list of raw flat images
    MASTER_BPM            Optional master bad pixel mask or
    MASTER_CONF           Optional master confidence map
If a master bad pixel mask or confidence map is included then thebad pixels will be flagged during the statistical analysis

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

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

   Create an object for the recipe hawki_detector_noise.

::

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

Parameters
----------

.. py:attribute:: hawki_detector_noise.param.thresh

    Rejection threshold in sigma above background (float; default: 5.0) [default=5.0].


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

::

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

   hawki_detector_noise.param.thresh = 5.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_detector_noise = cpl.Recipe("hawki_detector_noise")
   [...]
   res = hawki_detector_noise( ..., param = {"thresh":5.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 `Jim Lewis <jrl@ast.cam.ac.uk>`_. 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) 2015 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., 59 Temple Place, Suite 330, Boston, 
MA  02111-1307  USA

.. codeauthor:: Jim Lewis <jrl@ast.cam.ac.uk>
