pyshtools is an archive of Python software 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 fast and accurate.

• Supports multiple backends for performing basic mathematical operations, including shtools and the Distinctly Useful Code Collection (DUCC).

• Perform localized multitaper spectral analyses, or expand functions in terms of localized Slepian bases.

• Supports 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.

## Easy installation

The Python components of SHTOOLS can be installed using the Python package manager pip or conda. Binaries are pre-built for Linux, macOS and Windows architectures, and you need only to execute one of the following commands in a unix terminal:

pip install pyshtools