Skip to main content

Calculate pressures and temperatures of melting for basaltic rocks and fit with melting models.

Project description

DOI

meltPT

meltPT is a Python package for whole-rock major-element themormobarometric analyses of basaltic (mafic) rocks. It contains modules for:

  • Correcting sample compositions for effects of olivine crystallisation
  • Estimating pressures and temperatures at which samples were last in equilibrium with the mantle
  • Estimating melt fractions and potential temperatures on an individual basis or for a suite of samples

Installation

Linux/Mac

To avoid incompatibility issues with other packages you may have installed, we recommend running meltPT in a virtual environment. Start a terminal and enter:

$ # Create virtual environment.
$ # Replace /path/to/virtual/environment with your desired path.
$ python3 -m venv /path/to/virtual/environment

$ # Activate new virtual environment.
$ source /path/to/virtual/environment/bin/activate

Note that, when using a virtual environment, some users may experience issues trying to display images created with matplotlib (e.g., in our tutorials): the default matplotlib backend is sometimes "agg", which cannot show figures. There does not seem to be a universal solution to this issue, so please see here for some options on how to proceed.

What you do next depends on whether you just want to use meltPT as is or if you want to edit the source code.

Basic Usage

If you just want to use meltPT as it is you can now simply type:

(meltpt) $ pip install meltPT

This will take a minute or two and print lots of stuff. If it completes successfully, you are now ready to use meltPT!

Development usage

If you want to edit meltPT's source code, you first need to download it. Navigate to your desired location and type:

(meltpt) $ git clone git@github.com:fmcnab/meltPT.git

You should now have a directory called "meltPT". To install the package, enter this directory and run the setup script. Using the -e flag means that the code will be installed in "editable" mode, and changes you make locally will be incorporated without the need for a fresh install.

(meltpt) $ cd meltPT
(meltpt) $
(meltpt) $ # Standard install
(meltpt) $ pip install -e .
(meltpt) $
(meltpt) $ # Including extra dependencies - 
(meltpt) $ # required for those who wish to compile documentation locally.
(meltpt) $ pip install .[docs]
(meltpt) $ pip install -e .[docs] # (editable)

This will take a minute or two and print lots of stuff. If it completes successfully, you are now ready to use meltPT!

Windows

Unfortunately, we don't know much about using Python on a Windows system. But we plan to find out!

Using meltPT

Under ./Examples/Tutorials, you will find some exaple scripts to help you get started.

For more information, the meltPT ReadtheDocs page has full documentation for the codebase, a series of informative tutorials, information about contributing and our liscence.

Citing meltPT

If you use our code, please cite us. Currently each meltPT release is archived in our Zenodo repository:

Please be sure to include the version number of the code you used, so that others can reproduce your results. We are working on an accompanying publication which we hope will be available soon.

We also urge you to cite the original literature on which our code is based. The sample backtracking method is based on that of Lee et al. (2009, EPSL). For a list of themormobarometric schemes available in meltPT, and links to the original papers, see the
Thermobarometers section of our documentation.

If you use our melt-path fitting routines you should also cite:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meltPT-1.0.0.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

meltPT-1.0.0-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file meltPT-1.0.0.tar.gz.

File metadata

  • Download URL: meltPT-1.0.0.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for meltPT-1.0.0.tar.gz
Algorithm Hash digest
SHA256 678667b7844a3f1d1bd7d118bc467f730fef50d369531df4cf6c58b4c06f7b2e
MD5 9fdc7a41e3958320bc90cd881e8723dd
BLAKE2b-256 97edf4490c24dac222d11f104b764dbb7f89a566f8fdd63fdb4493a8e54333ad

See more details on using hashes here.

File details

Details for the file meltPT-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: meltPT-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for meltPT-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb4899750ae27a8138f2adb725af0aea1673f563748743828d6ed86d9944eefe
MD5 16c3e0ad17dbe3d4c5538bce28db7c56
BLAKE2b-256 f62e3fa89f7d0ba99a5073c155dcf188e9f7abf27036c4eee54cdea8c1e35610

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page