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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.10 Windows x86-64

pyshtools-4.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

pyshtools-4.10-cp310-cp310-macosx_10_9_universal2.whl (3.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)

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

Uploaded CPython 3.9 Windows x86-64

pyshtools-4.10-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.10-cp39-cp39-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.10-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.10-cp38-cp38-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

pyshtools-4.10-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.10-cp37-cp37m-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyshtools-4.10.tar.gz
  • Upload date:
  • Size: 37.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/0.0.0 CPython/3.9.12

File hashes

Hashes for pyshtools-4.10.tar.gz
Algorithm Hash digest
SHA256 98db3429be79113a6ae08ad0ecaa92325a588e4d044937a2344d4f60c70e5b70
MD5 720604505740bc0d3ecaabcb242f3486
BLAKE2b-256 416f49c4c2c4a44cb39d0dc88c1de34a21ed60fa55546f0c32e0889ab9e2658f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1bba3a356464ce5feb8321d5b7ace6d819a9f132ba13739a168f47069835d173
MD5 c589a25ec3df082b97f03d86bb465108
BLAKE2b-256 10263e7893ef3bb066c9b4175c64fa3c78b250c660403e35eb5d84ccfc66e650

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6968cb5a8d77a02292e4a2e98fbd9198abeb246ad681c71d54ab4133c032d9c
MD5 47657dc966ed040ff5312b36850e733c
BLAKE2b-256 0bd2c7458753bd67172e6fc84abbaa4e65ef9543df8552c8e9723d4fca9d41be

See more details on using hashes here.

File details

Details for the file pyshtools-4.10-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for pyshtools-4.10-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 874270a550a9dc96eda13c18e1b55786c88021ec9655f034ed33a83d249de680
MD5 2dbf664a0c039f88e3fb8aa338203da8
BLAKE2b-256 4f20642bf23494cc6066cbeae117e72ba54268bece88f29ca6fa5deea132f7ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.10-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.0

File hashes

Hashes for pyshtools-4.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 af2a4167c9e63f893ef0790a5a102ce0275b68a9344aa2c33e147e4b17280a86
MD5 f6dc9761acf08e26fcdd955522d1f394
BLAKE2b-256 b1cf5ba2d63628913322526e275465dae0ac51eb71af693b0367f013b3277c25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ae50c4f09d5c8e5e109d39de08e0c3da2c279c1ed59bdd83229c4f430f1ef7b2
MD5 1e136844c5725dce0be6371f87353e42
BLAKE2b-256 d2c775b0b4683a75ebc6860334ca9a577169042b1a2f54db4e3a84127dcd1705

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9d985b09f625861473656c4c365f5b363e9252401a4d742c0b716736b323bb91
MD5 d68a2fe363de833c74489133efbb730d
BLAKE2b-256 e74c8ff54ca43ca2cd771bc32668ef78006744f6f629983e49e592aafa6697fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.10-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 6.8 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.0

File hashes

Hashes for pyshtools-4.10-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3bd01c023b5c625d6a1747adebb1fcc0812f07f886f3003e347d9d2b2bd834b8
MD5 1e965f09f2f9d57377cafbfc8c6134b8
BLAKE2b-256 d3c77a54a21d10b245362dd2cec4fd321bcbeeff94d290400aa0bad83e293924

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b69886a54cf221e15c722c5a18bee581055353f25c11150397c18510663117b3
MD5 dad2baeb8255693d84058736819d38ea
BLAKE2b-256 4bee101d7eb16f918fe36988093cae6e3b2a5db60d46853d3d2d994eb88d2c5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d342645925ab98c7930ae4a685d33cc1a4be41b4de58d0f46a93e3a61f061221
MD5 3397dfc5ea12652c203b7c42af47d6c1
BLAKE2b-256 68341ec62b2180e0ac3313c407265d0a31dd0457b516d7f9b6b2f6d35e00d67a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.10-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/4.0.0 CPython/3.7.5

File hashes

Hashes for pyshtools-4.10-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 c26e48b620b0bff7e4bc1d7753b03ee0856cf40d025aa0eb2f65df71e1e242d1
MD5 927e0b2b7d7cfb9968962b139a3b5d6f
BLAKE2b-256 8adbc58480b8f42c99ebbca6ebba5da0b6f4b0acc8c741888d278e5b4f037109

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 be33fe249f8b484aae67a421aff0d3ee5e75552ab768b5abf0c61294a39e36c1
MD5 d2d242e687f0a2449d132dc594302e40
BLAKE2b-256 f0ae849cd550219ce0618a42b9c8dde0b2834524a822bad905c33c009edce117

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyshtools-4.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fa1bf800d6bb40628d002f20811a49401884cf272af515dee579d880c83e263d
MD5 9b78dcd8916630297dc8c08db5ce1622
BLAKE2b-256 e5c32ca2d3174f208ef4aaa908d8365cbaafc5f44c84f8219aad72718290e532

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