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
75d8fd5b
Commit
75d8fd5b
authored
Feb 15, 2018
by
Martin Reinecke
Browse files
cosmetics
parent
cb30efb6
Pipeline
#24973
passed with stage
in 6 minutes and 44 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/wiener_filter_via_hamiltonian.py
View file @
75d8fd5b
...
...
@@ -70,7 +70,7 @@ if __name__ == "__main__":
# Generate plots
zmax
=
max
(
ht
(
sh
).
max
(),
ht
(
m
).
max
())
zmin
=
min
(
ht
(
sh
).
min
(),
ht
(
m
).
min
())
plotdict
=
{
"zmax"
:
zmax
,
"zmin"
:
zmin
,
"colormap"
:
"Planck-like"
}
plotdict
=
{
"zmax"
:
zmax
,
"zmin"
:
zmin
,
"colormap"
:
"Planck-like"
}
plotdict2
=
{
"colormap"
:
"Planck-like"
}
ift
.
plot
(
ht
(
sh
),
name
=
"mock_signal.png"
,
**
plotdict
)
ift
.
plot
(
ht
(
m
),
name
=
"reconstruction.png"
,
**
plotdict
)
...
...
nifty4/library/nonlinear_power_curvature.py
View file @
75d8fd5b
...
...
@@ -20,12 +20,12 @@ from ..operators.inversion_enabler import InversionEnabler
from
.response_operators
import
LinearizedPowerResponse
def
NonlinearPowerCurvature
(
tau
,
ht
,
Instrument
,
nonlinearity
,
Projec
tion
,
N
,
def
NonlinearPowerCurvature
(
tau
,
ht
,
Instrument
,
nonlinearity
,
Distribu
tion
,
N
,
T
,
xi_sample_list
,
inverter
):
result
=
None
for
xi_sample
in
xi_sample_list
:
LinearizedResponse
=
LinearizedPowerResponse
(
Instrument
,
nonlinearity
,
ht
,
Projec
tion
,
tau
,
xi_sample
)
Instrument
,
nonlinearity
,
ht
,
Distribu
tion
,
tau
,
xi_sample
)
op
=
LinearizedResponse
.
adjoint
*
N
.
inverse
*
LinearizedResponse
result
=
op
if
result
is
None
else
result
+
op
result
=
result
*
(
1.
/
len
(
xi_sample_list
))
+
T
...
...
nifty4/library/response_operators.py
View file @
75d8fd5b
...
...
@@ -24,7 +24,7 @@ def LinearizedSignalResponse(Instrument, nonlinearity, ht, power, m):
def
LinearizedPowerResponse
(
Instrument
,
nonlinearity
,
ht
,
Distribution
,
tau
,
xi
):
xi
):
power
=
exp
(
0.5
*
tau
)
position
=
ht
(
Distribution
(
power
)
*
xi
)
linearization
=
nonlinearity
.
derivative
(
position
)
...
...
Write
Preview
Supports
Markdown
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