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
1fc0eeed
Commit
1fc0eeed
authored
Nov 28, 2017
by
Martin Reinecke
Browse files
Merge branch 'nifty2go_fix_CF' into 'nifty2go'
fix critical filter See merge request ift/NIFTy!205
parents
8efbc327
9076afb2
Pipeline
#22287
passed with stage
in 4 minutes and 48 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/critical_filtering.py
View file @
1fc0eeed
...
...
@@ -104,16 +104,12 @@ if __name__ == "__main__":
flat_power
=
ift
.
Field
.
full
(
p_space
,
1e-8
)
m0
=
ift
.
power_synthesize
(
flat_power
,
real_signal
=
True
)
def
ps0
(
k
):
return
(
1.
/
(
1.
+
k
)
**
2
)
t0
=
ift
.
Field
(
p_space
,
val
=
ift
.
dobj
.
from_global_data
(
np
.
log
(
1.
/
(
1
+
p_space
.
k_lengths
)
**
2
)
))
val
=
ift
.
dobj
.
from_global_data
(
-
7.
))
for
i
in
range
(
500
):
# FIXME: Do not use ps0 for the inference! This is cheating!
# My critical filter version breaks, if I put power_spectrum=t0.
S0
=
ift
.
create_power_operator
(
h_space
,
power_spectrum
=
ps0
)
S0
=
ift
.
create_power_operator
(
h_space
,
power_spectrum
=
ift
.
exp
(
t0
))
# Initialize non-linear Wiener Filter energy
ICI
=
ift
.
GradientNormController
(
verbose
=
False
,
name
=
"ICI"
,
...
...
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