The easiest way to start learning about pyshtools is to see it in action in a Jupyter notebook.


The tutorials are designed for python users who are encountering pyshtools for the first time. Each Jupyter notebook takes the user by the hand and shows how to perform the most basic operations. Each tutorial should take under 15 minutes to read, and at the end of each you will be able to do simple tasks, like make grids of data from spherical harmonic coefficients, and project these in map form.

Tutorial Description
Spherical harmonic coefficients and grids Learn how to transform spherical harmonic coefficients into maps, maps into spherical harmonic coefficients, and how to plot the power spectrum.
Localization windows and spectral analysis Learn how to obtain the power spectrum of a function, localized to any region on the sphere.
Gravity and magnetic fields Learn how to read gravity spherical harmonic coefficients from a file, and to make maps of the geoid and free-air gravity.
Plotting maps Learn how to make publication quality images using geographical projections.


These guides assume that the user already has a basic understanding of how pyshtools works. Each notebook describes in a higher level of detail how to use advanced features of pyshtools that often arise in scientific analyses.

Guide Description
Low-level spherical harmonic analyses Learn how to do spherical harmonic analyses using low-level functions (without SHCoeffs and SHGrid classes).
Advanced usage of SHCoeffs and SHGrid Learn advanced features of the SHCoeffs and SHGrid class interfaces.
Spherical harmonic normalizations Learn more about spherical harmonic normalizations and Parseval’s theorem.
Advanced localized spectral analysis Learn more about performing localized spectral analyses on the sphere.
Advanced usage of SHWindow Learn advanced features of the SHWindow class interface.
3D plots Learn how to make 3-dimensional plots of gridded data.
Edit me