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
16a7d154
Commit
16a7d154
authored
Feb 05, 2018
by
Philipp Arras
Browse files
Plotting in wiener_filter_via_curvature
parent
8b2c28f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
demos/wiener_filter_via_curvature.py
View file @
16a7d154
...
...
@@ -65,7 +65,6 @@ if __name__ == "__main__":
domain
=
data_domain
,
random_type
=
'normal'
,
std
=
noise_amplitude
,
mean
=
0
)
data
=
noiseless_data
+
noise
# Wiener filter
j
=
R
.
adjoint_times
(
N
.
inverse_times
(
data
))
ctrl
=
ift
.
GradientNormController
(
...
...
@@ -79,10 +78,10 @@ if __name__ == "__main__":
sspace2
=
ift
.
RGSpace
(
shape
,
distances
=
L
/
N_pixels
/
nu
.
m
)
ift
.
plot
(
ift
.
Field
(
sspace2
,
ht
(
mock_signal
).
val
)
/
nu
.
K
,
name
=
"mock_signal.png"
)
#data = ift.dobj.to_global_data(data.val).reshape(sspace2.shape)
#data = ift.Field(sspace2, val=ift.dobj.from_global_data(data))
zmax
=
max
(
m_s
.
max
(),
ht
(
mock_signal
).
max
())
zmin
=
min
(
m_s
.
min
(),
ht
(
mock_signal
).
min
())
plotdict
=
{
"zmax"
:
zmax
/
nu
.
K
,
"zmin"
:
zmin
/
nu
.
K
}
ift
.
plot
(
ift
.
Field
(
sspace2
,
ht
(
mock_signal
).
val
)
/
nu
.
K
,
name
=
"mock_signal.png"
,
**
plotdict
)
ift
.
plot
(
ift
.
Field
(
sspace2
,
val
=
data
.
val
),
name
=
"data.png"
)
print
(
"msig"
,
np
.
min
(
ht
(
mock_signal
).
val
)
/
nu
.
K
,
np
.
max
(
ht
(
mock_signal
).
val
)
/
nu
.
K
)
print
(
"map"
,
np
.
min
(
m_s
.
val
)
/
nu
.
K
,
np
.
max
(
m_s
.
val
)
/
nu
.
K
)
ift
.
plot
(
ift
.
Field
(
sspace2
,
m_s
.
val
)
/
nu
.
K
,
name
=
"map.png"
)
ift
.
plot
(
ift
.
Field
(
sspace2
,
m_s
.
val
)
/
nu
.
K
,
name
=
"reconstruction.png"
,
**
plotdict
)
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