The hawki_sci_jitter recipe
===============================================================

.. data:: hawki_sci_jitter

Synopsis
--------

(OBSOLETE) Jitter recipe

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

(OBSOLETE) hawki_sci_jitter -- hawki imaging jitter recipe.


The input of the recipe files listed in the Set Of Frames (sof-file)
must be tagged as:
raw-file.fits JITTER_OBS or
raw-file.fits JITTER_SKY or
flat-file.fits FLAT_IM or
dark-file.fits DARK_IM 
bpm-file.fits BPM
distortion_x-file.fits DISTORTION_X
distortion_y-file.fits DISTORTION_Y

The recipe creates as an output:
hawki_sci_jitter.fits (COMBINED)
hawki_sci_jitter_stitched.fits (STITCHED)
hawki_sci_jitter_stars.fits (OBJ_PARAM): Detected objects properties
hawki_sci_jitter_stats.fits (JITTER_STATS): Stats of the individual images
hawki_sci_jitter_bkg_stats.fits (BKG_STATS): Statistics on the bkg

The recipe performs the following steps:
1) Frame statistics
2) Basic reduction (using FLAT_IM and BPM)
3) Background computation (the algorithm depends on parameter --sky_par) 
4) Offset refinement (uses parameters --off, --refine and --xcorr)
5) Stacking of jitter frames (uses --comb_meth, --rej,
   --offset_max, --borders, --max_njitter)
6) Stitching of the four detectors into one image
7) Object detection in the stacked image

Return code:
esorex exits with an error code of 0 if the recipe completes successfully
or 1 otherwise

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

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

   Create an object for the recipe hawki_sci_jitter.

::

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

Parameters
----------

.. py:attribute:: hawki_sci_jitter.param.offsets

    offsets file (str; default: None) [default="None"].
.. py:attribute:: hawki_sci_jitter.param.objects

    objects file (str; default: None) [default="None"].
.. py:attribute:: hawki_sci_jitter.param.offset_max

    Maximum offset allowed (int; default: 1500) [default=1500].
.. py:attribute:: hawki_sci_jitter.param.sky_par

    Rejection parameters for sky filtering (str; default: '10,7,3,3') [default="10,7,3,3"].
.. py:attribute:: hawki_sci_jitter.param.refine

    refine offsets (bool; default: False) [default=False].
.. py:attribute:: hawki_sci_jitter.param.xcorr

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

    union / inter / first (str; default: 'union') [default="union"].
.. py:attribute:: hawki_sci_jitter.param.rej

    Low and high number of rejected values (str; default: '1,1') [default="1,1"].
.. py:attribute:: hawki_sci_jitter.param.borders

    Borders rejected (int; default: 4) [default=4].
.. py:attribute:: hawki_sci_jitter.param.max_njitter

    Maximum numbers of jitter frames to combine (int; default: -1) [default=-1].


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

::

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

   hawki_sci_jitter.param.offsets = "None"
   hawki_sci_jitter.param.objects = "None"
   hawki_sci_jitter.param.offset_max = 1500
   hawki_sci_jitter.param.sky_par = "10,7,3,3"
   hawki_sci_jitter.param.refine = False
   hawki_sci_jitter.param.xcorr = "20,20,25,25"
   hawki_sci_jitter.param.comb_meth = "union"
   hawki_sci_jitter.param.rej = "1,1"
   hawki_sci_jitter.param.borders = 4
   hawki_sci_jitter.param.max_njitter = -1


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

::

   import cpl
   hawki_sci_jitter = cpl.Recipe("hawki_sci_jitter")
   [...]
   res = hawki_sci_jitter( ..., param = {"offsets":"None", "objects":"None"})


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