diff --git a/nifty/spaces/lm_space/lm_space.py b/nifty/spaces/lm_space/lm_space.py index c1c046d917595b193518bcc8915ecc3039060a51..c0fafbf790eee75753e5f98b7af99472c45f19ca 100644 --- a/nifty/spaces/lm_space/lm_space.py +++ b/nifty/spaces/lm_space/lm_space.py @@ -37,7 +37,7 @@ class LMSpace(Space): NIFTY subclass for spherical harmonics components, for representations of fields on the two-sphere. - Parameters + Attributes ---------- lmax : int The maximal :math:`l` value of any spherical harmonics @@ -45,6 +45,14 @@ class LMSpace(Space): mmax : int The maximal :math:`m` value of any spherical harmonic :math:`Y_{lm}` that is represented in this Space. + dim : np.int + Total number of dimensionality, i.e. the number of pixels. + harmonic : bool + Specifies whether the space is a signal or harmonic space. + total_volume : np.float + The total volume of the space. + shape : tuple of np.ints + The shape of the space's data array. See Also -------- diff --git a/nifty/spaces/power_space/power_indices.py b/nifty/spaces/power_space/power_indices.py index 64018cd6b1b561caae559afc8d7af2d5a00d4690..5c9339b7d1d2027864f1de617a80c32cd2239ca4 100644 --- a/nifty/spaces/power_space/power_indices.py +++ b/nifty/spaces/power_space/power_indices.py @@ -25,32 +25,33 @@ from d2o.config import configuration as d2o_config class PowerIndices(object): + """Computes helpful quantities to deal with power spectra. + + Given the shape and the density of a underlying rectangular grid this + class provides the user + with the pindex, kindex, rho and pundex. The indices are binned + according to the supplied parameter scheme. If wanted, computed + results are stored for future reuse. + + Attributes + ---------- + shape : tuple, list, ndarray + Array-like object which specifies the shape of the underlying + rectangular grid + dgrid : tuple, list, ndarray + Array-like object which specifies the step-width of the + underlying grid + logarithmic : bool *optional* + Flag specifying if the binning of the default indices is + performed on logarithmic scale. + nbin : integer *optional* + Number of used bins for the binning of the default indices. + binbounds : {list, array} + Array-like inner boundaries of the used bins of the default + indices. + """ def __init__(self, domain, distribution_strategy, logarithmic=False, nbin=None, binbounds=None): - """ - Returns an instance of the PowerIndices class. Given the shape and - the density of a underlying rectangular grid it provides the user - with the pindex, kindex, rho and pundex. The indices are binned - according to the supplied parameter scheme. If wanted, computed - results are stored for future reuse. - - Parameters - ---------- - shape : tuple, list, ndarray - Array-like object which specifies the shape of the underlying - rectangular grid - dgrid : tuple, list, ndarray - Array-like object which specifies the step-width of the - underlying grid - logarithmic : bool *optional* - Flag specifying if the binning of the default indices is - performed on logarithmic scale. - nbin : integer *optional* - Number of used bins for the binning of the default indices. - binbounds : {list, array} - Array-like inner boundaries of the used bins of the default - indices. - """ self.domain = domain self.distribution_strategy = distribution_strategy diff --git a/nifty/spaces/power_space/power_space.py b/nifty/spaces/power_space/power_space.py index 223404ee94467387f958a6c3fa011d7a012b6bce..f83b6d9723e0b8180514c796f157d00af7cf2847 100644 --- a/nifty/spaces/power_space/power_space.py +++ b/nifty/spaces/power_space/power_space.py @@ -54,14 +54,24 @@ class PowerSpace(Space): Attributes ---------- pindex : distributed_data_object - TODO add description + This holds the information which pixel of the harmonic partner gets + mapped to which power bin kindex : numpy.ndarray - TODO add description + Sorted array of all k-modes. pundex : numpy.ndarray - TODO add description + Flat index of the first occurence of a k-vector with length==kindex[n] + in the k_array. rho : numpy.ndarray The amount of k-modes that get mapped to one power bin is given by rho. + dim : np.int + Total number of dimensionality, i.e. the number of pixels. + harmonic : bool + Specifies whether the space is a signal or harmonic space. + total_volume : np.float + The total volume of the space. + shape : tuple of np.ints + The shape of the space's data array. Notes @@ -216,7 +226,7 @@ class PowerSpace(Space): @property def pindex(self): - """ A distributed_data_objects having the shape of the harmonic partner + """ A distributed_data_object having the shape of the harmonic partner space containing the indices of the power bin a pixel belongs to. """ return self._pindex