Commit cb5ac9c6 by Martin Reinecke

comment cleanup

parent c8928a36
Pipeline #19541 passed with stage
in 4 minutes and 11 seconds
 ... @@ -20,6 +20,7 @@ from builtins import range ... @@ -20,6 +20,7 @@ from builtins import range from .linear_operator import LinearOperator from .linear_operator import LinearOperator from .. import DomainTuple from .. import DomainTuple class ComposedOperator(LinearOperator): class ComposedOperator(LinearOperator): """ NIFTY class for composed operators. """ NIFTY class for composed operators. ... @@ -46,27 +47,6 @@ class ComposedOperator(LinearOperator): ... @@ -46,27 +47,6 @@ class ComposedOperator(LinearOperator): Raised if Raised if * an element of the operator list is not an instance of the * an element of the operator list is not an instance of the LinearOperator base class. LinearOperator base class. Notes ----- Very useful in case one has to transform a Field living over a product space (see example below). Examples -------- Minimal example of transforming a Field living on two domains into its harmonic space. >>> x1 = RGSpace(5) >>> x2 = RGSpace(10) >>> k1 = RGRGTransformation.get_codomain(x1) >>> k2 = RGRGTransformation.get_codomain(x2) >>> FFT1 = FFTOperator(domain=(x1,x2), target=(k1,x2), space=0) >>> FFT2 = FFTOperator(domain=(k1,x2), target=(k1,k2), space=1) >>> FFT = ComposedOperator((FFT1, FFT2) >>> f = Field.from_random('normal', domain=(x1,x2)) >>> FFT.times(f) """ """ # ---Overwritten properties and methods--- # ---Overwritten properties and methods--- ... ...
 ... @@ -31,7 +31,6 @@ class DiagonalOperator(EndomorphicOperator): ... @@ -31,7 +31,6 @@ class DiagonalOperator(EndomorphicOperator): EndomorphicOperator. It multiplies an input field pixel-wise with its EndomorphicOperator. It multiplies an input field pixel-wise with its diagonal. diagonal. Parameters Parameters ---------- ---------- diagonal : Field diagonal : Field ... @@ -55,14 +54,15 @@ class DiagonalOperator(EndomorphicOperator): ... @@ -55,14 +54,15 @@ class DiagonalOperator(EndomorphicOperator): self_adjoint : boolean self_adjoint : boolean Indicates whether the operator is self_adjoint or not. Indicates whether the operator is self_adjoint or not. NOTE: the fields given to __init__ and returned from .diagonal() are considered to be bare, i.e. during operator application, the colume factors are applied explicitly. See Also See Also -------- -------- EndomorphicOperator EndomorphicOperator """ """ # ---Overwritten properties and methods--- def __init__(self, diagonal, domain=None, spaces=None): def __init__(self, diagonal, domain=None, spaces=None): super(DiagonalOperator, self).__init__() super(DiagonalOperator, self).__init__() ... @@ -113,12 +113,9 @@ class DiagonalOperator(EndomorphicOperator): ... @@ -113,12 +113,9 @@ class DiagonalOperator(EndomorphicOperator): ------- ------- out : Field out : Field The diagonal of the Operator. The diagonal of the Operator. """ """ return self._diagonal.weight(-1) return self._diagonal.weight(-1) # ---Mandatory properties and methods--- @property @property def domain(self): def domain(self): return self._domain return self._domain ... @@ -138,8 +135,6 @@ class DiagonalOperator(EndomorphicOperator): ... @@ -138,8 +135,6 @@ class DiagonalOperator(EndomorphicOperator): self._unitary = (abs(self._diagonal.val) == 1.).all() self._unitary = (abs(self._diagonal.val) == 1.).all() return self._unitary return self._unitary # ---Added properties and methods--- def _times_helper(self, x, operation): def _times_helper(self, x, operation): if self._spaces is None: if self._spaces is None: return operation(self._diagonal)(x) return operation(self._diagonal)(x) ... ...
 ... @@ -71,7 +71,6 @@ class DirectSmoothingOperator(EndomorphicOperator): ... @@ -71,7 +71,6 @@ class DirectSmoothingOperator(EndomorphicOperator): wgt[i] is an array with nval[i] entries containing the wgt[i] is an array with nval[i] entries containing the normalized smoothing weights. normalized smoothing weights. """ """ dxmax = self._effective_smoothing_width*self._sigma dxmax = self._effective_smoothing_width*self._sigma x = np.asarray(x) x = np.asarray(x) ... ...