PyGMI - a python package for geoscience modelling and interpretation

PyGMI - a python package for geoscience modelling and interpretation - Published in JOSS (2025)

https://github.com/patrick-cole/pygmi

Science Score: 98.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: science.org, joss.theoj.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

geophysics remote-sensing seismology

Scientific Fields

Political Science Social Sciences - 90% confidence
Artificial Intelligence and Machine Learning Computer Science - 62% confidence
Last synced: 4 months ago · JSON representation ·

Repository

PyGMI - Python Geophysical Modelling and Interpretation

Basic Info
Statistics
  • Stars: 94
  • Watchers: 13
  • Forks: 21
  • Open Issues: 3
  • Releases: 42
Topics
geophysics remote-sensing seismology
Created over 11 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.rst

PyGMI
=====

.. |pythonversion| image:: https://img.shields.io/pypi/pyversions/pygmi
   :alt: PyPI - Python Version
   :target: https://pypi.org/project/pygmi
.. |pygmiversion| image:: https://img.shields.io/pypi/v/pygmi
   :alt: PyPI - Version
   :target: https://pypi.org/project/pygmi
.. |pygmilicence| image:: https://img.shields.io/github/license/patrick-cole/pygmi
   :alt: GitHub License
   :target: https://github.com/Patrick-Cole/pygmi/blob/pygmi3/LICENSE.txt
.. |pygmirelease| image:: https://img.shields.io/github/release/patrick-cole/pygmi
   :alt: GitHub Release
   :target: https://github.com/Patrick-Cole/pygmi/releases
.. image:: https://joss.theoj.org/papers/10.21105/joss.07019/status.svg
   :target: https://doi.org/10.21105/joss.07019


|pythonversion| |pygmiversion| |pygmilicence| |pygmirelease|

Overview
--------

PyGMI stands for Python Geoscience Modelling and Interpretation. It is a modelling and interpretation suite aimed at magnetic, gravity, remote sensing and other datasets. PyGMI has a graphical user interface, and is meant to be run as such.

PyGMI is developed at the `Council for Geoscience `_ (Geological Survey of South Africa).

It includes:

* Magnetic and Gravity 3D forward modelling.
* Cluster Analysis, including use of scikit-learn libraries.
* Routines for cutting, reprojecting and doing simple modifications to data.
* Convenient display of data using pseudo-color, ternary and sunshaded representation.
* MT processing and 1D inversion using MTpy.
* Gravity processing.
* Seismological functions for SEISAN data.
* Remote sensing ratios and improved imports.

It is released under the `Gnu General Public License version 3.0 `_

The PyGMI `Wiki `_ pages, include installation and full usage! Contributors can check this `link `_ for ways to contribute.

The latest release version (including windows installers) can be found `here `_.

You may need to install the `Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 `_.

If you have any comments or queries, you can contact the author either through `GitHub `_ or via email at pcole@geoscience.org.za


Installation
------------
The simplest installation of PyGMI is on Windows, using a pre-built installer at `64-bit `_.

If you prefer building from source, you can use PyPi or Conda.

Once built using PyPi, running pygmi can be done at the command prompt as follows:

   pygmi

If you are in python, you can run PyGMI by using the following commands:

   from pygmi.main import main

   main()

If you prefer not to install pygmi as a library, download the source code and execute the following command to run it manually:

   python quickstart.py

Requirements
^^^^^^^^^^^^
PyGMI will run on both Windows and Linux. It should be noted that the main development is done in Python 3.13 on Windows.

PyGMI should still work with Python 3.10.

PyGMI is developed and has been tested with the following libraries in order to function:

* fiona>=1.10.1
* geopandas>=1.0.1
* h5netcdf>=1.6.1
* matplotlib>=3.10.1
* natsort>=8.4.0
* numba>=0.61.2
* numexpr>=2.10.2
* openpyxl>=3.1.5
* psutil>=7.0.0
* pyside6>=6.9.0
* pytest>=8.3.5
* pyvista>=0.45.0
* pyvistaqt>0.11.2
* rasterio>=1.4.3
* rioxarray>=0.19.0
* scikit-learn>=1.6.1
* scikit-image>=0.25.2
* shapelysmooth>=0.2.1
* simpeg>=0.24.0
* beautifulsoup4>=4.13.4
* pwlf>=2.5.1

PyPi - Windows
^^^^^^^^^^^^^^
Windows users can use the `WinPython `_ distribution as an alternative to Anaconda. It comes with most libraries preinstalled, so using pip should be sufficient.

Install with the following command.

   pip install pygmi

Should you wish to manually install binaries, related binaries can be obtained at the `website `_ by Christoph Gohlke.

If you wish to update GDAL, you will need to download and install:

* fiona
* GDAL
* pyproj
* rasterio
* Rtree
* shapely

All these binaries should be downloaded since they have internal co-dependencies.

PyPi - Linux
^^^^^^^^^^^^
Linux normally comes with python installed, but the additional libraries will still need to be installed.

The process is as follows:

   sudo apt-get install pipx
   
   pipx ensurepath

   pipx install pygmi

Once installed, running pygmi can be done at the command prompt as follows:

   pygmi

If you get the following error: *qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.*, then you can try the following command, since this is Linux issue:

   sudo apt-get install libxcb-xinerama0

Anaconda
^^^^^^^^
Anaconda users are advised not to use pip since it can break PyQt5. However, one package is installed only by pip, so a Conda environment should be created.

