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
324d790b
Commit
324d790b
authored
Jan 25, 2018
by
Philipp Arras
Browse files
Add units to NonlinearFilterEnergy
parent
866b4ab0
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty4/library/nonlinear_wiener_filter_energy.py
View file @
324d790b
...
...
@@ -23,7 +23,7 @@ from .response_operators import LinearizedSignalResponse
class
NonlinearWienerFilterEnergy
(
Energy
):
def
__init__
(
self
,
position
,
d
,
Instrument
,
nonlinearity
,
FFT
,
power
,
N
,
S
,
def
__init__
(
self
,
position
,
d
,
Instrument
,
nonlinearity
,
FFT
,
power
,
N
,
S
,
sunit
,
inverter
=
None
):
super
(
NonlinearWienerFilterEnergy
,
self
).
__init__
(
position
=
position
)
self
.
d
=
d
...
...
@@ -31,12 +31,11 @@ class NonlinearWienerFilterEnergy(Energy):
self
.
nonlinearity
=
nonlinearity
self
.
FFT
=
FFT
self
.
power
=
power
position_map
=
FFT
.
inverse_times
(
self
.
power
*
self
.
position
)
self
.
LinearizedResponse
=
\
LinearizedSignalResponse
(
Instrument
,
nonlinearity
,
FFT
,
power
,
self
.
position
)
position_map
=
FFT
.
adjoint_times
(
self
.
power
*
self
.
position
)
residual
=
d
-
Instrument
(
nonlinearity
(
position_map
))
position_map
)
residual
=
d
-
Instrument
(
sunit
*
nonlinearity
(
position_map
))
self
.
N
=
N
self
.
S
=
S
self
.
inverter
=
inverter
...
...
nifty4/library/response_operators.py
View file @
324d790b
...
...
@@ -19,9 +19,8 @@
from
..field
import
exp
def
LinearizedSignalResponse
(
Instrument
,
nonlinearity
,
FFT
,
power
,
m
):
position
=
FFT
.
adjoint_times
(
power
*
m
)
return
(
Instrument
*
nonlinearity
.
derivative
(
position
)
*
def
LinearizedSignalResponse
(
Instrument
,
nonlinearity
,
FFT
,
power
,
s
):
return
(
Instrument
*
nonlinearity
.
derivative
(
s
)
*
FFT
.
adjoint
*
power
)
def
LinearizedPowerResponse
(
Instrument
,
nonlinearity
,
FFT
,
Projection
,
t
,
m
):
...
...
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