summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
diff options
context:
space:
mode:
Diffstat (limited to 'Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py')
-rw-r--r--Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py32
1 files changed, 21 insertions, 11 deletions
diff --git a/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py b/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
index 8e07802..2ff0b20 100644
--- a/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
+++ b/Wrappers/Python/ccpi/optimisation/operators/GradientOperator.py
@@ -35,7 +35,9 @@ CORRELATION_SPACECHANNEL = "SpaceChannels"
class Gradient(LinearOperator):
- """This is a class to compute the first-order forward/backward differences on ImageData
+
+ r'''Gradient Operator: Computes first-order forward/backward differences on
+ 2D, 3D, 4D ImageData under Neumann/Periodic boundary conditions
:param gm_domain: Set up the domain of the function
:type gm_domain: `ImageGeometry`
@@ -50,17 +52,17 @@ class Gradient(LinearOperator):
'Space' or 'SpaceChannels', defaults to 'Space'
* *backend* (``str``) --
'c' or 'numpy', defaults to 'c' if correlation is 'SpaceChannels' or channels = 1
- """
+
+
+ Example (2D):
- r'''Gradient Operator: .. math:: \nabla : X -> Y
-
- Computes first-order forward/backward differences
- on 2D, 3D, 4D ImageData
- under Neumann/Periodic boundary conditions
-
- Example (2D): u\in X, \nabla(u) = [\partial_{y} u, \partial_{x} u]
- u^{*}\in Y, \nabla^{*}(u^{*}) = \partial_{y} v1 + \partial_{x} v2
+ .. math::
+ \nabla : X -> Y \\
+ u\in X, \nabla(u) = [\partial_{y} u, \partial_{x} u] \\
+ u^{*}\in Y, \nabla^{*}(u^{*}) = \partial_{y} v1 + \partial_{x} v2
+
+
'''
#kept here for backwards compatability
@@ -126,7 +128,15 @@ class Gradient(LinearOperator):
class Gradient_numpy(LinearOperator):
def __init__(self, gm_domain, bnd_cond = 'Neumann', **kwargs):
-
+ '''creator
+
+ :param gm_domain: domain of the operator
+ :type gm_domain: :code:`AcquisitionGeometry` or :code:`ImageGeometry`
+ :param bnd_cond: boundary condition, either :code:`Neumann` or :code:`Periodic`.
+ :type bnd_cond: str, optional, default :code:`Neumann`
+ :param correlation: optional, :code:`SpaceChannel` or :code:`Space`
+ :type correlation: str, optional, default :code:`Space`
+ '''
super(Gradient_numpy, self).__init__()
self.gm_domain = gm_domain # Domain of Grad Operator