Skip to main content

SHTOOLS - Spherical Harmonic Tools

Project description

Documentation DOI Paper Join the chat at https://gitter.im/SHTOOLS/SHTOOLS Twitter

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

FEATURES

  • A wide range of supported spherical harmonic functions:

    • real and complex,

    • all standard normalizations (Geodesy 4π, Schmidt semi-normalized, orthonormalized, unnormalized),

    • Condon-Shortley phase factor of (-1)m.

  • Clean implementation of the spherical harmonic transforms:

    • exact quadrature rules using the sampling theorem of Driscoll and Healy (1994) or Gauss-Legendre quadrature,

    • accurate and fast to approximately degree 2800,

    • OpenMP compatible and OpenMP thread-safe.

  • Selected applications and routines:

    • global spectral analysis, spherical harmonic rotations, and Wigner 3j symbols,

    • localized multitaper spectral analyses, and expansions in Slepian basis functions,

    • standard gravity and magnetic field calculations, computation of the geoid, and finite-amplitude potential from topography.

  • Integrated support for working with xarray and netcdf data.

  • Publication quality maps using Cartopy or pygmt.

  • SHTOOLS is open source software (3-clause BSD license).

INSTALLATION

pyshtools for Python

Binary install for linux and macOS:

pip install pyshtools
pip install --upgrade pyshtools  # upgrade to a new version

Build from source:

pip install pyshtools --no-binary pyshtools

pyshtools for developers

Linux requirements:

sudo apt-get install libblas-dev liblapack-dev g++ gfortran libfftw3-dev tcsh

macOS requirements:

brew install fftw
# for lapack and blas, link to the system '-framework Accelerate'

To install the develop branch:

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

Alternatively, clone the shtools repo and then install:

git clone https://github.com/SHTOOLS/SHTOOLS.git
cd shtools
git checkout develop
pip install .  # install into the active python environment lib folder, or
pip install -e .  # install into the SHTOOLS/pyshtools folder and link to the active python environment

Fortran Library

Clone the shtools repo, and then execute one of the following commands in the shtools directory:

make fortran
make fortran-mp  # for OpenMP Fortran routines

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

More 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 allow simple access to the fortran-compiled routines. A variety of Python notebooks and example files are included that demonstrate the major features of the library.

To get started, check out the following Python tutorial notebooks:

DEVELOPERS

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

CITATION

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

Uploaded Source

Built Distributions

pyshtools-4.6.2-cp38-cp38-win_amd64.whl (6.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8

pyshtools-4.6.2-cp38-cp38-macosx_10_9_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

pyshtools-4.6.2-cp37-cp37m-win_amd64.whl (6.6 MB view details)

Uploaded CPython 3.7m Windows x86-64

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

Uploaded CPython 3.7m

pyshtools-4.6.2-cp37-cp37m-macosx_10_9_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

pyshtools-4.6.2-cp36-cp36m-win_amd64.whl (6.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

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

Uploaded CPython 3.6m

pyshtools-4.6.2-cp36-cp36m-macosx_10_9_x86_64.whl (2.9 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: pyshtools-4.6.2.tar.gz
  • Upload date:
  • Size: 57.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.6

File hashes

Hashes for pyshtools-4.6.2.tar.gz
Algorithm Hash digest
SHA256 dd9d6ebb8f6e04cfc7f5989a21c27ede5fc781252f2ef65ae1acd9203c94a30d
MD5 d1f9a44613d4188ba7cc042345d53cbc
BLAKE2b-256 a52925d8fac43b84fa85a1c45a7da70fe656d17815d9a82cce72af57c8aa5974

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for pyshtools-4.6.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ef2af3d76236e9f966d2c5de21942eb9f61c24e6478f1b40adc715f33a4b5beb
MD5 79b261a64b3079862bd08e093dbb2122
BLAKE2b-256 8bc3c64ec021a9fff0cc87e20aa6414b72d52c9a9929899ecd30fe00463b9dbd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp38-cp38-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.8
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.3

File hashes

Hashes for pyshtools-4.6.2-cp38-cp38-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 78f7bb7964fe74266bdaef3e984560921964205508b19e2d668c3adca42e643f
MD5 df6087fcd8419bedd54b49e1d973bf2b
BLAKE2b-256 c13c2f6bbb4dc4a66e329f63e26159d14390a2f7f5d264b809e12028f59c5f60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.1

File hashes

Hashes for pyshtools-4.6.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3dc7fa8f45ace49a2c63d968349c686c32cb2f06cae2291abd19ba53985b3115
MD5 8455016f89b939a24d82b0b90ad9bc41
BLAKE2b-256 3e8be1a16c834bf33c8af816b950b73317debc8ebc3ae26026aa4ca76bd4c65c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for pyshtools-4.6.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 e308f6b776fa8fa74f9b549d78fb2acb2fe57464b35a3156eab677ab20d20c95
MD5 e8821286ac3821fe38b89c7230f9458f
BLAKE2b-256 80b790c8864801b0bc1fb493ddfa18939f92544f8ba0f6ad02f2cd5983e9fa16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.3

File hashes

Hashes for pyshtools-4.6.2-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42ac232d5127c9e2352278214b9800a898fa10df7b0b584e22182bd76d8ef032
MD5 ef845d7da70f4b21cb4c2b9b9e686098
BLAKE2b-256 c555cec86678cb080374a861ad11f77c8196af545df90068e86a786dbacfe553

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for pyshtools-4.6.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 febb96378f85fa8f5b55458b47073c78c6687a49b06c2b9f709447d94c115e21
MD5 74a5e0b1540b82f9c4580685e25e8691
BLAKE2b-256 f8be82661ee3653cba90f957c15ae682a09b9de3bfaf9fd9e66c68a1a1288188

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 6.6 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for pyshtools-4.6.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 d866593e42070adab18e8519fa9b44cf522ce9b34c50672796969c579a372d30
MD5 f510680f15bb0511562f8fa31763e748
BLAKE2b-256 ad9f1db720f3a6b4dcca4a1f5188436c58cad348e03e416234815caa88b32e8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 10.8 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.3

File hashes

Hashes for pyshtools-4.6.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 79f8f3408f8677115b83485451264e57d6d770ccade305e431deb39749d806af
MD5 2f35e58b7db5ed02bdeffd7e97af5220
BLAKE2b-256 1124f0428beea230f089b6e575abb62aa438e2aff34e4c7277c78bf9f94eaa68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyshtools-4.6.2-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 2.9 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.8

File hashes

Hashes for pyshtools-4.6.2-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 41b7c3d9610c5acb217e1f978232e52347566cdd6b68df672c2e84a943c43926
MD5 f24a808237746a74bb04cddfa2332bc8
BLAKE2b-256 0a9b777ef83e6e010842de9946da2c87e98c81df20e589169e56499e3347c614

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