nifty8.domains.hp_space module#

class HPSpace(nside)[source]#

Bases: StructuredDomain

Represents 2-sphere with HEALPix discretization.

Its harmonic partner domain is the LMSpace.

Parameters:

nside (int) – The corresponding HEALPix Nside parameter. Must be a positive integer and typically is a power of 2.

__init__(nside)[source]#
__repr__()[source]#

Return repr(self).

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.

get_default_codomain()[source]#

Returns a LMSpace object, which is capable of storing a fairly accurate representation of data residing on self

Returns:

The partner domain

Return type:

LMSpace

Notes

The lmax and mmax parameters of the returned LMSpace are set to 2*self.nside.

property harmonic#

True iff this domain is a harmonic domain.

Type:

bool

property nside#

HEALPix Nside parameter of 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