Skip to main content

PmagPy is a comprehensive set of tools for analyzing paleomagnetic data. It facilitates interpretation of demagnetization data, Thellier-type experimental data and data from other types of rock magnetic experiments. PmagPy can be used to create a wide variety of useful plots and conduct statistical tests. It is designed to work with the MagIC database (https://earthref.org/MagIC), allowing manipulation of downloaded data sets as well as preparation of new contributions for uploading to the MagIC database. Functions within PmagPy can be imported and used in Jupyter notebooks enabling fully documented and nicely illustrated data analysis.

Citing PmagPy

Users of PmagPy should cite the open access article:

Tauxe, L., R. Shaar, L. Jonestrask, N. L. Swanson-Hysell, R. Minnett, A. A. P. Koppers, C. G. Constable, N. Jarboe, K. Gaastra, and L. Fairchild (2016), PmagPy: Software package for paleomagnetic data analysis and a bridge to the Magnetics Information Consortium (MagIC) Database, Geochem. Geophys. Geosyst., 17, https://doi.org/10.1002/2016GC006307.

Main features

PmagPy is comprised of:

  • GUI programs for getting data into MagIC database format (pmag_gui), analyzing demagnetization data (demag_gui) and analyzing paleointensity data (thellier_gui). These GUIs are available as part of the python package pmagpy-cli. Alternatively, these GUIs are available for download as standalone applications for macOS and Windows.
  • Command line programs for all sorts of paleomagnetic data analysis and wrangling (contained within the programs folder of the repository and pip installed as pmagpy-cli).
  • The pmagpy function modules for paleomagnetic data analysis (pmagpy.pmag) and plotting (pmagpy.pmagplotlib) as well as a function module that further enables paleomagnetic data analysis within interactive computing environments such as the Jupyter notebook (pmagpy.ipmag). The functions within these modules are at the heart of the GUI and command line programs. With pmagpy installed (described below), these modules can be imported (e.g. from pmagpy import ipmag).
  • A rock magnetism module (pmagpy.rockmag) for processing and interpreting hysteresis, backfield, FORC, low-temperature, thermomagnetic, and anisotropy experiments, demonstrated in the RockmagPy notebooks.
  • Example data files that are used in the examples provided in the PmagPy documentation notebooks

Use of all these features is described in the PmagPy documentation and the underlying science behind the data and code can be explored in the book Essentials of Paleomagnetism: Third Web Edition. Example Jupyter notebooks using PmagPy can be found in this repository

How to get it

Full instructions for installing and using PmagPy are in the PmagPy documentation. You don't need a programming background to follow them. In brief:

I want to... Do this
Use Pmag GUI, Demag GUI, or Thellier GUI, and nothing else Download the standalone application for macOS or Windows (no Python needed)
Try PmagPy without installing anything Use the EarthRef JupyterHub, or run %pip install pmagpy in a Google Colab notebook
Use PmagPy in Jupyter notebooks, run the command-line programs, or run the GUIs on Linux Install PmagPy on your computer with conda and pip
Contribute to PmagPy, or use changes before they are released Do a developer install

Install on your computer

The recommended approach uses Miniforge to create a conda environment with the scientific Python packages, and then pip to install PmagPy. With Miniforge installed, run these commands in a terminal (on Windows, in Miniforge Prompt):

conda create -n pmagpy -c conda-forge python=3.12 numpy scipy matplotlib pandas cartopy shapely wxpython pyqt jupyterlab pip
conda activate pmagpy
pip install --upgrade pmagpy pmagpy-cli

pmagpy contains the function modules used in Jupyter notebooks and your own code; pmagpy-cli adds the command-line programs and the GUIs. To update later, activate the environment and rerun the last command. The installation guide explains each step, and the troubleshooting page covers common problems.

Developer install

To work from the source code (the master branch or your own fork) rather than a release, clone the repository, create an environment from its environment.yml, and install it in editable mode:

git clone https://github.com/PmagPy/PmagPy.git
cd PmagPy
conda env create -f environment.yml -n pmagpy-dev
conda activate pmagpy-dev
pip install -e ".[maps]"

Edits to the code, and git pull, take effect immediately without reinstalling. The command-line programs and GUIs can be run from the programs directory (for example, python pmag_gui.py), or installed from the released pmagpy-cli package alongside the editable library. Full details are in the developer install instructions.

Background and support

The code base for the PmagPy project has been built up over many years by Lisa Tauxe (Professor Emerita at the Scripps Institution of Oceanography) supported by grants from the National Science Foundation. Substantial contributions to the project have been made by Nick Swanson-Hysell (Associate Professor at the University of Minnesota), Ron Shaar (Associate Professor at the Hebrew University of Jerusalem), Lori Jonestrask and Kevin Gaastra as well as others.

Contributing

If you want to get involved with the project - whether that means reporting a bug, requesting a feature, or adding significant code - please check out the project's Contribution guidelines.

More information

This code and the PmagPy documentation are companions to the the book Essentials of Paleomagnetism: Third Web Edition (http://earthref.org/MagIC/books/Tauxe/Essentials/) written by Lisa Tauxe with contributions from Subir K. Banerjee, Robert F. Butler and Rob van der Voo. The printed version of the book came out in January, 2010 from University of California Press (http://www.ucpress.edu/book.php?isbn=9780520260313).

Licensing

This code can be freely used, modified, and shared. It is licensed under a 3-clause BSD license. See license.txt for details.

Metadata

Release files for pmagpy-cli 4.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pmagpy-cli 4.6.0
File Size Uploaded Provenance Actions
pmagpy_cli-4.6.0.tar.gz 999.5 kB Without provenance Details for pmagpy_cli-4.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pmagpy-cli 4.6.0
File Interpreter ABI Platform Actions
pmagpy_cli-4.6.0-py3-none-any.whl Python 3 none any Details for pmagpy_cli-4.6.0-py3-none-any.whl

Total release size: 2.0 MB

Release files / pmagpy_cli-4.6.0.tar.gz

Download URL pmagpy_cli-4.6.0.tar.gz
Size 999.5 kB
Tags Source
SHA-256 checksum
How to use checksums
190e49b5dac767842323acab75645b10d9ab1aa9ffd4e2d78eb9777251e9311f
BLAKE2b-256 checksum
How to use checksums
838d8ad1f326264d600fa9cc949fd785b375af1168ba92e126f530b4ed4e6eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / pmagpy_cli-4.6.0-py3-none-any.whl

Download URL pmagpy_cli-4.6.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
20e3d96619a3bb6682fcf4f214eb8cab2360b508df591eaac35032725fa4a83e
BLAKE2b-256 checksum
How to use checksums
051c5eb350b7d1e0d20a878db7cc8f3854566f5ae221415eee73c82ddec2fb24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for pmagpy-cli 4.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.6.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page