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 Array of the gridded 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
to_file() Save raw gridded data to a text or binary file.
to_array() Return a numpy array of the gridded data.
lats() Return a vector containing the latitudes of each row of the gridded data.
lons() Return a vector containing the longitudes of each column of the gridded data.
expand() Expand the grid into spherical harmonics.
copy() Return a copy of the class instance.
plot() Plot the raw data using a simple cylindrical projection.
plot3d() Plot the raw data on a 3d sphere.
info() Print a summary of the data stored in the SHGrid instance.

> Home > Documentation > Python > Classes

Laboratoire Lagrange Observatoire de la Côte d'Azur © 2016 SHTOOLS