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 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 4.6.0
File Size Uploaded Provenance Actions
pmagpy-4.6.0.tar.gz 43.3 MB Without provenance Details for pmagpy-4.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 87.7 MB

Release files / pmagpy-4.6.0.tar.gz

Download URL pmagpy-4.6.0.tar.gz
Size 43.3 MB
Tags Source
SHA-256 checksum
How to use checksums
1dd56a746bf2df743c65355164348eea33612a6c637880bd991405a8c5be35a3
BLAKE2b-256 checksum
How to use checksums
f035e9b4ac1721e042907ec6e023657d820b10d0a515cf84f4a95c7d6efc1d39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

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

Download URL pmagpy-4.6.0-py3-none-any.whl
Size 44.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2b7dd9535736deeed66210f09ec01136be0e7e9d2de7a065b210c409cf0ffe21
BLAKE2b-256 checksum
How to use checksums
bf55a3dd9fdf483ecbfd24791fdd5aaf78e13f2050c2efa87b08d858a7f2ba58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for pmagpy 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