Skip to main content

SHTOOLS - Spherical Harmonic Tools

Project description

SHTOOLS LOGO Documentation DOI Paper Binder Chat on matrix Chat at gitter License Mastodon Follow

SHTOOLS/pyshtools is a Fortran-95/Python library that can be used for spherical harmonic transforms, multitaper spectral analyses, expansions of gridded data into Slepian basis functions, standard operations on global gravitational and magnetic field data.

TABLE OF CONTENTS

FEATURES

  • Supports all standard normalizations and phase conventions of the spherical harmonic functions.

  • Effortless conversion between real and complex harmonics, and between different normalization and phase conventions.

  • Use of both regularly sampled geographic grids and grids appropriate for Gauss-Legendre quadrature.

  • Spherical harmonic transforms proven to be accurate up to about degree 2800 for the native Fortran 95 backend and beyond using the DUCC0 backend.

  • Perform localized multitaper spectral analyses, or expand gridded data in terms of localized Slepian basis functions.

  • Support for standard data and file formats, including xarray and netcdf.

  • Import research-grade gravity, topography, and magnetic field datasets with a single command.

  • Creation of publication quality maps using Cartopy and PyGMT.

  • Support multithreaded programming using the OpenMP API.

HOW TO USE

A variety of Python tutorials and guides are available to explain the main library features. To get started, click on the following Python tutorials and run them interactively in Binder:

INSTALLATION

SHTOOLS can be invoked in any Fortran 95 or Python program. The core software is written in Fortran 95, and Python wrappers and dedicated classes allow simple access to the fortran-compiled routines. To install it, run these commands below:

pyshtools (for Python)

Install using conda:
conda install -c conda-forge pyshtools  # Linux and macOS only
conda update -c conda-forge pyshtools  # to upgrade a pre-existing installation
Install using pip:
pip install pyshtools
pip install --upgrade pyshtools  # to upgrade a pre-existing installation
pip install pyshtools --no-binary pyshtools  # build from source
pip install git+https://github.com/SHTOOLS/SHTOOLS@develop  # install the develop branch from source
For developers:

Install the requirements:

# Linux: install gfortran, fftw3, blas, and lapack
sudo apt-get install g++ gfortran libfftw3-dev libblas-dev liblapack-dev
# macOS: install fftw using brew or macports
brew install fftw
sudo port install fftw-3
# macOS: for LAPACK, link to the system '-framework Accelerate' or install openblas

Then clone the shtools repo and install manually:

git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
git checkout develop
pip install -e .  # install into the shtools folder and link to the active python environment

SHTOOLS (for Fortran 95)

Install using the brew package manager (MacOS, Linux, Windows):
brew install shtools
Install using the macports package manager (MacOS):
sudo port install shtools
Install from source:

Clone or download the this repo, and then execute one (or both) of the following commands in the shtools directory:

make fortran
make fortran-mp  # for OpenMP Fortran routines

Further installation instructions and options can be found in the web documentation.

CONTRIBUTING

We work on the develop branch and only push releases to master. Please base all pull requests on develop.

CONTRIBUTORS

For the full list of contributors, see the AUTHORS file.

LICENSE

This project uses the BSD 3-Clause license, as found in the LICENSE file.

REFERENCES

  • Mark A. Wieczorek and Matthias Meschede (2018). SHTools --- Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 2574-2592, doi:10.1029/2018GC007529.
  • Mark Wieczorek, et al. (2019). SHTOOLS/SHTOOLS. Zenodo, doi:10.5281/zenodo.3457861

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyshtools-4.10.4.tar.gz (38.3 MB view details)

Uploaded Source

Built Distributions

pyshtools-4.10.4-cp311-cp311-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.11 Windows x86-64

pyshtools-4.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyshtools-4.10.4-cp311-cp311-macosx_10_9_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

pyshtools-4.10.4-cp310-cp310-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

pyshtools-4.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyshtools-4.10.4-cp310-cp310-macosx_10_9_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

pyshtools-4.10.4-cp39-cp39-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

pyshtools-4.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyshtools-4.10.4-cp39-cp39-macosx_10_9_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyshtools-4.10.4-cp38-cp38-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyshtools-4.10.4-cp38-cp38-macosx_10_9_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyshtools-4.10.4-cp37-cp37m-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.7m Windows x86-64

File details

Details for the file pyshtools-4.10.4.tar.gz.

File metadata

  • Download URL: pyshtools-4.10.4.tar.gz
  • Upload date:
  • Size: 38.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for pyshtools-4.10.4.tar.gz
