Skip to content
GitLab
Menu
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
c83661d0
Commit
c83661d0
authored
Dec 20, 2017
by
Martin Reinecke
Browse files
more convenient handling of 'unitary' property
parent
f1f2506c
Pipeline
#23092
passed with stage
in 4 minutes and 44 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/library/log_normal_wiener_filter_curvature.py
View file @
c83661d0
...
...
@@ -38,10 +38,6 @@ class LogNormalWienerFilterCurvature(InversionEnabler, EndomorphicOperator):
def
self_adjoint
(
self
):
return
True
@
property
def
unitary
(
self
):
return
False
def
_times
(
self
,
x
):
part1
=
self
.
S
.
inverse_times
(
x
)
part3
=
self
.
_fft
.
adjoint_times
(
self
.
_expp_sspace
*
self
.
_fft
(
x
))
...
...
nifty/library/nonlinear_power_curvature.py
View file @
c83661d0
...
...
@@ -25,10 +25,6 @@ class NonlinearPowerCurvature(InversionEnabler, EndomorphicOperator):
def
self_adjoint
(
self
):
return
True
@
property
def
unitary
(
self
):
return
False
def
_times
(
self
,
x
):
result
=
None
for
sample
in
self
.
sample_list
:
...
...
nifty/library/response_operators.py
View file @
c83661d0
...
...
@@ -31,10 +31,6 @@ class LinearizedSignalResponse(LinearOperator):
def
target
(
self
):
return
self
.
Instrument
.
target
@
property
def
unitary
(
self
):
return
False
class
LinearizedPowerResponse
(
LinearOperator
):
def
__init__
(
self
,
Instrument
,
nonlinearity
,
FFT
,
Projection
,
t
,
m
):
...
...
@@ -74,7 +70,3 @@ class LinearizedPowerResponse(LinearOperator):
@
property
def
target
(
self
):
return
self
.
Instrument
.
target
@
property
def
unitary
(
self
):
return
False
nifty/library/wiener_filter_curvature.py
View file @
c83661d0
...
...
@@ -36,10 +36,6 @@ class WienerFilterCurvature(InversionEnabler, EndomorphicOperator):
def
self_adjoint
(
self
):
return
True
@
property
def
unitary
(
self
):
return
False
def
_times
(
self
,
x
):
res
=
self
.
R
.
adjoint_times
(
self
.
N
.
inverse_times
(
self
.
R
(
x
)))
res
+=
self
.
S
.
inverse_times
(
x
)
...
...
nifty/operators/composed_operator.py
View file @
c83661d0
...
...
@@ -37,8 +37,6 @@ class ComposedOperator(LinearOperator):
The NIFTy.space in which the operator is defined.
target : DomainTuple
The NIFTy.space in which the outcome of the operator lives
unitary : boolean
Indicates whether the Operator is unitary or not.
"""
def
__init__
(
self
,
operators
):
...
...
@@ -63,10 +61,6 @@ class ComposedOperator(LinearOperator):
def
target
(
self
):
return
self
.
_operator_store
[
-
1
].
target
@
property
def
unitary
(
self
):
return
False
def
_times
(
self
,
x
):
return
self
.
_times_helper
(
x
,
func
=
'times'
)
...
...
nifty/operators/direct_smoothing_operator.py
View file @
c83661d0
...
...
@@ -42,10 +42,6 @@ class DirectSmoothingOperator(EndomorphicOperator):
def
self_adjoint
(
self
):
return
True
@
property
def
unitary
(
self
):
return
False
def
_precompute
(
self
,
x
):
""" Does precomputations for Gaussian smoothing on a 1D irregular grid.
...
...
nifty/operators/dof_projection_operator.py
View file @
c83661d0
...
...
@@ -95,7 +95,3 @@ class DOFProjectionOperator(LinearOperator):
@
property
def
target
(
self
):
return
self
.
_target
@
property
def
unitary
(
self
):
return
False
nifty/operators/endomorphic_operator.py
View file @
c83661d0
...
...
@@ -34,8 +34,6 @@ class EndomorphicOperator(LinearOperator):
target : DomainTuple
The domain in which the outcome of the operator lives. As the Operator
is endomorphic this is the same as its domain.
unitary : boolean
Indicates whether the Operator is unitary or not.
self_adjoint : boolean
Indicates whether the operator is self_adjoint or not.
"""
...
...
nifty/operators/fft_smoothing_operator.py
View file @
c83661d0
...
...
@@ -35,7 +35,3 @@ class FFTSmoothingOperator(EndomorphicOperator):
@
property
def
self_adjoint
(
self
):
return
True
@
property
def
unitary
(
self
):
return
False
nifty/operators/laplace_operator.py
View file @
c83661d0
...
...
@@ -70,10 +70,6 @@ class LaplaceOperator(EndomorphicOperator):
def
domain
(
self
):
return
self
.
_domain
@
property
def
unitary
(
self
):
return
False
@
property
def
self_adjoint
(
self
):
return
False
...
...
nifty/operators/linear_operator.py
View file @
c83661d0
...
...
@@ -64,15 +64,15 @@ class LinearOperator(with_metaclass(
"""
raise
NotImplementedError
@
abc
.
abstract
property
@
property
def
unitary
(
self
):
"""
unitary : boolean
States whether the Operator is unitary or not.
Every O
perator w
hich inherits from the abstract LinearOperator
base class must have this attribute
.
Since the majority of o
perator
s
w
ill not be unitary, this property
returns False, unless it is overridden in a subclass
.
"""
r
aise
NotImplementedError
r
eturn
False
def
__call__
(
self
,
x
):
return
self
.
times
(
x
)
...
...
nifty/operators/response_operator.py
View file @
c83661d0
...
...
@@ -33,8 +33,6 @@ class ResponseOperator(LinearOperator):
The domain on which the Operator's input Field lives.
target : DomainTuple
The domain in which the outcome of the operator lives.
unitary : boolean
Indicates whether the Operator is unitary or not.
Raises
------
...
...
@@ -78,10 +76,6 @@ class ResponseOperator(LinearOperator):
def
target
(
self
):
return
self
.
_target
@
property
def
unitary
(
self
):
return
False
def
_times
(
self
,
x
):
res
=
self
.
_composed_kernel
.
times
(
x
)
res
=
self
.
_composed_exposure
.
times
(
res
)
...
...
nifty/operators/smoothness_operator.py
View file @
c83661d0
...
...
@@ -38,10 +38,6 @@ class SmoothnessOperator(EndomorphicOperator):
def
domain
(
self
):
return
self
.
_laplace
.
_domain
@
property
def
unitary
(
self
):
return
False
@
property
def
self_adjoint
(
self
):
return
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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