Skip to main content

SHTOOLS - Tools for working with spherical harmonics

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 and reconstructions, 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,

    • Fortran 95 routines are OpenMP compatible and OpenMP thread-safe.

  • Selected applications and routines:

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

    • localized multitaper spectral analyses, expansions in Slepian basis functions, spherical harmonic coupling matrices,

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

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

INSTALLATION

pyshtools for Python

Binary install for linux/macOS/windows:

pip install pyshtools

Build from source:

pip install pyshtools --no-binary pyshtools

pyshtools for Anaconda Python

Install fftw3 with fortran bindings and then install pyshtools using pip:

conda install -c eumetsat fftw3
pip install pyshtools

pyshtools for Python (developer install)

Linux requirements:

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

macOS requirements:

brew install fftw

To install the develop branch use:

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

Alternatively, clone the shtools repo

git clone https://github.com/SHTOOLS/SHTOOLS.git

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

pip install .  # installs into the active python environment lib folder
pip install -v -e .  # installs into the SHTOOLS/pyshtools folder and links 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  # 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 and GitHub wiki.

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, 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.3.tar.gz (29.4 MB view hashes)

Uploaded Source

Built Distributions

pyshtools-4.3-cp37-cp37m-manylinux1_x86_64.whl (10.7 MB view hashes)

Uploaded CPython 3.7m

pyshtools-4.3-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.7m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyshtools-4.3-cp36-cp36m-manylinux1_x86_64.whl (10.7 MB view hashes)

Uploaded CPython 3.6m

pyshtools-4.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.6m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyshtools-4.3-cp35-cp35m-manylinux1_x86_64.whl (10.7 MB view hashes)

Uploaded CPython 3.5m

pyshtools-4.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.5m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyshtools-4.3-cp34-cp34m-manylinux1_x86_64.whl (10.7 MB view hashes)

Uploaded CPython 3.4m

pyshtools-4.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 3.4m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

pyshtools-4.3-cp27-cp27mu-manylinux1_x86_64.whl (10.7 MB view hashes)

Uploaded CPython 2.7mu

pyshtools-4.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (2.9 MB view hashes)

Uploaded CPython 2.7m macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.9+ intel macOS 10.9+ x86-64

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