Algorithm Hash digest
SHA256 4edbee572990603c40f25daf1c8ff5d3429ec1c52343e0118fc2ae28f1d5588a
MD5 9f888f0e8513eb8fb8edfe8621384146
BLAKE2b-256 fce2ea542c456dfe9cca2e0560bba251a8f748db2bc152397c77411bcddd2419

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 404f63b9f333c8a0da655d81a5440aa9a29edf68cf8f73e2ab70a933ebb0d350
MD5 195c2293c61c3ab95ddebf4ad28c3725
BLAKE2b-256 c1323f810bed5c8f2f010787d5bf187d4362498926ea303488ca37f34d9df79e

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 565df0dbf7ec705952d88be1e3fe3a7cc054dcb0d7b663e8debccfa7deab2bdc
MD5 bb4a46908852bb841012ee87f8d5c061
BLAKE2b-256 d4e70fdae5a14a637e7a82be4340eeb7655e41de07ed04d9fbef98a0cbca0430

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a10e57ded0e948051094d49048c2ce553d28b0d3b63075077a0fdcab30a50f7
MD5 3e6f09de89a7a7d95f22e4221152f63e
BLAKE2b-256 dbf111132ba4e1e10cb54f1c2b279abfe79ed4423b8c98c8885cc6d3b6a7726f

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fe1892d9dfeef323ab14432ee0994fb8799da1755667e0a7dab1f91c30507c4c
MD5 64b2334c9fcd45e25048fc66a9990057
BLAKE2b-256 21317d58e67f8bbd96d5c105bea9b0bf7db614befafc8f8b802112b4415dd214

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5e3cfcbbde9fb2d896688f6c8ed92279337d8415cd1476c48ea46eb18f8a96ec
MD5 f44cd6a0258c3d78bd205b0ab0af434d
BLAKE2b-256 985bcc212d09c8c7e3a7e108c39f18ee541ccacb6e65ce0ad00603a0b2d8c398

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d49f8c963295019fa8a080e97f5ac1ab4c11632f5756553bdc57709c86fee5f4
MD5 9915d8bd5a5d2db102231f036995dd77
BLAKE2b-256 3445d9d669c70505b6b26d42e401c26da21461f1b1c037ca4c7a090e3a930b53

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4f5adcb5925c533091711f8ec41a5951b108117203e9f707947eea7ac81d3ef4
MD5 d11defef72d44561e438e12e07ad1b74
BLAKE2b-256 c6f63b8f3a253adc799367ad33f4990cb96f16ffce24d1f65abf632327e7ba84

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9abcdd31978df9eca944b264242d6891fdc1c7a86a0761a2ebbf2eef78d68184
MD5 4a527fd9968deff2394522c42f0b8111
BLAKE2b-256 b901c647969582630031a574990ac9f5783db4d8e6f4cd9c65dccb64e8a00f95

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6d4eb629f425928764f246f9f68ffa39674d3bb89dbeb11e34643920b6ebe3e9
MD5 5d7c2f75ff6e224434dd954d5981de4c
BLAKE2b-256 8d2e4a9fa20df8da8786cd5311097edf5c6d89b6d4a289b00a3304e74c96b47c

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 6a14591517f100ebbe70159ccec140ea90c0d90cca1ac24d6c4ca3f15b423449
MD5 b717a6c427fa49609d16c150c999dc43
BLAKE2b-256 a408640dc300f9d35923abff982a067994c517e9fb93d025929b34a39e480d91

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 17dc43427107c75649c8a5b0dc626325d6418f5ce48ba322c8cb9a35ea3c0bb0
MD5 c79fadb6eff9ebf02b7fe1008d6fba04
BLAKE2b-256 4713fcff0f3f03896f519b995d658c228d8295e39264d5f0aa1fe9d76c827533

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8609b347ed08a68efa0aab52efad194dbe25da17579ca2536906a8caedb1a4d9
MD5 e502300436ffb4b08afe073ac084746f
BLAKE2b-256 d83fb987929d08b58d0f873e06b28d6e968de871acd5d07c3646ecbe761e2dfa

See more details on using hashes here.

File details

Details for the file pyshtools-4.10.4-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for pyshtools-4.10.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 981ecfcc405c6899eb97a5629e6259f804203ac624cd37a924f06684a17f6955
MD5 623dfd1f20c5c768d9e4a8c97350a6cd
BLAKE2b-256 75881727386005cbc3b04b9c140bbe49bec2325d8d685fa44d4800e5bcb7ab47

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page