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

Uploaded Source

Built Distributions

pyshtools-4.8-cp39-cp39-manylinux2014_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.9

pyshtools-4.8-cp39-cp39-macosx_10_9_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

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

Uploaded CPython 3.8 Windows x86-64

pyshtools-4.8-cp38-cp38-manylinux2014_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.8

pyshtools-4.8-cp38-cp38-macosx_10_9_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

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

Uploaded CPython 3.7m Windows x86-64

pyshtools-4.8-cp37-cp37m-manylinux2014_x86_64.whl (12.1 MB view details)

Uploaded CPython 3.7m

pyshtools-4.8-cp37-cp37m-macosx_10_9_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

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

Uploaded CPython 3.6m Windows x86-64

File details

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

File metadata

  • Download URL: pyshtools-4.8.tar.gz
  • Upload date:
  • Size: 85.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.7

File hashes

Hashes for pyshtools-4.8.tar.gz
Algorithm Hash digest
SHA256 732ccb498fc1581c0ae090eead0af142d2f61cfedac15d337af989f0d7288fa8
MD5 f108b6e987b0cbae633b7beae534b63d
BLAKE2b-256 289b9ae96312f9be2289eaf0e4953e7889c3db2724624d43d55585d684ef3a73

See more details on using hashes here.

File details

Details for the file pyshtools-4.8-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.8-cp39-cp39-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: CPython 3.9
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyshtools-4.8-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6cdbd3802ed9f69844ad3f3a2d1bffc2228d73d479de62b8af34b2dcc00bd83
MD5 1f8917ae8565d75fd84f24b2667599b6
BLAKE2b-256 a3a7f5be2b544b323487fd7341b9c018b535bbe446a43789102bb8081962f598

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyshtools-4.8-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 96893de0be7eeb559d4958c00acadcb7c1e30b56bd2774551b51e9273be768b2
MD5 693602f7e025fb4848e8d08c82d102d7
BLAKE2b-256 42b6a3acbaeea2b8a6b10e0b2f949960ece0dca3a73f6f35f027bfede72c7b8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.0

File hashes

Hashes for pyshtools-4.8-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 93262f15be33480dbe7a8edb6d0a3a5e14429feb2183edb14b87dfaa3bd0ae38
MD5 869e33c6dc7c7f29f5ad6f4d9dc900ab
BLAKE2b-256 bfcc3fef9836afc3fac53953ddbc163403ded97388f2f57b32bf2a2004f5f0c2

See more details on using hashes here.

File details

Details for the file pyshtools-4.8-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.8-cp38-cp38-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for pyshtools-4.8-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 314f3ad90684322887489fd9276d7a669c19885c198836b2cacb7dcd69b3408e
MD5 98916c22da2b9547cd62bcfa8667d0a2
BLAKE2b-256 7faa17514e8a6e24105599ae0597f509956a4738e7ec99130cbfb433ca983e35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6

File hashes

Hashes for pyshtools-4.8-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 94d4eaf58d754138f0bf7e92ef17c44425ec8322d1ed3236414c0ef4a938a38c
MD5 d2af78368bab2a269606f2ed14e1413b
BLAKE2b-256 63bd6514eece4bb0b28d3950c67d190dfb76e229dd6817e5700fa8a21e9a2d48

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.5

File hashes

Hashes for pyshtools-4.8-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 29f05ef51f4c2b0fbc90f3aa117a6105367720218b976afb448293498c10b3b8
MD5 dbd09a7da7ee63030ef21ec4c2ddbb1e
BLAKE2b-256 1fd50e42945a7a4a90baf62db2b046fc2f6bc29874783393f3e314058b99459c

See more details on using hashes here.

File details

Details for the file pyshtools-4.8-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

  • Download URL: pyshtools-4.8-cp37-cp37m-manylinux2014_x86_64.whl
  • Upload date:
  • Size: 12.1 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for pyshtools-4.8-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2eef195a5acd95a35058f5646c450e554e5f342803dedf3df4cc4d12dfad2ac1
MD5 f56d571fe5025b2eb60faedf444d6420
BLAKE2b-256 06921f0cf53960443a6d8c81fa25d304856be7c86d201351df512f7a0f401ff6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for pyshtools-4.8-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e6bcfdbf60bbfec3b1a7f90d4dc0d0937a3ca5c6928a526e9c699cea9fbe3b68
MD5 75f562f1a2442eaa9615e62708fda90d
BLAKE2b-256 9ebe71edda7ab589b80061f88f956945a625f5797243405730ab41e5d8958e1d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.8-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.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.6.8

File hashes

Hashes for pyshtools-4.8-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f0e9588a1c7f614e8028c1fd9cecf853357132a0eca7466f6c6e1ba9eb0dc39e
MD5 e2144c29b2ed228722bb146e3953b81e
BLAKE2b-256 5231645d52b3757fa9fd2383ab6e21759bafa15011f63badddb53ada0dea7163

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