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
c231b324
Commit
c231b324
authored
Apr 06, 2018
by
Martin Reinecke
Browse files
add PoissonEnergy
parent
735b0dd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
nifty4/library/__init__.py
View file @
c231b324
...
...
@@ -3,4 +3,5 @@ from .wiener_filter_curvature import WienerFilterCurvature
from
.noise_energy
import
NoiseEnergy
from
.nonlinear_power_energy
import
NonlinearPowerEnergy
from
.nonlinear_wiener_filter_energy
import
NonlinearWienerFilterEnergy
from
.poisson_energy
import
PoissonEnergy
from
.nonlinearities
import
Exponential
,
Linear
,
Tanh
,
PositiveTanh
nifty4/library/nonlinear_power_energy.py
View file @
c231b324
...
...
@@ -24,11 +24,11 @@ from ..utilities import memo
def
_LinearizedPowerResponse
(
Instrument
,
nonlinearity
,
ht
,
Distributor
,
tau
,
xi
):
power
=
exp
(
0.5
*
tau
)
position
=
ht
(
Distributor
(
power
)
*
xi
)
linearization
=
nonlinearity
.
derivative
(
position
)
return
0.5
*
Instrument
*
linearization
*
ht
*
xi
*
Distributor
*
power
xi
):
power
=
exp
(
0.5
*
tau
)
position
=
ht
(
Distributor
(
power
)
*
xi
)
linearization
=
nonlinearity
.
derivative
(
position
)
return
0.5
*
Instrument
*
linearization
*
ht
*
xi
*
Distributor
*
power
class
NonlinearPowerEnergy
(
Energy
):
...
...
nifty4/library/wiener_filter_energy.py
View file @
c231b324
...
...
@@ -20,7 +20,7 @@ from ..minimization.quadratic_energy import QuadraticEnergy
from
.wiener_filter_curvature
import
WienerFilterCurvature
def
WienerFilterEnergy
(
position
,
d
,
R
,
N
,
S
,
inverter
):
def
WienerFilterEnergy
(
position
,
d
,
R
,
N
,
S
,
inverter
=
None
):
"""The Energy for the Wiener filter.
It covers the case of linear measurement with
...
...
@@ -39,8 +39,9 @@ def WienerFilterEnergy(position, d, R, N, S, inverter):
The noise covariance in data space.
S : EndomorphicOperator
The prior signal covariance in harmonic space.
inverter : Minimizer
inverter : Minimizer
, optional
the minimization strategy to use for operator inversion
If None, the energy object will not support curvature computation.
"""
op
=
WienerFilterCurvature
(
R
,
N
,
S
,
inverter
)
vec
=
R
.
adjoint_times
(
N
.
inverse_times
(
d
))
...
...
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