.. 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: projects.rst,v 1.3 2012/11/17 08:31:55 dmotl Exp $

.. index::
   single: project
   
.. _projects:   
   
Projects 
========

The concept of projects was introduced to retain the products of the CCD frame calibration
and reduction even when another data sets were processed; it allows one to revert back to 
the data that have been already processed without necessity of processing them again.


Project types
-------------

The project type is one of the project settings. It was introduced to optimalize the user
interface when a specific task is performed - for example, when one is making a master flat
frame, some of the tools, like the light curve dialog or the find variables dialog, can be 
kept from the menus and the toolbar, because they are not used in this context. The 
:ref:`Project settings dialog <project-settings-dialog>` is affected by the choice of the
project type as well. The dialog presents only parameters that that used in the selected task.

When a new project is created, the program asks one to specify a type of the new project.
You can change the type afterwards in the :ref:`Project settings dialog <project-settings-dialog>`.
Plase note, that choice of the project type only affects visibility of user interface controls,
a full set of configuration parameters is always kept in the project - no data are lost when
you switch between project types.


Managing projects
-----------------

The Muniwin program allows one:

* To create a new project - :ref:`new-project-dialog`
* To open an existing project - :ref:`open-project-dialog`
* To rename the opened project using the :ref:`Project settings dialog <project-settings-dialog>`
* To make a copy of a project - :ref:`save-project-dialog`
* To import data from old C-Munipack into a new project - :ref:`import-project-dialog`


Project settings
----------------

All configuration parameters that affect the data processing are retained in the project,
allowing one to work with multiple configurations efficiently. When the projects settings
are changed, the program updates the project. There is one exception to this rule - if
the project is opened in the 'read-only' mode, the new settings are kept in the memory,
but the project file is not changed.

User-defined :ref:`profiles` allows one to efficiently cope with a situation where using 
multiple distinct project settings is necessary. The profile keeps the set of configuration 
parameters; during the creting of a new project, the initial configuration is loaded
from a profile. See the :ref:`profiles` section for more information.


Files and directories
---------------------

The project consists of a set of files and folders, all of which are stored in a single
base directory. A main file, called project file, is found in the base directory and
it is distinguished by the "cmpack" extension. The project file keeps the project settings
and a table of frames. Files that are created during a data processing are stored in a
separate folder; it's name is derived from the project file name with a suffix "-files".


Making a backup copy of a project
---------------------------------

No special action is necessary to make a copy of a project; copy a project file, a directory 
with the "-files" suffix and all files that resides in it.

Restoring is also easy; just copy the files and directories to a folder and make sure that
you have the 'read-write' access to the project file, the directory with "-files" suffix
and also to all files that resides in it. When you open a project from a read-only location,
e.g. DVD, the program detects the situation and gives a warning; it allows you to open the
project in the 'read-only' mode; in this mode, it is allowed to make outputs, e.g. light curve, 
but operations that would change the data files are disallowed.


File locking
------------

When a project is opened more than once, the program detects this situation and notifies
a user. It allows one to open the project in the 'read-only' mode; in this mode, it is
allowed to make outputs, e.g. light curve, but operations that would change the data
files are disallowed. The file-based locking mechanism used should work over the network
in most situation, although this is not guaranteed in all configurations.


.. seealso:: :ref:`profiles`, :ref:`project-settings-dialog`, :ref:`new-project-dialog`, :ref:`load-profile-dialog`
