Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Neel Shah
NIFTy
Commits
f98e0cb5
Commit
f98e0cb5
authored
Oct 10, 2017
by
Jakob Knollmueller
Browse files
critical filter seems now to work for space volumes other than one as well
parent
de4beec2
Changes
2
Hide whitespace changes
Inline
Side-by-side
demos/critical_filtering.py
View file @
f98e0cb5
...
...
@@ -59,7 +59,7 @@ if __name__ == "__main__":
distribution_strategy
=
'not'
# Set up position space
dist
=
1
/
128.
*
1
0
dist
=
1
/
128.
*
0
.1
s_space
=
ift
.
RGSpace
([
128
,
128
],
distances
=
[
dist
,
dist
])
# s_space = ift.HPSpace(32)
...
...
@@ -93,7 +93,7 @@ if __name__ == "__main__":
# Add a harmonic transformation to the instrument
R
=
AdjointFFTResponse
(
fft
,
Instrument
)
noise
=
.
1
noise
=
1
00.
ndiag
=
ift
.
Field
(
s_space
,
noise
).
weight
(
1
)
N
=
ift
.
DiagonalOperator
(
s_space
,
ndiag
)
n
=
ift
.
Field
.
from_random
(
domain
=
s_space
,
...
...
nifty/sugar.py
View file @
f98e0cb5
...
...
@@ -78,7 +78,7 @@ def create_power_operator(domain, power_spectrum, dtype=None,
f
=
f
.
real
# f **= 2
diag
=
Field
(
domain
,
f
)
#
.weight()
diag
=
Field
(
domain
,
f
).
weight
()
return
DiagonalOperator
(
domain
,
diag
)
...
...
@@ -109,7 +109,7 @@ def generate_posterior_sample(mean, covariance):
R
=
covariance
.
R
N
=
covariance
.
N
power
=
sqrt
(
S
.
diagonal
())
power
=
sqrt
(
S
.
diagonal
()
.
weight
(
-
1
)
)
mock_signal
=
Field
.
from_random
(
random_type
=
"normal"
,
domain
=
S
.
domain
,
dtype
=
power
.
dtype
)
mock_signal
=
power
*
mock_signal
...
...
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