Metadata-Version: 2.1
Name: pygmi
Version: 3.2.8.18
Summary: Python Geoscience Modelling and Interpretation
Author-email: Patrick Cole <pcole@geoscience.org.za>
Maintainer-email: Patrick Cole <pcole@geoscience.org.za>
License: GNU General Public License v3 (GPLv3)
Project-URL: homepage, http://patrick-cole.github.io/pygmi/
Project-URL: documentation, https://patrick-cole.github.io/pygmi/wiki.html
Project-URL: repository, https://github.com/Patrick-Cole/pygmi.git
Project-URL: changelog, https://github.com/Patrick-Cole/pygmi/blob/pygmi3/CHANGES.rst
Keywords: Geoscience,Geophysics,Magnetic,Gravity,Modelling,Interpretation,Remote Sensing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications :: Qt
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/x-rst
License-File: LICENSE.txt
License-File: COPYING
Requires-Dist: discretize
Requires-Dist: gdal
Requires-Dist: fiona
Requires-Dist: geopandas
Requires-Dist: matplotlib
Requires-Dist: mtpy
Requires-Dist: natsort
Requires-Dist: numba
Requires-Dist: numexpr
Requires-Dist: numpy
Requires-Dist: openpyxl
Requires-Dist: pandas
Requires-Dist: pillow
Requires-Dist: psutil
Requires-Dist: pyogrio
Requires-Dist: pyopengl
Requires-Dist: pyproj
Requires-Dist: PyQt5
Requires-Dist: pytest
Requires-Dist: rasterio
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: shapely
Requires-Dist: shapelysmooth
Requires-Dist: SimPEG
Requires-Dist: xlrd

PyGMI
=====

.. |pythonversion| image:: https://img.shields.io/pypi/pyversions/pygmi
   :alt: PyPI - Python Version
.. |pygmiversion| image:: https://img.shields.io/pypi/v/pygmi
   :alt: PyPI - Version
.. |pygmilicence| image:: https://img.shields.io/github/license/patrick-cole/pygmi
   :alt: GitHub License


|pythonversion| |pygmiversion| |pygmilicence|

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 <http://www.geoscience.org.za>`_ (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 <http://www.gnu.org/copyleft/gpl.html>`_

The PyGMI `Wiki <http://patrick-cole.github.io/pygmi/index.html>`_ pages, include installation and full usage! Contributors can check this `link <https://github.com/Patrick-Cole/pygmi/blob/pygmi3/CONTRIBUTING.md>`_ for ways to contribute.

The latest release version (including windows installers) can be found `here <https://github.com/Patrick-Cole/pygmi/releases>`_.

You may need to install the `Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>`_.

If you have any comments or queries, you can contact the author either through `GitHub <https://github.com/Patrick-Cole/pygmi>`_ 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 <https://github.com/Patrick-Cole/pygmi/releases>`_.

If you prefer building from source, you can use PyPi or Conda. Note that if you are using PyPi,  certain libraries require binaries built. To do so or download binaries manually, please see the Linux or Windows section below.

Once built, 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.12 on Windows.

PyGMI should still work with Python 3.11.

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

* python 3.12.4
* discretize 0.10.0
* fiona 1.9.5
* gdal 3.8.4
* geopandas 0.14.4
* matplotlib 3.9.0
* mtpy 1.1.5
* natsort 8.4.0
* numba 0.60.0
* numexpr 2.10.1
* numpy 1.26.4
* openpyxl 3.1.2
* pandas 2.2.2
* psutil 6.0.0
* pyogrio 0.9.0
* pyopengl 3.1.7
* pyproj 3.6.1
* PyQt5 5.15.10
* pytest 8.2.2
* rasterio 1.3.9
* scikit-image 0.24.0
* scikit-learn 1.5.0
* scipy 1.13.1
* shapely 2.0.3
* shapelysmooth 0.2.0
* SimPEG 0.21.1
* xlrd 2.0.1
* xarray 2024.6.0
* h5netcdf 1.3.0
* rioxarray 0.15.6

PyPi - Windows
^^^^^^^^^^^^^^
Windows users can use the `WinPython <https://winpython.github.io/>`_ distribution as an alternative to Anaconda. It comes with most libraries preinstalled, so using pip should be sufficient. 

Alternatively, if you are not an Anaconda or WinPython user, you will need to install some dependencies using downloaded binaries, because of compilation requirements. Therefore, if you do get an error, you can try installing precompiled binaries before installing PyGMI. Visual Studio 2022 can be used to most compile binaries, if it is in the same path as python.

GDAL in particular is non-trivial to compile to binary form, so downloading a binary is recommended. Related binaries can be obtained at the `website <https://github.com/cgohlke/geospatial-wheels/>`_ by Christoph Gohlke.

If you obtain binaries here, 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.

Once this is done, install with the following command.

   pip install pygmi


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 pip

   sudo apt-get install gdal-bin

   sudo apt-get install libgdal-dev

   pip install cython

   pip install numpy

   pip install pygmi

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.12

   conda activate pygmi

   conda config --add channels conda-forge

   conda config --set channel_priority flexible

   conda install pyqt

   conda install numpy

   conda install scipy

   conda install matplotlib

   conda install psutil

   conda install numexpr

   conda install pandas

   conda install rasterio

   conda install geopandas

   conda install numba

   conda install natsort

   conda install scikit-learn

   conda install scikit-image

   conda install pyopengl

   conda install simpeg

   conda install shapelysmooth

   conda install pyogrio

   conda install openpyxl

   conda install xlrd

   conda install xarray

   conda install h5netcdf

   conda install rioxarray

   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.
