There is a newer version of this record available.

Software Open Access


Mark Wieczorek; MMesch; Elliott Sales de Andrade; Ilya Oshchepkov; heroxbd

This is a major update that fixes bugs, adds new functionality, and improves Python error handing. All users are requested to upgrade to 4.0.

Change log
  • Instead of executing a Fortran STOP, which kills the Python kernel, the Fortran subroutines now return an exitstatus that allows Python to raise an exception. This technique does not work with the few Fortran functions that pyshtools calls, but these functions are relatively benign, and will soon be phased out for Python native functions.
  • The Fortran powerspectrum routines have been removed from pyshtools, and have been replaced with Python native routines spectrum and cross_spectrum. The Python routines allow to specify the normalization, whether the output should be power, energy or l2norm, and whether the spectrum is per degree, per coefficient, or per log bandwidth.
  • The method plot_spectrum2d() was added to the class SHCoeffs to plot the power as a function of degree and order.
  • All pyshtools modules have been converted into proper Python subpackages. The subpackage localizedpsectralanalysis has been merged into spectralanalysis, and the subpackage other has been renamed utils.
  • The Python class method SHCoeffs.expand() now can evaluate the function either on an SHGrid or for a list of latitude and longitude points. As part of this change, a new fortran function MakeGridPointC was created for complex coefficients.
  • The majority of the methods for the classes SHCoeffs, SHGrid and SHWindow have been rename for consistency (see documentation!). Also, the classes now give the option of reading or saving to files as numpy arrays.
  • Added new Python function read_icgen_gfc for reading ICGEM-format gravity coefficient files.
  • The operator pow was added to the class SHCoeffs.
  • All methods in the pyshtools classes now return copies by default, which can be modified by the optional argument copy.
  • Added pot as a mandatory return argument for the Python routine MakeGravGridDH.
  • Several minor modifications and bug fixes were made to the makefiles to improve compatibility and to allow the use of make -j.
  • The routines other.EigValSym, other.EigValVecSym, other.EigValVecSymTri, other.RandomGaussian, other.RandomN and other.PreGLQ were removed from pyshtools, as these can be found in other scipy packages.
  • The SHTOOLS routine DHaj was added to the pyshtools subpackage utils.
  • Python docstrings have been streamlined and standardized.
  •, many minor changes and optimizations...

Files (18.3 MB)
Name Size
18.3 MB Download
All versions This version
Views 55457
Downloads 876
Data volume 1.4 GB109.8 MB
Unique views 51257
Unique downloads 424


Cite as