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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.10.2-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.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: pyshtools-4.10.2.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.2.tar.gz
Algorithm Hash digest
SHA256 caab6115f7024ef2fbbef3f59633afa28e693797b947fafdc152b95a9efef155
MD5 d3fdd63ea94378baa449e9d4acb0a518
BLAKE2b-256 dcfaa74a22784b24e1890a4ac02b5cb32ef8c500500bf4784844901abe4197a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1be671688e48975f773e8a4d5a1035f417d48c5fb83b5ceaeb28bdc4c7520ded
MD5 fa28dac7350a56bba6937292ccd61560
BLAKE2b-256 8fa0a0b83d8bef5f4733f7a5026b46d222ac18182826eaa5c4fdcdb2cc6f3c13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 90c3185d9b3f063016d012acefa0be8c7d44fff89987c706aa3b1a963059bd8c
MD5 3aca3b3d0d6d1ba9d5966f9abe6d3875
BLAKE2b-256 12a08101314cbe8a012abe8a52d4b54189fe004aa866c7237b07ea00a174ad58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 cad53f46de51eac2f57b653c50f41b81bf8b8239ab5f598df06bca4d7cc36db4
MD5 2f6391a39269eef1cd3bfdbd478b5129
BLAKE2b-256 a3e7895b972b7bb559b9d6c6b7725d233cb4bbf5fbf840b56ab69ff603c01c46

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 fb4451b6b86e51ddb8a75849678223f9b918015331b2efd13811e7de1695b3c7
MD5 597061dbf72cb74cc21a52d277e3486d
BLAKE2b-256 64ce6ae185003926b2b5a17106c76be76bf23d7001384662a6a8fec26d33bace

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e4c074189ecade3559eef5ba38d165252303a7f3c6ff7b482ada17e4694824ec
MD5 507b21b469a896fc3fc3c3d90b76d541
BLAKE2b-256 6d30dd0eb651db3b7959189ac7cdfeb657f7284aca949d5244b4a4517f872be1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8c51461e729a47a53cac7f8f64aba70c96c0697da4a37508ee3c0d25ee1c743b
MD5 93f0a1e08832b185e871fb418883e3d2
BLAKE2b-256 802d5cc734272f363ec5e58bbd7deed3520bff4ee2e2d4904210502ceb1bb735

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 4f82e83634da8d6e529c6d7d3161d1fb640b571c9d92d53eb98bb07bc3165d89
MD5 33937acd4e0f92836046c9a8cb5caa7d
BLAKE2b-256 d4df7499b6502f3cfbb017dca03139e3b9111a08151ede2f3d079818f8162e40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5ac5bdc1fa788ddfec1dfc7fde9ae70403856b9c29859cc55d92c8b5a251ee7
MD5 a1b30e3a22f5585c2e832714c73f4dae
BLAKE2b-256 b1d2cccca101d43f485ddcf619706fdf69e652211f409c3dd36af1916f90b00a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2a2dc1009ac26a4020d16d01ac79a1b5834cf6c7c4a2fcdf0d95985366ef2015
MD5 c910f6b41ec504fcccaf054379821b8e
BLAKE2b-256 19bdb20cac708ed70424f6b9fba175cea6f3063630851a714a17f17df50520f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b2e187fba38b793c7a51ec5f8869f47913ff9d56cef3140bc5a41e9138a281f8
MD5 d08ea9fd17ce9b43dd1a344172f887dd
BLAKE2b-256 0e2c2afe1d9f0e2aafdc58af572ce2f35e05d1115bd9e277b1004773abea8de4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 427053ffe72c80174de76da5abb93a80e349c05db837363da58775e7f626d3bf
MD5 dd7fae1cbc92e5609d0e418da2bc7d9b
BLAKE2b-256 49d3aaa92d1d84945d81a8c15b003d79f204fc901b6c00852564f4829a3c4927

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6d69afd9e8cbb04d3f84a953c94de86ed9cf7ce2e0725f26c090d4ccde45594e
MD5 08c64a67f5cb463bd937fdab04d0b7d2
BLAKE2b-256 2d7b87b40517665a180f7939016f099a00ba31cced370803cffc021627ed3190

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0891edfeafc86f8081556c3def7a16fd42613a82f8b48587dd24853721d87524
MD5 57e2ebceb55465ecefb02d19e457f8f9
BLAKE2b-256 d0dee7bf3a6f997475bdc655d6134ccab1ed85eccedad350c4243e60a758c5e5

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