.. image:: https://zenodo.org/badge/763548550.svg
  :target: https://zenodo.org/badge/latestdoi/763548550


========
MagmaPEC
========
MagmaPEC is a flexible algorithm for correcting olivine-hosted melt inclusions for the effects of post-entrapment crystallisation (PEC) or melting  and includes error propagation of various parameters through a Monte-Carlo simulation. MagmaPEC is based on models implemented in `MagmaPandas <https://pypi.org/project/MagmaPandas/>`_.

Documentation
-------------
Code documentation and working examples are available at `magmapec.readthedocs.io <https://magmapec.readthedocs.io>`_


How to cite MagmaPandas
------------------------------
If you used MagmaPEC in your research, please reference  `this paper <http://dx.doi.org/10.1029/2025GC012420>`_ published in Geochemistry, Geophysics, Geosystems. To ensur≈e reproducibility, please also mention the release version of MagmaPEC and reference the specific models you used (see `MagmaPandas documentation <https://magmapandas.readthedocs.io/en/latest/code_documentation.html#references>`_).


Installation
------------
MagmaPEC can be installed with pip by running:

.. code-block:: bash

    pip install magmapec

in a terminal.
If you want to install from a specific git branch or release, use:

.. code-block:: bash

    pip install git+https://github.com/TDGerve/MagmaPEC.git@tag

where *tag* should be repleaced by the release tag or branch name (e.g. *v1.0.0* or *development*)





