Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
b8b7c28e
Commit
b8b7c28e
authored
May 08, 2017
by
Pumpe, Daniel (dpumpe)
Browse files
Docstrings for EndomorphicOperator
parent
b596c6e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty/operators/endomorphic_operator/endomorphic_operator.py
View file @
b8b7c28e
...
...
@@ -23,9 +23,73 @@ from nifty.operators.linear_operator import LinearOperator
class
EndomorphicOperator
(
LinearOperator
):
"""NIFTY class for endomorphic operators.
The NIFTY EndomorphicOperator class is a class derived from the
LinearOperator. Domain and target are the same in any EndomorphicOperator.
Prominent other specific operator subclasses, in NIFTy are
(e.g. DiagonalOperator, SmoothingOperator,
PropagatorOperator).
Parameters
----------
Attributes
----------
domain : NIFTy.space
The NIFTy.space in which the operator is defined.
target : NIFTy.space
The NIFTy.space in which the outcome of the operator lives.
As the Operator is endomorphic this is the same as its domain.
self_adjoint : boolean
Indicates whether the operator is self_adjoint or not
Raises
------
NotImplementedError
Raised if
* self_adjoint is not defined
Notes
-----
Examples
--------
See Also
--------
DiagonalOperator, SmoothingOperator,
PropagatorOperator
"""
# ---Overwritten properties and methods---
def
inverse_times
(
self
,
x
,
spaces
=
None
):
""" Applies the inverse-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if
self
.
self_adjoint
and
self
.
unitary
:
return
self
.
times
(
x
,
spaces
)
else
:
...
...
@@ -34,6 +98,29 @@ class EndomorphicOperator(LinearOperator):
spaces
=
spaces
)
def
adjoint_times
(
self
,
x
,
spaces
=
None
):
""" Applies the adjoint-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if
self
.
self_adjoint
:
return
self
.
times
(
x
,
spaces
)
else
:
...
...
@@ -42,6 +129,29 @@ class EndomorphicOperator(LinearOperator):
spaces
=
spaces
)
def
adjoint_inverse_times
(
self
,
x
,
spaces
=
None
):
""" Applies the adjoint-inverse-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if
self
.
self_adjoint
:
return
self
.
inverse_times
(
x
,
spaces
)
else
:
...
...
@@ -50,6 +160,29 @@ class EndomorphicOperator(LinearOperator):
spaces
=
spaces
)
def
inverse_adjoint_times
(
self
,
x
,
spaces
=
None
):
""" Applies the inverse-adjoint-Operator to a given Field.
Operator and Field have to live over the same domain.
Parameters
----------
x : NIFTY.Field
applies the Operator to the given Field
spaces : integer (default: None)
defines on which space of the given Field the Operator acts
**kwargs
Additional keyword arguments get passed to the used copy_empty
routine.
Returns
-------
out : NIFTy.Field
the processed Field living on the domain space
See Also
--------
"""
if
self
.
self_adjoint
:
return
self
.
inverse_times
(
x
,
spaces
)
else
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment