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)

Binary install using pip or conda:

pip install pyshtools
pip install --upgrade pyshtools  # to upgrade a pre-existing installation
conda install -c conda-forge pyshtools  # Linux and macOS only

Build from source:

pip install pyshtools --no-binary pyshtools

Install the develop branch from source:

pip install git+https://github.com/SHTOOLS/SHTOOLS@develop

For developers, install the requirements

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

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)

Clone 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

Alternatively, use the brew package manager (macOS)

brew tap shtools/shtools
brew install shtools
brew install shtools --with-openmp  # to install shtools with the OpenMP components.

or the macports package manager (macOS)

sudo port install shtools

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, check out the following Python tutorials:

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.7-cp38-cp38-manylinux1_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.8

pyshtools-4.7-cp38-cp38-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyshtools-4.7-cp37-cp37m-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

pyshtools-4.7-cp37-cp37m-manylinux1_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.7m

pyshtools-4.7-cp37-cp37m-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pyshtools-4.7-cp36-cp36m-win_amd64.whl (6.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyshtools-4.7-cp36-cp36m-manylinux1_x86_64.whl (10.8 MB view details)

Uploaded CPython 3.6m

pyshtools-4.7-cp36-cp36m-macosx_10_9_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyshtools-4.7.tar.gz
  • Upload date:
  • Size: 75.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pyshtools-4.7.tar.gz
Algorithm Hash digest
SHA256 da1d459ca04dcaec9c9637dfe8b178b53fb510333e3d106214950560a1a0d784
MD5 5389259e397ab132ed58f94e67216b08
BLAKE2b-256 8fa3557b159de97b495007ebb0a2d14d546c60b167cf08220f6494fb52f89550

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.7-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.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.0

File hashes

Hashes for pyshtools-4.7-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3f2304555e09920e6ec7fa669fe0dd4dd9fe0aa00dac43c18736d5333a68c085
MD5 5ead634484ea8299aceeac86350e1b1e
BLAKE2b-256 24e1d4215a3837369fd75bf42060e62bc2752976b6c585a4db3b65e1a1ffe43e

See more details on using hashes here.

File details

Details for the file pyshtools-4.7-cp38-cp38-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.7-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.6

File hashes

Hashes for pyshtools-4.7-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7823afa1d4a35a47698af8cc19424299fe8dc9a01d8235c74069aa3f66226c51
MD5 e7768f414cafd3898e65bcc15e14976e
BLAKE2b-256 ab700946b4bc8c86832e216e93b93003fae80c0b1c13cd6908ca89cd8c935f64

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.7-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.2

File hashes

Hashes for pyshtools-4.7-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 470964b061b4a833bae45825357a3d01c8bdf7bc534a5745d8cac8aacc125eb6
MD5 68414266c73fad4fd8565f0e18847854
BLAKE2b-256 74559495a7368958ee42ceb76159d3939a12a7042955ebb1eb3940c5deb08ab0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.7-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.5

File hashes

Hashes for pyshtools-4.7-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 0ede2d0b5e5747f939a275ea0108dc0b0a358d338228e699578cfc411dbf29b5
MD5 ca6fc9f31f5e0c6768277ff9c2875f7c
BLAKE2b-256 a40b00c4e1b3da4e39dfd6f708b32d4d68fb1f2f67a95e47971f24e6941fb4a7

See more details on using hashes here.

File details

Details for the file pyshtools-4.7-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.7-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.6

File hashes

Hashes for pyshtools-4.7-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 989e18b4711271e3fc6e72b12d62fd721180e860f60d0b8aa79fb09d23e6b898
MD5 fd4dd1d0fb1c672f2bd5e011eeaf9b0e
BLAKE2b-256 f0e9ad92e5e49652fea907733e844b5ff9fb319a67c2229f04f90a46512b60f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.7-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.6

File hashes

Hashes for pyshtools-4.7-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a9d65f123808589082416c15d551e4c0a09ad7afc52229729166a8f70d1af11a
MD5 6e2c6d9af7fb6d348179479c4df388ee
BLAKE2b-256 f68a6ef32cbef36c35e5db244a5076d7ab077b1a7aca5f5b61b9925e66903dad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.7-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8

File hashes

Hashes for pyshtools-4.7-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 00027f5676451c973ce41e8e6c99d0745ada164d35547dbec5dfff01446122ab
MD5 df939c9fe9ed1222ab84228ed4b6fe4f
BLAKE2b-256 6226c72885db69166e1c4766dbb7f669f163915110bd20f0c43c5156246b4452

See more details on using hashes here.

File details

Details for the file pyshtools-4.7-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.7-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/2.7.6

File hashes

Hashes for pyshtools-4.7-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 b74ea5cda1a28d2406576333fc0e6b08301dde103c9305026cb076b04936508e
MD5 5fa957c08a3009f23828c7fdcd54268b
BLAKE2b-256 9e868db690e5dfe3067a3124d218c97e5bdd0ea160d53a144d411b61820a0b6c

See more details on using hashes here.

File details

Details for the file pyshtools-4.7-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.7-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.0 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8

File hashes

Hashes for pyshtools-4.7-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b9ea7681fec08e5921eb8e2709dd2f9dd25e4057d933a65db87d99df138ed4d6
MD5 c4497f36540c36c92ba319e1a5c8494d
BLAKE2b-256 21fbce740ba7d756fca379325f49105bfc0bad9667192b0378830f231ae11d68

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