| Name | meltPT JSON |
| Version |
1.2.1
JSON |
| download |
| home_page | https://github.com/fmcnab/meltPT |
| Summary | Calculate pressures and temperatures of melting for basaltic rocks and fit with melting models. |
| upload_time | 2024-08-21 08:10:23 |
| maintainer | None |
| docs_url | None |
| author | F. McNab, P. W. Ball |
| requires_python | >=3.7 |
| license | None |
| keywords |
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
[](https://zenodo.org/badge/latestdoi/430704582)
[](https://mybinder.org/v2/gh/fmcnab/meltPT/master)
# 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
Full documentation can be found [here](https://meltpt.readthedocs.io/en/latest/).
You can find more background information and some example analyses in our paper
in *Volcanica* [here](https://doi.org/10.30909/vol.06.01.6376).
## Installation
### Quickstart
To try out **meltPT** without having to install anything, you can run our
Tutorials in your browser via our
[Binder](https://mybinder.org/v2/gh/fmcnab/meltPT/master) page. You will find
our jupyter notebook tutorials under "./Tutorials/jupyter".
Alternatively, you can use the terminal function to run the tutorial scripts.
For example:
```
$ # Navigate to script directory.
$ cd Tutorials/scripts
$ # Run the first tutorial.
$ python3 Tutorial_1.py
```
### 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](https://matplotlib.org/3.1.3/faq/virtualenv_faq.html) 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
We do not have much experience running Python on a Windows system, but outline
here some basic steps that we have tested and believe should be accessible
to most users.
First, you need to install a Python package manager, if you don't have one
already. We tested the Miniforge3 installer from
[Miniforge](https://github.com/conda-forge/miniforge>), which is free to
anyone regardless of affiliation. If you are already running a different Conda
distribution, don't worry, the following steps should still work.
Once you have a package manager installed, open the program. You should see
a command prompt. Create a new environment in which to install **meltPT**,
called, for example, 'meltpt':
```
(base) > conda create meltpt
```
Next, activate the environment:
```
(base) > conda activate meltpt
(meltpt) >
```
If you want to install an Interactive Development Environment (IDE), allowing
you to edit scripts, use a Python interface etc., now is the time to install
it. For example, [Spyder](https://www.spyder-ide.org/>):
```
(meltpt) > conda install spyder
```
Finally, install **meltPT** using pip:
```
(meltpt) > pip install meltPT
```
If you wish to edit the source code, see the Linux/Mac instructions above for
alternative pip commands; these should also work in Conda. You should now be
ready to use **meltPT**!
## Using meltPT
Under ./Tutorials, you will find some exaple scripts to help you get
started.
For more information, the **meltPT** [ReadtheDocs](https://meltpt.readthedocs.io)
page has full documentation for the
[codebase](https://meltpt.readthedocs.io/en/latest/codedoc.html),
a series of informative
[tutorials](https://meltpt.readthedocs.io/en/latest/tutorials.html), information
about [contributing](https://meltpt.readthedocs.io/en/latest/contributing.html)
and our [liscence](https://meltpt.readthedocs.io/en/latest/license.html).
## Citing meltPT
If you use our code, please cite us!
* M<sup>c</sup>Nab, F. and Ball, P. W. (2023), ``meltPT``: A ``Python`` package
for basaltic whole-rock thermobarometric analysis with application to Hawai'i,
*Volcanica*, 6(1), p. 63–76, [doi: 10.30909/vol.06.01.6376](https://doi.org/10.30909/vol.06.01.6376).
You should also refer to the specific release of the code you used. For example,
the most recent **meltPT** release is archived in our Zenodo repository:
* M<sup>c</sup>Nab, F. and Ball, P. W. (2023), meltPT, version 1.2.1,
*Zenodo*, [doi: 10.5281/zenodo.6948030](https://doi.org/10.5281/zenodo.6948030).
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)](https://doi.org/10.1016/j.epsl.2008.12.020). For
a list of themormobarometric schemes available in **meltPT**, and links to the
original papers, see the\
[Thermobarometers](https://meltpt.readthedocs.io/en/latest/thermobarometers.html)
section of our documentation.
If you use our melt-path fitting routines you should also cite:
* pyMelt: [Matthews et al. (2022, Volcanica)](https://doi.org/10.30909/vol.05.02.469475)
* melting model for our examples:
[Katz et al. (2003, G-cubed)](https://doi.org/10.1029/2002GC000433)
Raw data
{
"_id": null,
"home_page": "https://github.com/fmcnab/meltPT",
"name": "meltPT",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": "F. McNab, P. W. Ball",
"author_email": "mcnab@gfz-potsdam.de",
"download_url": null,
"platform": null,
"description": "[](https://zenodo.org/badge/latestdoi/430704582)\n[](https://mybinder.org/v2/gh/fmcnab/meltPT/master)\n\n# meltPT\n\n**meltPT** is a Python package for whole-rock major-element themormobarometric \nanalyses of basaltic (mafic) rocks. It contains modules for:\n- Correcting sample compositions for effects of olivine crystallisation\n- Estimating pressures and temperatures at which samples were last in \n equilibrium with the mantle\n- Estimating melt fractions and potential temperatures on an individual basis\n or for a suite of samples\n \nFull documentation can be found [here](https://meltpt.readthedocs.io/en/latest/).\n\nYou can find more background information and some example analyses in our paper\nin *Volcanica* [here](https://doi.org/10.30909/vol.06.01.6376).\n\n## Installation\n\n### Quickstart\n\nTo try out **meltPT** without having to install anything, you can run our\nTutorials in your browser via our \n[Binder](https://mybinder.org/v2/gh/fmcnab/meltPT/master) page. You will find \nour jupyter notebook tutorials under \"./Tutorials/jupyter\".\nAlternatively, you can use the terminal function to run the tutorial scripts.\nFor example:\n\n```\n$ # Navigate to script directory.\n$ cd Tutorials/scripts\n\n$ # Run the first tutorial.\n$ python3 Tutorial_1.py\n```\n\n### Linux/Mac\n\nTo avoid incompatibility issues with other packages you may have installed, \nwe recommend running **meltPT** in a virtual environment. Start a terminal and\nenter:\n\n```\n$ # Create virtual environment.\n$ # Replace /path/to/virtual/environment with your desired path.\n$ python3 -m venv /path/to/virtual/environment\n\n$ # Activate new virtual environment.\n$ source /path/to/virtual/environment/bin/activate\n```\n\nNote that, when using a virtual environment, some users may experience issues\ntrying to display images created with matplotlib (e.g., in our tutorials): the\ndefault matplotlib backend is sometimes \"agg\", which cannot show figures. There\ndoes not seem to be a universal solution to this issue, so please see\n[here](https://matplotlib.org/3.1.3/faq/virtualenv_faq.html) for some options\non how to proceed. \n\nWhat you do next depends on whether you just want to use meltPT as is or if\nyou want to edit the source code.\n\n#### Basic Usage\n\nIf you just want to use **meltPT** as it is you can now simply type:\n\n```\n(meltpt) $ pip install meltPT\n```\n \nThis will take a minute or two and print lots of stuff. If it completes\nsuccessfully, you are now ready to use **meltPT**!\n\n#### Development usage\n\nIf you want to edit **meltPT**'s source code, you first need to download it.\nNavigate to your desired location and type:\n\n```\n(meltpt) $ git clone git@github.com:fmcnab/meltPT.git\n```\n\nYou should now have a directory called \"meltPT\". To install the package, enter\nthis directory and run the setup script. Using the -e flag means that the code\nwill be installed in \"editable\" mode, and changes you make locally will be\nincorporated without the need for a fresh install.\n\n```\n(meltpt) $ cd meltPT\n(meltpt) $\n(meltpt) $ # Standard install\n(meltpt) $ pip install -e .\n(meltpt) $\n(meltpt) $ # Including extra dependencies - \n(meltpt) $ # required for those who wish to compile documentation locally.\n(meltpt) $ pip install .[docs]\n(meltpt) $ pip install -e .[docs] # (editable)\n```\n\nThis will take a minute or two and print lots of stuff. If it completes\nsuccessfully, you are now ready to use **meltPT**!\n\n### Windows\n\nWe do not have much experience running Python on a Windows system, but outline\nhere some basic steps that we have tested and believe should be accessible\nto most users.\n\nFirst, you need to install a Python package manager, if you don't have one\nalready. We tested the Miniforge3 installer from \n[Miniforge](https://github.com/conda-forge/miniforge>), which is free to\nanyone regardless of affiliation. If you are already running a different Conda \ndistribution, don't worry, the following steps should still work.\n\nOnce you have a package manager installed, open the program. You should see\na command prompt. Create a new environment in which to install **meltPT**,\ncalled, for example, 'meltpt':\n\n```\n(base) > conda create meltpt\n```\n\nNext, activate the environment:\n\n```\n(base) > conda activate meltpt\n(meltpt) >\n```\n \nIf you want to install an Interactive Development Environment (IDE), allowing\nyou to edit scripts, use a Python interface etc., now is the time to install\nit. For example, [Spyder](https://www.spyder-ide.org/>):\n\n```\n(meltpt) > conda install spyder\n```\n \nFinally, install **meltPT** using pip:\n\n```\n(meltpt) > pip install meltPT\n```\n\nIf you wish to edit the source code, see the Linux/Mac instructions above for \nalternative pip commands; these should also work in Conda. You should now be \nready to use **meltPT**!\n\n## Using meltPT\n\nUnder ./Tutorials, you will find some exaple scripts to help you get\nstarted.\n\nFor more information, the **meltPT** [ReadtheDocs](https://meltpt.readthedocs.io)\npage has full documentation for the\n[codebase](https://meltpt.readthedocs.io/en/latest/codedoc.html), \na series of informative\n[tutorials](https://meltpt.readthedocs.io/en/latest/tutorials.html), information\nabout [contributing](https://meltpt.readthedocs.io/en/latest/contributing.html)\nand our [liscence](https://meltpt.readthedocs.io/en/latest/license.html).\n\n## Citing meltPT\n\nIf you use our code, please cite us!\n\n* M<sup>c</sup>Nab, F. and Ball, P. W. (2023), ``meltPT``: A ``Python`` package\n for basaltic whole-rock thermobarometric analysis with application to Hawai'i,\n *Volcanica*, 6(1), p. 63–76, [doi: 10.30909/vol.06.01.6376](https://doi.org/10.30909/vol.06.01.6376).\n\nYou should also refer to the specific release of the code you used. For example,\nthe most recent **meltPT** release is archived in our Zenodo repository:\n\n* M<sup>c</sup>Nab, F. and Ball, P. W. (2023), meltPT, version 1.2.1,\n *Zenodo*, [doi: 10.5281/zenodo.6948030](https://doi.org/10.5281/zenodo.6948030).\n\nWe also urge you to cite the original literature on which our code is based.\nThe sample backtracking method is based on that of \n[Lee et al. (2009, EPSL)](https://doi.org/10.1016/j.epsl.2008.12.020). For\na list of themormobarometric schemes available in **meltPT**, and links to the\noriginal papers, see the\\\n[Thermobarometers](https://meltpt.readthedocs.io/en/latest/thermobarometers.html)\nsection of our documentation.\n\nIf you use our melt-path fitting routines you should also cite:\n\n* pyMelt: [Matthews et al. (2022, Volcanica)](https://doi.org/10.30909/vol.05.02.469475)\n* melting model for our examples:\n [Katz et al. (2003, G-cubed)](https://doi.org/10.1029/2002GC000433)\n",
"bugtrack_url": null,
"license": null,
"summary": "Calculate pressures and temperatures of melting for basaltic rocks and fit with melting models.",
"version": "1.2.1",
"project_urls": {
"Homepage": "https://github.com/fmcnab/meltPT"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d499b7af3d3063f3590b7fee474c16b1c92786cee4c8746302cd49fba653b269",
"md5": "ea3793faf95ffaffc4bbc24cd94bac66",
"sha256": "6ac4782253c3d52c067dd6e8a1a413531b7fac4b655b35a540279af30d2232f8"
},
"downloads": -1,
"filename": "meltPT-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ea3793faf95ffaffc4bbc24cd94bac66",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 40650,
"upload_time": "2024-08-21T08:10:23",
"upload_time_iso_8601": "2024-08-21T08:10:23.438347Z",
"url": "https://files.pythonhosted.org/packages/d4/99/b7af3d3063f3590b7fee474c16b1c92786cee4c8746302cd49fba653b269/meltPT-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-21 08:10:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fmcnab",
"github_project": "meltPT",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "meltpt"
}