The process to install is as follows:

   conda create -n pygmi python=3.13

   conda activate pygmi

   conda config --env --add channels conda-forge

   conda install -c anaconda pyqt=6.7.1

   conda install fiona

   conda install matplotlib

   conda install psutil

   conda install numexpr

   conda install rasterio

   conda install geopandas

   conda install natsort

   conda install numba

   conda install scikit-learn

   conda install scikit-image

   conda install pyvista

   conda install pyvistaqt

   conda install simpeg

   conda install shapelysmooth

   conda install openpyxl

   conda install h5netcdf

   conda install rioxarray

   conda install pytest
   
   conda install beautifulsoup4

   pip install mtpy

   conda update --all

Once this is done, download pygmi, extract (unzip) it to a directory, and run it from its root directory with the following command:

   python quickstart.py

References
----------

* Cole, P. 2012, Development of a 3D Potential Field Forward Modelling System in Python, AGU fall meeting, 3-7 December, San Francisco, USA
* Cole, P. 2013, PyGMI – The use of Python in geophysical modelling and interpretation. South African Geophysical Association, 13th Biennial Conference, Skukuza Rest Camp, Kruger National Park (7-9 October)
* Cole, P. 2014, The history and design behind the Python Geophysical Modelling and Interpretation (PyGMI) package, SciPy 2014, Austin, Texas (6-12 July)
* Cole, P. 2016, The continued evolution of the open source PyGMI project. 35th IGC, Cape Town.
* Cole, P. 2025, PyGMI - a python package for geoscience modelling and interpretation. Journal of Open Source Software, 10(111), 7019, https://doi.org/10.21105/joss.07019

Owner

  • Name: Patrick
  • Login: Patrick-Cole
  • Kind: user
  • Location: South Africa
  • Company: Council for Geoscience

JOSS Publication

PyGMI - a python package for geoscience modelling and interpretation
Published
July 08, 2025
Volume 10, Issue 111, Page 7019
Authors
Patrick Cole ORCID
Council for Geoscience, South Africa
Editor
Sébastien Boisgérault ORCID
Tags
geoscience geophysics remote sensing

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: PyGMI
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Patrick
    family-names: Cole
    name-particle: Patrick
    email: pcole@geoscience.org.za
    affiliation: Council for Geoscience
    orcid: 'https://orcid.org/0000-0002-3563-8704'
repository-code: 'https://github.com/Patrick-Cole/pygmi'
url: 'https://patrick-cole.github.io/pygmi/'
abstract: >-
  PyGMI stands for Python Geoscience Modelling and
  Interpretation. It is a modelling and interpretation suite
  aimed at magnetic, gravity and other datasets.
keywords:
  - geophysics
  - remote-sensing
license: GPL-3.0
preferred-citation:
  type: conference-paper
  authors:
  - family-names: "Cole"
    given-names: "Patrick"
    orcid: "https://orcid.org/0000-0002-3563-8704"
  month: 7
  title: "The history and design behind the Python Geophysical Modelling and Interpretation (PyGMI) package"
  conference:
    name: "SciPy 2014: 13th Python in Science Conference"
  collection-title: "SciPy 2014: 13th Python in Science Conference, Austin, Texas"
  year: 2014

GitHub Events

Total
  • Create event: 3
  • Release event: 3
  • Issues event: 13
  • Watch event: 24
  • Issue comment event: 10
  • Push event: 125
  • Pull request event: 2
  • Fork event: 5
Last Year
  • Create event: 3
  • Release event: 3
  • Issues event: 13
  • Watch event: 24
  • Issue comment event: 10
  • Push event: 125
  • Pull request event: 2
  • Fork event: 5

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 836
  • Total Committers: 4
  • Avg Commits per committer: 209.0
  • Development Distribution Score (DDS): 0.01
Top Committers
Name Email Commits
Patrick p****e@g****a 828
Janine-Cole j****e@g****a 6
Patrick Cole p****e@c****l 1
Marinda m****h@k****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 25
  • Total pull requests: 4
  • Average time to close issues: 5 months
  • Average time to close pull requests: 5 minutes
  • Total issue authors: 13
  • Total pull request authors: 2
  • Average comments per issue: 2.68
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 2
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 10 minutes
  • Issue authors: 4
  • Pull request authors: 1
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cecgeology (4)
  • AlexanderJuestel (4)
  • mtb-za (4)
  • jmtemmos (3)
  • Murray2015 (2)
  • AlainPlattner (1)
  • brianchen123 (1)
  • aquiles300 (1)
  • abdulhafidz6 (1)
  • Janine-Cole (1)
  • KerinPithawala (1)
  • AnkitBarik (1)
  • todowede (1)
Pull Request Authors
  • boisgera (2)
  • Patrick-Cole (2)
Top Labels
Issue Labels
enhancement (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 125 last-month
  • Total docker downloads: 1,622,243
  • Total dependent packages: 0
  • Total dependent repositories: 3
  • Total versions: 42
  • Total maintainers: 1
pypi.org: pygmi

Python Geoscience Modelling and Interpretation

  • Versions: 42
  • Dependent Packages: 0
  • Dependent Repositories: 3
  • Downloads: 125 Last month
  • Docker Downloads: 1,622,243
Rankings
Docker downloads count: 0.7%
Dependent repos count: 9.0%
Dependent packages count: 10.1%
Average: 13.5%
Downloads: 34.0%
Maintainers (1)
Last synced: 4 months ago

Dependencies

pyproject.toml pypi
  • PyQt5 *
  • SimPEG *
  • contextily *
  • discretize *
  • fiona *
  • geopandas *
  • llvmlite *
  • matplotlib *
  • mtpy *
  • natsort *
  • numba *
  • numexpr *
  • numpy *
  • openpyxl *
  • pandas *
  • pillow *
  • psutil *
  • pyogrio *
  • pyopengl *
  • pyproj *
  • pytest *
  • rasterio *
  • scikit-image *
  • scikit-learn *
  • scipy *
  • shapely *
  • utm *