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
14d296bf
Commit
14d296bf
authored
May 14, 2017
by
Pumpe, Daniel (dpumpe)
Browse files
tests for SmoothingOperator
parent
3d4b0ce3
Pipeline
#12405
failed with stage
in 4 minutes and 56 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_smoothing_operator.py
View file @
14d296bf
...
...
@@ -9,8 +9,6 @@ from nifty import Field,\
PowerSpace
,
\
SmoothingOperator
from
test.common
import
generate_spaces
from
itertools
import
product
from
test.common
import
expand
...
...
@@ -60,22 +58,3 @@ class SmoothingOperator_Tests(unittest.TestCase):
tt1
=
rand1
.
dot
(
op
.
inverse_times
(
rand2
))
tt2
=
rand2
.
dot
(
op
.
inverse_adjoint_times
(
rand1
))
assert_approx_equal
(
tt1
,
tt2
)
@
expand
(
product
(
spaces
,
[
0.
,
.
5
,
5.
],
[
True
,
False
]))
def
test_inverse_adjoint_times
(
self
,
space
,
sigma
,
log_distances
):
op
=
SmoothingOperator
(
space
,
sigma
=
sigma
,
log_distances
=
log_distances
)
rand1
=
Field
.
from_random
(
'normal'
,
domain
=
space
)
tt1
=
op
.
times
(
op
.
inverse_times
(
rand1
))
assert_allclose
(
rand1
.
val
.
get_full_data
(),
tt1
.
val
.
get_full_data
(),
rtol
=
1e-4
)
@
expand
(
product
(
spaces
,
[
0.
,
.
5
,
5.
],
[
True
,
False
]))
def
test_times
(
self
,
space
,
sigma
,
log_distances
):
op
=
SmoothingOperator
(
space
,
sigma
=
sigma
,
log_distances
=
log_distances
)
rand1
=
Field
(
space
,
val
=
0.
)
rand1
.
val
[
0
]
=
1.
tt1
=
op
.
inverse_times
(
op
.
times
(
rand1
))
assert_allclose
(
rand1
.
val
.
get_full_data
(),
tt1
.
val
.
get_full_data
(),
rtol
=
1e-4
)
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