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 routinesspectrum
andcross_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 classSHCoeffs
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 intospectralanalysis
, and the subpackageother
has been renamedutils
. - 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 functionMakeGridPointC
was created for complex coefficients. - The majority of the methods for the classes
SHCoeffs
,SHGrid
andSHWindow
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 classSHCoeffs
. - 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 routineMakeGravGridDH
. - 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
andother.PreGLQ
were removed from pyshtools, as these can be found in other scipy packages. - The SHTOOLS routine
DHaj
was added to the pyshtools subpackageutils
. - Python docstrings have been streamlined and standardized.
- ...plus, many minor changes and optimizations...
Citation:
M. A. Wieczorek, M. Meschede, I. Oshchepkov, E. Sales de Andrade, and heroxbd (2016). SHTOOLS: Version 4.0. Zenodo. doi:10.5281/zenodo.206114