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
e1f8b0a9
Commit
e1f8b0a9
authored
Sep 13, 2017
by
Martin Reinecke
Browse files
tweaks
parent
3e11c5fb
Changes
3
Hide whitespace changes
Inline
Side-by-side
demos/paper_demos/cartesian_wiener_filter.py
View file @
e1f8b0a9
...
...
@@ -101,7 +101,7 @@ if __name__ == "__main__":
# Probing the variance
class
Proby
(
ift
.
DiagonalProberMixin
,
ift
.
Prober
):
pass
proby
=
Proby
((
signal_space_1
,
signal_space_2
),
probe_count
=
2
,
ncpu
=
2
)
proby
=
Proby
((
signal_space_1
,
signal_space_2
),
probe_count
=
2
,
ncpu
=
1
)
proby
(
lambda
z
:
fft
(
wiener_curvature
.
inverse_times
(
fft
.
inverse_times
(
z
))))
# sm = SmoothingOperator(signal_space, sigma=0.02)
# variance = sm(proby.diagonal.weight(-1))
...
...
demos/paper_demos/wiener_filter.py
View file @
e1f8b0a9
...
...
@@ -52,7 +52,7 @@ if __name__ == "__main__":
# Probing the uncertainty |\label{code:wf_uncertainty_probing}|
class
Proby
(
ift
.
DiagonalProberMixin
,
ift
.
Prober
):
pass
proby
=
Proby
(
signal_space
,
probe_count
=
800
,
ncpu
=
1
)
proby
=
Proby
(
signal_space
,
probe_count
=
1
,
ncpu
=
1
)
proby
(
lambda
z
:
fft
(
wiener_curvature
.
inverse_times
(
fft
.
inverse_times
(
z
))))
#|\label{code:wf_variance_fft_wrap}|
sm
=
ift
.
FFTSmoothingOperator
(
signal_space
,
sigma
=
0.03
)
...
...
@@ -62,3 +62,5 @@ if __name__ == "__main__":
ift
.
plotting
.
plot
(
variance
,
name
=
"uncertainty.pdf"
,
xlabel
=
'Pixel index'
,
ylabel
=
'Pixel index'
)
ift
.
plotting
.
plot
(
mock_signal
,
name
=
"mock_signal.pdf"
,
xlabel
=
'Pixel index'
,
ylabel
=
'Pixel index'
)
ift
.
plotting
.
plot
(
ift
.
Field
(
signal_space
,
val
=
data
.
val
),
name
=
"data.pdf"
,
xlabel
=
'Pixel index'
,
ylabel
=
'Pixel index'
)
ift
.
plotting
.
plot
(
m
,
name
=
"map.pdf"
,
xlabel
=
'Pixel index'
,
ylabel
=
'Pixel index'
)
nifty2go/probing/prober/prober.py
View file @
e1f8b0a9
...
...
@@ -107,7 +107,7 @@ class Prober(object):
""" a random-probe generator """
f
=
Field
.
from_random
(
random_type
=
self
.
random_type
,
domain
=
self
.
domain
,
dtype
=
self
.
probe_dtype
)
dtype
=
self
.
probe_dtype
.
type
)
uid
=
self
.
_uid_counter
self
.
_uid_counter
+=
1
return
(
uid
,
f
)
...
...
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