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.3.tar.gz (38.1 MB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

pyshtools-4.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

pyshtools-4.10.3-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.3-cp310-cp310-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

pyshtools-4.10.3-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.3-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.3-cp39-cp39-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

pyshtools-4.10.3-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.3-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.3-cp38-cp38-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.10.3-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.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for pyshtools-4.10.3.tar.gz
Algorithm Hash digest
SHA256 38f55e5c3ff76a244adbe9ee6b2dc6bca171a6546fc80b8f116dee4c2880fb3d
MD5 b2b4519b75ddb101a24d1011e507a4dd
BLAKE2b-256 049667466ee73ed3955c94e1f11667f0cb9046621275d7ff1ca9b5b9a9d37f4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 bd5da48ab8c7f8115552defa3a535cf4db4f1cd84a21b35d30baa1b5e98ad9ae
MD5 d9449fb02ab16556fd5db53ba65ca748
BLAKE2b-256 e799c06f0684e143a953e0f6e76ec3451424db76e8d88045f61643ddf21ae92c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2a9e7cfa76996c072d4a1201fa52446a4e856574e3abbaf5efb4b9d886418fb
MD5 941e10ef55f4e37e52187c2ebf8cf49f
BLAKE2b-256 93d9ac48cc2809dfa16c3b8a2614133a1b5dcbc676f26f1d021858cd8d7335a3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 488cb6b6429381317c17847d4e5facce566f67534efa1693886b8048150ddd69
MD5 d98b3f31e21b7f85702e273c95387f6d
BLAKE2b-256 f241f99f6e700ae9dacd51fcf13b8634dc2be6a182b50d32b1cfb8a4163cf88b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 11751ddbc706e0439796ba35498a7afbbb23c0c7148d17154c966d408e9ae315
MD5 c481f970bf2abe53a0e84a541e064b11
BLAKE2b-256 8157c1d78416c3d8cc88bc845fc3252b5dc2e95908749ec60e55fe430b68211a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 98b2d5be50d78552460d57fca3c4db044c43c3935d14918d506a1021bcc386ba
MD5 b30446f2e1042dc9de24851bd56cb2c6
BLAKE2b-256 1e0429ca8cbf3f9a4a7880af87e6ceecfcc6151a5141a8be1e635aa1bb7a26f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 750a98537bcea68946f520d38f4f5c5a2473c9eafc0435383a2b7b920761d87d
MD5 80dde14104e0689309d8e125e550366b
BLAKE2b-256 24fb439cf03d1e03c455052dd34fb2d0ac12fa7f19b14ac100f787cd17c222c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6b8bb73ee0f13567451553da8e60dc50694f1ab3c168e2733af5686fb27755c2
MD5 20d32d7f8366be3f21fb92f7bf80e524
BLAKE2b-256 4990ee8bc2c97b4d8d1fd68827a2f3a73ce1830a247cc996d13132137b83ff17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1e84da563efc76e5e8b0d8345066b60ff89e901dc364f9ca5414a964da12eeb
MD5 9894e7b8b64ef8814e4035c199e2911c
BLAKE2b-256 f41f3b27af8c3bdd889e6f9faed74f6acf01021655756cc003e1e453c018cc61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a5a74d33598ae18a77516720b78c5b45d9bc51f0969fe4ef4fed48340e3dce2
MD5 5b2cbeeaf8db6a645e6e97c7df97c39f
BLAKE2b-256 dd4ca428d0a04455474d58099efaa6c2694923cd890b44d4053e667118ed98de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 53a7f9d4b25cbae8e28b73d43d77ed3d828dd72d54c8dbf6a78938d1bfb088d0
MD5 52cb39c86fe2162106e1ec6bbc5c097e
BLAKE2b-256 5ca6ab11d2fd70896a2497c1ec00fd1a01f63c7a0c8df1ecb79854b61574bc2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c115db8a9c3daee0f3be6fc47e334399786d036238304175fa4eef88e5cfbfc
MD5 f400d280e60276a9e999aba5c6131524
BLAKE2b-256 5e865fe231c9ac7bf3fbcb34eb7b4335f642b31fcae3294270a1b289b12755e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 97378a21ac78e61c4abf6d0e162a40f367c4328f2ddbc957662c00274d95827e
MD5 70f3aaef77585e1a6da999a2494491c1
BLAKE2b-256 842f017d3ce113eb032fd41163c73c9af8da3adee1ea0cce5705e969878e7481

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.3-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 93203bd08a9978fa9f15e3dbdbd79e0acf9270abb00b5eb644598ee5280eb1dd
MD5 4d5d18a7347d5d2efb290962f00e5798
BLAKE2b-256 1f6b6a3eb16c24e1a28676eb520df46395ae6057b5053e8140a1e7f80f61ad6d

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