============
Introduction
============

Introduction to irfpy.aspera package set
========================================
This provide ananlysis environment for ASPERA.  Both ASPERA-3 and -4 is supported.

Module structure
=================
The `irfpy.aspera` consists of several packages as listed below.

- :mod:`irfpy.mexpvat` for MEX orbit and attitude
- :mod:`irfpy.vexpvat` for VEX orbit and attitude
- :mod:`irfpy.mima` for MEX IMA
- :mod:`irfpy.vima` for VEX IMA
- :mod:`irfpy.imacommon` for common IMA package for MEX and VEX
- :mod:`irfpy.mels` for MEX ELS
- :mod:`irfpy.vels` for VEX ELS
- :mod:`irfpy.vels.bible` for VEX ELS bible to use calibration.
- :mod:`irfpy.elscommon` for common ELS package for MEX and VEX
- :mod:`irfpy.mnpi` for MEX NPI
- :mod:`irfpy.vnpi` for VEX NPI
- :mod:`irfpy.npicommon` for common NPI package for MEX and VEX
- :mod:`irfpy.mnpd` for MEX NPD
- :mod:`irfpy.vnpd` for VEX NPD
- :mod:`irfpy.npdcommon` for common NPD package for MEX and VEX
- :mod:`irfpy.vexop` for VEX operation related package

Configuration file
==================

The configuration file is needed for running the library correctly.
Create a file :file:`./.irfpyrc` or :file:`$HOME/.irfpyrc`.

See sample below.  The folder should be properly specified.

.. todo::

    The example below should be revised to up-to-date.

.. code-block:: text

    [mexop]
    default_eventfile = /irf/spaghetti/mars/support/EV_ASPERA.MEX
    
    [mexpvat]
    # Used in orbnum.py
    # If this is local directory name, auto file selection is conducted.
    orbnruri=/irf/spaghetti/mars/spice/kernels/orbnum
    
    # Used in pvat.py
    #pvaturibase=http://neptun.umea.irf.se/~peje/mex/orbit_plots/
    pvaturibase=http://rhea.umea.irf.se/~peje/mex/orbit_plots/
    #
    # Used in spice
    spiceroot = /irf/spaghetti/mars/spice/kernels/
    mk = /irf/spaghetti/mars/spice/mex.mk
    
    [vexpvat]
    # Used in orbnum.py
    # If this is local directory name, auto file selection is conducted.
    orbnruri=/irf/spaghetti/venus/spice/kernels/orbnum
    
    # Used in pvat.py
    #pvaturibase=http://neptun.umea.irf.se/~peje/vex/orbit_plots/
    pvaturibase=http://rhea.umea.irf.se/~peje/vex/orbit_plots/
    
    # Used in pvat2.py
    pvatbase=/irf/spaghetti/venus/orbit_plots/
    
    # Used in spice
    spiceroot = /irf/spaghetti/venus/spice/kernels/
    mk = /irf/spaghetti/venus/spice/vex.mk
    
    [asperacommon]
    windatmarsbase = /irf/spaghetti/mars/support/WIND/
    
    [mima]
    imamatbase = /irf/spaghetti/mars/imadata/
    backgroundbase = /irf/spaghetti/mars/background/
    imaddncbase = /irf/spaghetti/mars/DD/NC/
    
    [mnpi]
    backgroundbase = /irf/spaghetti/mars/background_npi/
    
    [vnpi]
    backgroundbase = /irf/spaghetti/venus/background_npi/
    
    [vima]
    imamatbase = /irf/spaghetti/venus/imadata/
    backgroundbase = /irf/spaghetti/venus/background/
    imaextrabase = /irf/spaghetti/venus/DD/NC/IMAEXTRA/
    imaddncbase = /irf/spaghetti/venus/DD/NC/
    irfimauribase = /irf/spaghetti/venus/irfima/Venus_mat_files/
    
    [vels]
    elsmatbase = /irf/spaghetti/venus/elsdata
    
    [vmag]
    vmagbase = /irf/spaghetti/venus/mag
    
    [mels]
    elsmatbase = /irf/spaghetti/mars/elsdata/
    fluxmaturibase = /irf/spaghetti/mars/elsflux/mat