Skip to main content

SHTOOLS - Tools for working with spherical harmonics

Project description

LOGO

LOGO

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

SHTOOLS is a Fortran 95 / Python library that can be used to perform spherical harmonic transforms and reconstructions, rotations of data expressed in spherical harmonics, and multitaper spectral analyses on the sphere.

FEATURES

  • A wide range of supported spherical harmonic functions:

  • real and complex,

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

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

  • Selected applications and routines:

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

  • localized multitaper spectral analyses, optimal window generation, spherical harmonic coupling matrices,

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

  • Clean implementation of the spherical harmonic transforms:

  • Exact quadrature rules using either the sampling theorem of Driscoll and Healy (1994) where data are equally sampled (or spaced) in latitude and longitude, or Gauss-Legendre quadrature.

  • Accurate and fast to approximately degree 2800, corresponding to a spatial resolution higher than 4 arc minutes. Transforms and reconstructions take on the order of 1 second for bandwidths less than 600 and about 3 minutes for bandwidths close to 2800 on standard machines. The Fortran 95 routines are OpenMP compatible and OpenMP thread-safe.

INSTALLATION

Requirements

Linux:

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

OSX:

brew install fftw --with-fortran

Python Library

pip install pyshtools

Or, to install a developer version, download or clone the SHTOOLS repository, enter the SHTOOLS folder and then execute one of the following commands:

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

To install the Fortran 95 library, enter one of the following

make fortran
make fortran-mp  # Open-MP Fortran routines

Or, with OSX, use the brew package manager:

brew tap shtools/shtools
brew install shtools

To also install the OpenMP components, add --with-openmp to the last command.

More installation instructions and options can be found in the web documentation and GitHub wiki.

HOW TO USE

SHTOOLS can be invoked from Fortran 95, Python 2, or Python 3. The base SHTOOLS software is written in Fortran 95, and the Python library allows simple access to all fortran-compiled routines and offers helper routines as well as simple interfaces.

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

  • Introduction 1: Grids and Spherical Harmonic Coefficients [ipynb]

  • Introduction 2: Localization Windows and Spectral Analysis [ipynb]

  • Tutorial 1: Simple Spherical Harmonic Expansions [ipynb]

  • Tutorial 2: Localized Spectral Analysis on the Sphere [ipynb]

  • Tutorial 3: The SHTOOLS Class Interface [ipynb]

  • Tutorial 4: Spherical Harmonic Normalizations and Parseval’s theorem [ipynb]

  • Tutorial 5: Multitaper Spectral Estimation - SHWindows Class Interface [ipynb]

  • Tutorial 6: 3D Spherical Harmonic Plots [ipynb]

You can keep up to date by following SHTOOLS on Twitter.

ACKNOWLEDGMENTS

SHTOOLS is open source (revised BSD license) and makes use of the freely available Fourier transform package FFTW and the linear algebra packages LAPACK and BLAS.

CITATION

Wieczorek, M. A., M. Meschede, I. Oshchepkov, E. Sales de Andrade (2016). SHTOOLS: Version 3.3. Zenodo. doi:10.5281/zenodo.60010.

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

Uploaded Source

File details

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

File metadata

  • Download URL: pyshtools-3.4.tar.gz
  • Upload date:
  • Size: 17.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyshtools-3.4.tar.gz
Algorithm Hash digest
SHA256 8f613ce7314674090bbbfb6ba46334293628d2c85c912c4bc95df89e39a07eec
MD5 93fa41094bea6ccc7476b1da38d6c4ef
BLAKE2b-256 9ce57fe23d6f7103cf868e8c859621d99a2f8bb837d418d0f4a106c2aa6450a4

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