nifty7.domains.structured_domain module#

class StructuredDomain[source]#

Bases: Domain

The abstract base class for all structured domains.

An instance of a space contains information about the manifold’s geometry and enhances the functionality of Domain by methods that are needed for power spectrum analysis and smoothing.

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_fft_smoothing_kernel_function(sigma)[source]#

Helper for Gaussian smoothing.

This method, which is only implemented for harmonic domains, helps to smoothe fields that are defined on a domain that has this domain as its harmonic partner. The returned function does a pointwise evaluation of a zero-centered Gaussian on the field values, which corresponds to a convolution with a Gaussian kernel with sigma standard deviation in position space.

Parameters:

sigma (float) – A real number representing a physical scale on which the smoothing takes place. Mathematically sigma is the standard deviation of a convolution with a normalized, zero-centered Gaussian that takes place in position space.

Returns:

A smoothing operation that multiplies values with a Gaussian kernel.

Return type:

function (array-like -> array-like)

get_k_length_array()[source]#

k vector lengths, if applicable.

Returns the length of the k vector for every pixel. This method is only implemented for harmonic domains.

Returns:

An array containing the k vector lengths

Return type:

Field

get_unique_k_lengths()[source]#

Sorted unique k-vector lengths, if applicable.

Returns an array of floats containing the unique k vector lengths for this domain. This method is only implemented for harmonic domains.

property harmonic#

True iff this domain is a harmonic domain.

Type:

bool

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 total_volume#

Total domain volume.

Returns the sum over all the domain’s pixel volumes.

Type:

float