Published August 25, 2021
| Version v4.9
Software
Open
SHTOOLS/SHTOOLS: Verions 4.9
Creators
- 1. Laboratoire Lagrange - Observatoire de la Côte d'Azur
- 2. @tweag
- 3. Center of Geodesy, Cartography and SDI (TsNIIGAiK)
- 4. University of Bonn
- 5. Universität Bonn
- 6. AMD
- 7. Perimeter Institute for Theoretical Physics
- 8. @gitlabhq
Description
Version 4.9
Backends
Implemented the option to use a different backend when performing certain operations requiring spherical harmonic transforms. At present, only 'shtools' (default) and the Distinctly Useful Code Collection ('ducc') are supported.
- Introduced a new module
backends
that has functions allowing the user to control which backend is used. To set the backend for all subsequent operations, usebackends.select_preferred_backend()
. - Added the optional parameters
backend
andnthreads
('ducc' only) to all methods of the pyshtools classes that allow multiple backends (such asSHGrid
andSHCoeffs
). - Added a new
backends
web documentation page that describes the use of the new module.
Plotting routines
- Added the new methods
SHGrid.histogram()
andSHGrid.plot_histogram()
for generating area-weighted histograms. - Renamed a few instances of variable names used in the plotting routines from
title_labelsize
totitlesize
for consistency. This affects the methodsSlepian.plot_coupling_matrix()
,Slepian.plot_spectra()
, andSHWindow.plot_coupling_matrix()
. - Modified some plotting routines so that fontsizes can be specified using standard matplotlib strings.
- Replaced the deprecated matplotlib
get_geometry
withget_subplotspec
. - Replaced the pygmt option
I
with the aliasshading
for colorbars.
IO and datasets
- Updated the Venus rotation period using data from Margot et al. (2021).
- Renamed
constants
variablesr
tomean_radius
(but keptr
as an alias for backwards compatibility). - Improved the reading of ICGEM formatted files of gravitational potential models. Fixed a bug where the time variable contribution was not computed when the coefficients had an associated
trnd
ordot
term. When a line in the data section starts with an unknown key, a warning is now printed to the screen (which can be turned off by specifyingquiet=True
). For files formatted asicgem2.0
, time variable terms were simply ignored if the specified epoch fell outside of the allowed range. Now, the routine will instead raise an error. Finally, the documentation was improved by describing the allowable keyword entries of the header and data section of the file. - Added the option
encoding
for all routines and methods that read or write text-based spherical harmonic files. - Hard coded all datasets to use
utf-8
in order to avoid problems with the XGM2019E dataset that has a character that can not be decoded by the GBK encoding that is the default in some Chinese installations. - Added a few historical lunar gravity fields to the module
datasets.Moon.historical.gravity
.
Other changes
- Added a C wrapper for the function
MakeGradientDH()
. - Changed the default behavior of the Fortran routine
MakeGradientDH()
andSHCoeffs.gradient()
. The original behavior was to compute the gradient on a sphere of radiusr
, wherer
was the degree 0 coefficient of the function. The new behaviour is to compute the gradient on the unit sphere. This radius can be modified by supplying the optional argumentradius
. - Added the option 'per_lm' for generating random spherical harmonic coefficients in the
.from_random()
methods ofSHCoeffs
,SHGravCoeffs
, andSHMagCoeffs
. - Fixed two bugs related to complex spherical harmonic transforms. First, for complex grids, the last coefficient
coeffs[1, lmax, lmax]
was in error whenlmax
was odd and when usingDH
grids. Second, when usingSHGrid.expand()
with grid typeDH2
the parametersampling=2
was not passed to the Fortran routine. - Updated
makefile install
to include example data files, and to place them in the correct directories when installing with homebrew. - Updated a few dependencies, including
astropy>=4.0
andpygmt>=0.3.0
. - Fixed a floating point error-caused bug in
SHGrid
that could arise if the value input to arccos was greater than 1. - Converted
np.float_
andnp.complex_
tonp.float64
andnp.complex128
to avoid numpy deprectation warning. - Added
threadsafe
to numpy signature files.
M. A. Wieczorek, M. Meschede, T. Brugere, A. Corbin, A. Hattori, K. Leinweber, I. Oshchepkov, M. Reinecke, E. Sales de Andrade, E. Schnetter, S. Schröder, A. Vasishta, A. Walker, B. Xu (2021). SHTOOLS: Version 4.9, Zenodo, doi:10.5281/zenodo.592762
Files
SHTOOLS/SHTOOLS-v4.9.zip
Files
(41.7 MB)
Name | Size | Download all |
---|---|---|
md5:a3f0ea12160ea5e5abbfc60d55bcaec6
|
41.7 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/SHTOOLS/SHTOOLS/tree/v4.9 (URL)