Skip to main content

SHTOOLS - Spherical Harmonic Tools

Project description

Documentation DOI Paper Binder Chat on matrix Chat at gitter Twitter

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

FEATURES

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

  • Effortless conversion between real and complex harmonics, between phase conventions, and between 4π normalized, Schmidt semi-normalized, orthonormalized, and unnormalized harmonics.

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

  • Perform localized multitaper spectral analyses, or expand functions in terms of localized Slepian bases.

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

  • OpenMP compatible and OpenMP thread-safe versions of the Fortran routines.

INSTALLATION

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

HOW TO USE

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. A variety of Python tutorials and guides are included that demonstrate the major features of the library.

To get started, click on the following Python tutorials and then run them interactively in Binder:

DEVELOPERS

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

REFERENCE

Mark A. Wieczorek and Matthias Meschede (2018). SHTools — Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 2574-2592, doi:10.1029/2018GC007529.

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

Uploaded Source

Built Distributions

pyshtools-4.9.1-cp39-cp39-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.9 Windows x86-64

pyshtools-4.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

pyshtools-4.9.1-cp39-cp39-macosx_10_9_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

pyshtools-4.9.1-cp38-cp38-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

pyshtools-4.9.1-cp38-cp38-macosx_10_9_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

pyshtools-4.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

pyshtools-4.9.1-cp37-cp37m-macosx_10_9_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pyshtools-4.9.1-cp36-cp36m-win_amd64.whl (6.8 MB view details)

Uploaded CPython 3.6m Windows x86-64

File details

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

File metadata

  • Download URL: pyshtools-4.9.1.tar.gz
  • Upload date:
  • Size: 37.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for pyshtools-4.9.1.tar.gz
Algorithm Hash digest
SHA256 43aa80e954e1a222436c8643d342541880f6402b23cdde9d2cd9fdd1097d4e6f
MD5 bbf2cef05d0c84ca7704baf4d104c8d7
BLAKE2b-256 eefb4b36ff3e573e9c321f70ad80921c69b279ac2fdc5f5d19a023f7866eb33f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.0

File hashes

Hashes for pyshtools-4.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5c1680cb62124b48d0786bf0e679089207bcab3c31e2ce48b57c803c28d25989
MD5 d4def2e0269970218b1ba3a36d2b4c59
BLAKE2b-256 c7667a8ba3a396848d2e56506e2eedb2ed1282fd93756235e37fdb6600b30ae7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9375e01160d08c11a844fa2090264002b4a14013c8e15e849de63f2c61c48bb6
MD5 6821c5ea2f16ea39e8aefbaa7108d465
BLAKE2b-256 5177941b6a25ad63a41b1208052fe3bf6613d6df6d844f4aa1abcacce65a089b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.9.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for pyshtools-4.9.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 37a2ece9d5f2a54be31704db772efb62e3f7a0df76a29b2cdd2fd457ec10070a
MD5 af80e785c178d72086ba01e89ec2c1d6
BLAKE2b-256 d8ab413507cf07db944117dfea61c24c5899dcdd83704a98a3c140c35219f3dc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.9.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.0

File hashes

Hashes for pyshtools-4.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 e457ef53fbb9f44b20e800e44d6716e6bab339004795649f16ed6f3923861377
MD5 f29c4d016e102dcd35a01b58025ac288
BLAKE2b-256 652a85b84f65237072b69ce9956a10e31ce22ebc6e585ea129a1d44dfa038ec6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.9.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aa4375b8b561882f24eb522a9b1060834066f53530fb9a2a9522aea7fd038314
MD5 1e075b23a5e6167d0933b7c87ec2bdaa
BLAKE2b-256 3a1fd02cdf270a3c06e651e0c7fecbc065b24ee8eee4619283bac0ba662ae08c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.9.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11

File hashes

Hashes for pyshtools-4.9.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9b168c2b12ea041bf10f55e3a623e6dc32a367a9abf7df474f92578de72ae4cd
MD5 ae387c4d756c373ba3a8e707f8bbf6ed
BLAKE2b-256 f5f7efd38e0c5c0421b7cd95a7a6f33d6a8c61856b0566e9f83f875746be7b2e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.9.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.5

File hashes

Hashes for pyshtools-4.9.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 3ae9833fb77d274d5ff1e8b4611c56cd334cee30d167050bdff4c54e5fb082e0
MD5 efac29186960c96b530e961710bca59f
BLAKE2b-256 4b24d8a8bb3ed3253c45cc6b02b0679699984e22160ee30e7762bff22129cb7c

See more details on using hashes here.

File details

Details for the file pyshtools-4.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyshtools-4.9.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e75a73836f7013b789193908d5e23a62744471c00b7b7105b1e8269ba674bf5
MD5 07f0c7039482f6d9694db31a3174a54f
BLAKE2b-256 05a00e1ac81e45eda89f51cafa52bfec4f44acdac7f28eacec3a314485989c7e

See more details on using hashes here.

File details

Details for the file pyshtools-4.9.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.2 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.11

File hashes

Hashes for pyshtools-4.9.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c6a3c411b8e9237cc37f64e6554fa099c7afea9c4598341ef34ea09c7fc14f59
MD5 1376167582d718b25be3bbe24a3ce5bb
BLAKE2b-256 32ec885a6da521513f64e5317b9faa91483a8794ee76ca0673640028ffc182b9

See more details on using hashes here.

File details

Details for the file pyshtools-4.9.1-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyshtools-4.9.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.8

File hashes

Hashes for pyshtools-4.9.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 78ceaae499bcf150c153c19dc4cbd0e0e0e4a796bd4ab99c753bb8841566a253
MD5 232153b2c5b35e185e2d4c47f331483c
BLAKE2b-256 e0b6e95fce0354b6a13b705953bdafa6ccc2311a474ff89fdbc2be573539fc49

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