.. 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: munilist_command.rst,v 1.2 2016/05/21 05:25:22 dmotl Exp $

.. program:: munilist
	
.. index::
   pair: munilist; command

.. _munilist-command:

munilist (command)
==================

utility for making listings from a set of photometry files


Synopsis
--------
			
munilist [ options ] *output-file* *input-files* ...


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

The :command:`munilist` command reads files generated by other commands and
generates a table according to the format specified using command line parameters or a configuration
file. The basic mode is creating a light curve where the munilist utility is used to read matched 
photometry files and creates the table of magnitudes of selected stars in the dependence on a time. 
The table is written to a output file in text format. The format of the table depends on given 
parameters and on the number of selected stars. It is usually the last step of reduction process.
Other modes are designed to print a table of objects from a reference photometry file or a catalogue
file.

The list of stars is given on command line, the stars are identified by index number according
to their cross-reference identifiers.


.. _munilist-input-files:

Input files
-----------

Names of input files can be specified directly on a command-line as command arguments; it is allowed to use the 
usual wild-card notation. In case the input files are placed outside the working directory, you have to specify 
the proper path relative to the current working directory.

Alternatively, you can also prepare a list of input file names in a text file, each input file on a separate line. 
It is not allowed to use the wild-card notation here. Use the -i option to instruct the program to read the file.


Options
-------

Options are used to provide extra information to customize the execution of a command. They are specified as command 
arguments.

Each option has a full form starting with two dashes and an optional short form starting with one dash only. Options 
are case-sensitive. It is allowed to merge two or more successive short options together. Some options require a value; 
in this case a value is taken from a subsequent argument. When a full form is used, an option and its value can also 
be separated by an equal sign. When a short form is used, its value can immediately follow the option.

Whenever there is a conflict between a configuration file parameter and an option of the same meaning, the option 
always take precedence.

.. option:: --light-curve

   make a light curve (default)
   
.. option:: --chart

   make a table of objects from a photometry file or a catalogue file. Only the first input file is processed.
   
.. option:: --obj-plot:

   takes an object identification using the 'object' parameter and makes a table 
   containing object properties (e.g. FWHM) from each given input photometry file.
   
.. option:: --track-list

   make table of frame offsets w.r.t. the reference frame or a catalogue file.
   The table contains relative offsets in X and Y axis of the frame center in pixels.

.. option:: --diff-mag

    make table of differential instrumental magnitudes (default)
			
.. option:: --inst-mag

    make table of absolute instrumental magnitudes

.. option:: --object <star>

   object identifier for 'obj-plot' output
			
.. option:: -s, --set <name=value>

    set value of configuration parameter
			
.. option:: -a, --aperture <value>

    Aperture identifier (default=1)
			
.. option:: -v, --variable-stars <star,star,...>

    comma separated list of identifier(s) of the variable star(s)
			
.. option:: -c, --comparison-stars <star,star,...>

    comma separated list of identifier(s) of the comparison star(s)
			
.. option:: -e, --check-stars  star...

    comma separated list of identifier(s) of the check star(s)
			
.. option:: -i, --read-dirfile <filepath>

    read list of input files from specified file; see the :ref:`munilist-input-files` section for details.
			
.. option:: -p, --configuration-file <filepath>

    read parameters from given configuration file. See the :ref:`munilist-configuration-file` section for 
    details.
			
.. option:: -h, --help

    print list of command-line parameters
			
.. option:: -q, --quiet

    quiet mode; suppress all messages
			
.. option:: --version

    print software version string
			
.. option:: --licence

    print software licence
			
.. option:: --verbose

    verbose mode; print debug messages
			

.. _munilist-configuration-file:

Configuration file
------------------

Configuration files are used to set the input parameters to the process that is going to be executed by a command. 
Use the -p option to instruct the program to read the file before other command-line options are processed.

The configuration file consists of a set of parameters stored in a text file. Each parameter is stored on a separate 
line in the following form: name = value, all other lines are silently ignored. Parameter names are case-sensitive.

.. confval:: aperture =  value

    Aperture identifier (default=1)
			
.. confval:: var =  star,star,...

    comma separated list of identifier(s) of the variable star(s)
			
.. confval:: comp =  star,star,...

    comma separated list of identifier(s) of the comparison star(s)
			
.. confval:: check =  star,star,...

    comma separated list of identifier(s) of the check star(s)
		
    	
Examples
--------

::
	munilist output.dat test1.mat test2.mat test3.mat
	
The command makes table of brightness of the star #2 (stored on second position
in photometry files) relative to the star #3 for photometry files :file:`test1.mat`, 
:file:`test2.mat` a :file:`test3.mat`; the resulting frame is stored 
to :file:`output.dat`.
			
		
Exit status
-----------

The command returns a zero exit status if it succeeds to process all specified files. Otherwise, it will stop 
immediately when an error occurs and a nonzero error code is returned.
