.. C-Munipack - User's manual

   Copyright 2012 David Motl

   Permission is granted to copy, distribute and/or modify this document under the
   terms of the GNU Free Documentation License, Version 1.2 or any later version published
   by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and
   no Back-Cover Texts.

   $Id: advanced_calibration.rst,v 1.2 2012/09/01 12:47:00 dmotl Exp $

.. index:: 
   pair: Advanced calibration; scheme

.. _advanced-calibration-scheme:
 
Advanced calibration scheme
===========================

The standard calibration of CCD frames uses single dark frame and single flat frame.
To obtain reasonable results, it is necessary to use dark frame of the same exposure duration
as the scientific images. If you observe several objects during a night and those objects have
different magnitude, different exposure durations are often used. But in this case you will
need to carry out as many sets of dark frames as the number of exposures you have chosen.
This task may be quite time consuming work. This disadvantage can be solved by advanced
calibration, which involves scalable dark frames. The reduction process in this case is a
bit more complicated than standard one, so it is recommended to experienced users only.


.. index:: 
   pair: calibration; procedure

Calibration procedure
---------------------

#. Acquire a set of bias frames. They are carried out by the similar way as the
   dark frames, the exposure duration should be minimal (zero in ideal case). I used
   total number of 90 frames. The bias frames can be reused till some change to the
   camera hardware was made, so you need to acquire the set only once.
   
#. Each night, acquire the set of dark frames using long exposure duration. It
   is recommended to carry out dark frames on the end of observation, when the camera
   is enough uniformly cooled. I took ten frames, 120 seconds each.
   
#. Open the Muniwin program, open the :guilabel:`Tools` menu and click on
   the :guilabel:`Preferences` item. Select the :guilabel:`Calibration`
   tab and check the Use advanced calibration scheme option.
   
#. Add all bias frames (see step 1) to the table of input files. Convert them to
   temporary folder, check and remove all severed frames. Run the Make master-bias frame
   tool to make single master bias frame.
   
#. Clear the table of input files and add all dark frames (see step 2) to it.
   Convert files to the temporary folder, check and remove all severed frames. Open
   the Make master-dark frame tool, the dialog window opens. In the dialog, check the
   :guilabel:`Make scalable dark frame` option. Close the dialog by the
   :guilabel:`OK` button.
   
#. In the Select a bias-frame dialog, select file, which contains the master bias
   frame (see step 4) from the list. Click on the :guilabel:`OK` button to continue.
  		
#. In the following dialog select a directory and enter the name of output file
   to be saved. Press the :guilabel:`Save` button.
   
#. Clear the table of input files again, add the scientific images to it and convert
   them to the temporary folder. Open the :guilabel:`Corrections` menu and select
   the :guilabel:`Bias frame` item. A new dialog window opens, find and
   select the bias frame, which was made in step 4. Next, open the Dark frame dialog and
   select the dark frame made in step 7.
   
#. Continue in reduction of source images by standard way.


Remarks
-------

- The :index:`scalable dark frame <triple: scalable; dark; frame>` is automatically detected using 
  the information stored in the file header. For all other frames which are not considered to be scalable ones,
  the standard calibration is used.

 
.. seealso:: :ref:`bias-correction-dialog`, :ref:`master-bias-frame-dialog`, :ref:`dark-correction-dialog`, 
   :ref:`master-dark-frame-dialog`, :ref:`project-settings-dialog`
