The hawki_step_refine_offsets recipe
===============================================================

.. data:: hawki_step_refine_offsets

Synopsis
--------

(OBSOLETE) Jitter recipe

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

(OBSOLETE) hawki_step_refine_offsets -- utility to refine the nominal offsets.

This utility will take the offsets in the header as a first approach
and tries to refine them correlating the input images at the points
given by the detected objects.

The input of the recipe files listed in the Set Of Frames (sof-file)
must be tagged as:
images.fits DIST_CORRECTED or
images.fits BKG_SUBTRACTED and
det_obj_stats.fits OBJ_PARAM
The recipe creates as an output:
hawki_step_refine_offsets.fits (OFFSETS_REFINED): Table with refined offsets
Return code:
esorex exits with an error code of 0 if the recipe completes successfully
or 1 otherwise

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

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

   Create an object for the recipe hawki_step_refine_offsets.

::

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

Parameters
----------

.. py:attribute:: hawki_step_refine_offsets.param.xcorr

    Cross correlation search and measure sizes (str; default:  '20,20,25,25') [default="20,20,25,25"].
.. py:attribute:: hawki_step_refine_offsets.param.nbrightest

    Number of brightest objects to use (int; default: 3) [default=3].


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

::

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

   hawki_step_refine_offsets.param.xcorr = "20,20,25,25"
   hawki_step_refine_offsets.param.nbrightest = 3


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

::

   import cpl
   hawki_step_refine_offsets = cpl.Recipe("hawki_step_refine_offsets")
   [...]
   res = hawki_step_refine_offsets( ..., param = {"xcorr":"20,20,25,25", "nbrightest":3})


.. 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>
