The sinfo_utl_cube_combine recipe
===============================================================

.. data:: sinfo_utl_cube_combine

Synopsis
--------

Coadd cubes in an output cube according to user defined offsets

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

This recipe perform cubes combination.

The input files are several cubeses
their associated tags should be the same that is supported by the 
recipe sinfo_rec_jitter: OBS_OBJ, OBS_STD, OBS_PSF.

The output is a cube PRO_CUBE resulting from the input cubes accurding 
to the value of op, where op indicates
the operation to be performed specified by the parameter 
sinfoni.sinfo_utl_cube_combine.op
 having alias 'op'
Information on relevant parameters can be found with
esorex --params sinfo_utl_cube_combine
esorex --help sinfo_utl_cube_combine


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

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

   Create an object for the recipe sinfo_utl_cube_combine.

::

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

Parameters
----------

.. py:attribute:: sinfo_utl_cube_combine.param.name_i

    Input filename. This must be provided and allow the user to set X and  Y cumulative offsets in a two column format (str; default:  'offset.list') [default="offset.list"].
.. py:attribute:: sinfo_utl_cube_combine.param.name_o

    Output filename (str; default: 'out_coadd_cube.fits') [default="out_coadd_cube.fits"].
.. py:attribute:: sinfo_utl_cube_combine.param.ks_clip

    Kappa sigma clipping (bool; default: False) [default=False].
.. py:attribute:: sinfo_utl_cube_combine.param.scale_sky

    Scale spatial mean (bool; default: False) [default=False].
.. py:attribute:: sinfo_utl_cube_combine.param.kappa

    Kappa value for sigma clip (float; default: 2.0) [default=2.0].
.. py:attribute:: sinfo_utl_cube_combine.param.xsize

    Output cube X size (long; default: 80) [default=80].
.. py:attribute:: sinfo_utl_cube_combine.param.ysize

    Output cube Y size (long; default: 80) [default=80].


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

::

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

   sinfo_utl_cube_combine.param.name_i = "offset.list"
   sinfo_utl_cube_combine.param.name_o = "out_coadd_cube.fits"
   sinfo_utl_cube_combine.param.ks_clip = False
   sinfo_utl_cube_combine.param.scale_sky = False
   sinfo_utl_cube_combine.param.kappa = 2.0
   sinfo_utl_cube_combine.param.xsize = 80
   sinfo_utl_cube_combine.param.ysize = 80


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

::

   import cpl
   sinfo_utl_cube_combine = cpl.Recipe("sinfo_utl_cube_combine")
   [...]
   res = sinfo_utl_cube_combine( ..., param = {"name_i":"offset.list", "name_o":"out_coadd_cube.fits"})


.. 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 `Andrea Modigliani <Andrea.Modigliani@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 SINFONI Instrument Pipeline
Copyright (C) 2002,2003 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:: Andrea Modigliani <Andrea.Modigliani@eso.org>
