SHTOOLS --- Tools for working with spherical harmonics

> Home > Documentation > Python > Classes

SHGrid

Subclasses
DHRealGrid Class for real Driscoll and Healy (1994) sampled grids.
DHComplexGrid Class for complex Driscoll and Healy (1994) sampled grids.
GLQRealGrid Class for real Gauss-Legendre quadrature sampled grids.
GLQComplexGrid Class for complex Gauss-Legendre quadrature sampled grids.
Initialization
x = SHGrid.from_array() Initialize using an array.
x = SHGrid.from_file() Initialize using an array from a file.
Class attributes
data Gridded array of the data.
nlat, nlon The number of latitude and longitude bands in the grid.
lmax The maximum spherical harmonic degree that can be resolved by the grid sampling.
sampling For Driscoll and Healy grids, the longitudinal sampling of the grid. Either nlong = nlat or nlong = 2 * nlat.
kind Either 'complex' or 'real' for the data type.
grid Either 'DH' or 'GLQ' for Driscoll and Healy grids or Gauss-Legendre Quadrature grids.
zeros The cos(colatitude) nodes used with Gauss-Legendre Quadrature grids. Default is None.
weights The latitudinal weights used with Gauss-Legendre Quadrature grids. Default is None.
Class methods
get_lats() Return a vector containing the latitudes of each row of the gridded data.
get_lons() Return a vector containing the longitudes of each column of the gridded data.
get_grid() Return a numpy array of the gridded data.
expand() Expand the grid into spherical harmonics.
plot_rawdata() Plot the raw data using a simple cylindrical projection.
plot_3dsphere() Plot the raw data on a 3d sphere.
info() Print a summary of the data stored in the SHGrid instance.

> Home > Documentation > Python > Classes

Institut de Physique du Globe de Paris University of Sorbonne Paris Cité © 2016 SHTOOLS