nifty8.domains.gl_space module#
- class GLSpace(nlat, nlon=None)[source]#
Bases:
StructuredDomain
Represents a 2-sphere with Gauss-Legendre pixelization.
Its harmonic partner domain is the
LMSpace
.- Parameters:
nlat (int) – Number of latitudinal bins (or rings) that are used for this pixelization.
nlon (int, optional) – Number of longitudinal bins that are used for this pixelization. Default value is 2*nlat - 1.
- check_codomain(codomain)[source]#
Raises TypeError if codomain is not a matching partner domain for self.
Notes
This function only checks whether codomain is of type
LMSpace
.
- property dvol#
pixel volume(s)
Returns the volume factors of this domain, either as a floating point scalar (if the volume factors are all identical) or as a floating point array with a shape of self.shape.
- Type:
float or numpy.ndarray(dtype=float)
- get_default_codomain()[source]#
Returns a
LMSpace
object, which is capable of storing an accurate representation of data residing on self (if this data is band-limited).- Returns:
The partner domain
- Return type:
- property harmonic#
True iff this domain is a harmonic domain.
- Type:
bool
- property nlat#
number of rings in this domain
- Type:
int
- property nlon#
pixels per ring in this domain
- Type:
int
- property scalar_dvol#
uniform pixel volume, if applicable
Returns the volume factors of this domain as a floating point scalar, if the volume factors are all identical, otherwise returns None.
- Type:
float or None
- property shape#
number of pixels along each axis
The shape of the array-like object required to store information defined on the domain.
- Type:
tuple of int
- property size#
total number of pixels.
Equivalent to the products over all entries in the domain’s shape.
- Type:
int
- property total_volume#
Total domain volume.
Returns the sum over all the domain’s pixel volumes.
- Type:
float