The vmifustandard recipe
===============================================================

.. data:: vmifustandard

Synopsis
--------

Extract a standard star spectrum.

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

This recipe extracts IFU standard star fiber spectra using the input
extraction mask, after aligning it to the brightest fiber spectra
detected on the input exposure. The extracted spectra are then
resampled at a constant wavelength step, after aligning the input
wavelength calibration to the positions of a set of identified sky
lines. The extracted spectra are finally corrected for the relative
differences in transmission from fiber to fiber, and summed together.


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

  DO category:            Type:       Explanation:           Required:
  IFU_STANDARD            Raw         Standard star spectra     Y
  MASTER_BIAS             Calib       Master bias               Y
  IFU_TRACE               Calib       Extraction mask           Y
  IFU_IDS                 Calib       Wavelength calibration    Y
  IFU_TRANSMISSION        Calib       Transmission correction   Y
  EXTINCT_TABLE           Calib       Atmospheric extinction    Y
  STD_FLUX_TABLE          Calib       Standard star fluxes      Y
  CCD_TABLE               Calib       Bad pixel table           .


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

  DO category:            Data type:  Explanation:
  IFU_STANDARD_REDUCED    FITS image  Reduced standard star spectra
  IFU_FOV                 FITS image  Reconstructed field-of-view image
  IFU_STANDARD_EXTRACTED  FITS table  Total standard star spectrum
  IFU_SCIENCE_SKY         FITS table  Total sky spectrum
  IFU_SPECPHOT_TABLE      FITS table  Efficiency and response curves

The extraction mask, the wavelength calibration, and the relative
transmission table, are those generated by the recipe vmifucalib. A CCD
table must be specified only if a bad pixel cleaning is requested.


The spectra extracted from the fibers on the standard star are added
and compared to the catalog fluxes of the same star, to obtain the
efficiency curve and the response curve to use for flux calibration.

The procedure is the same as the one applied in the case of MOS data,
by recipe vmmosstandard.



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

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

   Create an object for the recipe vmifustandard.

::

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

Parameters
----------

.. py:attribute:: vmifustandard.param.BiasMethod

    Bias removal method. (str; default: 'Zmaster') [default="Zmaster"].
.. py:attribute:: vmifustandard.param.CleanBadPixel

    Bad pixel correction on master flat field. (bool; default: False) [default=False].
.. py:attribute:: vmifustandard.param.UseSkylines

    Use sky lines to refine the wavelength calibration (bool; default:  True) [default=True].
.. py:attribute:: vmifustandard.param.ResponseOrder

    Order of the polynomial used to smooth the instrument response curve.  (long; default: 5) [default=5].
.. py:attribute:: vmifustandard.param.ReduceAnyFrame

    Reduce any frame. (bool; default: False) [default=False].
.. py:attribute:: vmifustandard.param.ComputeQC

    Compute QC1 parameters (bool; default: True) [default=True].


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

::

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

   vmifustandard.param.BiasMethod = "Zmaster"
   vmifustandard.param.CleanBadPixel = False
   vmifustandard.param.UseSkylines = True
   vmifustandard.param.ResponseOrder = 5
   vmifustandard.param.ReduceAnyFrame = False
   vmifustandard.param.ComputeQC = True


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

::

   import cpl
   vmifustandard = cpl.Recipe("vmifustandard")
   [...]
   res = vmifustandard( ..., param = {"BiasMethod":"Zmaster", "CleanBadPixel":False})


.. 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 `ESO VIMOS Pipeline Team <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 VIMOS Instrument Pipeline
Copyright (C) 2002-2005 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 St, Fifth Floor, Boston, MA  02110-1301 USA


.. codeauthor:: ESO VIMOS Pipeline Team <usd-help@eso.org>
