Commit d8f33788 authored by Reimar H Leike's avatar Reimar H Leike
Browse files

added docstrings for attributes in space classes, moved some existing docstrings from init

parent 41961dc0
Pipeline #12283 passed with stage
in 5 minutes and 11 seconds
......@@ -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
--------
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment