The kmos_gen_telluric recipe
===============================================================

.. data:: kmos_gen_telluric

Synopsis
--------

Generate a TELLURIC frame

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

This recipe creates the TELLURIC frame needed by kmos_sci_red by merging
the TELLURIC (produced by kmos_std_star), the static RESPONЅE frame and 
the TELLURIC_CORR (produced with molecfit).

The way the frames are combined is controlled by the --method parameter:
   - 0 (default) : use TELLURIC and get zpoint from TELLURIC
           If TELLURIC missing, use RESPONSE and get zpoint from RESPONSE
   - 1 : use TELLURIC_CORR and get zpoint from TELLURIC_CORR
   - 2 : use RESPONSE and get zpoint from TELLURIC
           If TELLURIC missing, get zpoint from RESPONSE
           For missing ZPOINTs, use the average of other IFUs for the 
           same detector. 
   - 3 : use RESPONSE x TELLURIC_CORR and get zpoint from TELLURIC_CORR

Input files
^^^^^^^^^^^^
::

   DO category         Explanation                    Required 
   -----------         -----------                    -------- 
   TELLURIC            Produced  by kmos_std_star          N
   TELLURIC_CORR       Produced  bym molecfit              N
   RESPONSE            static calibration                  N

Output files
^^^^^^^^^^^^
::

   DO category         Explanation
   -----------         -----------
   TELLURIC            Used by kmos_sci_red


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

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

   Create an object for the recipe kmos_gen_telluric.

::

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

Parameters
----------

.. py:attribute:: kmos_gen_telluric.param.method

    How the TELLURIC is generated (long; default: 0) [default=0].


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

::

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

   kmos_gen_telluric.param.method = 0


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

::

   import cpl
   kmos_gen_telluric = cpl.Recipe("kmos_gen_telluric")
   [...]
   res = kmos_gen_telluric( ..., param = {"method":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 `Yves Jung <usd-help@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 CRIRES 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:: Yves Jung <usd-help@eso.org>
