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
fc4d3ef9
Commit
fc4d3ef9
authored
Feb 01, 2018
by
Martin Reinecke
Browse files
remove broken test
parent
321a34c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/test_field.py
View file @
fc4d3ef9
...
...
@@ -128,51 +128,6 @@ class Test_Functionality(unittest.TestCase):
fp2
.
val
.
get_full_data
(),
rtol
=
0.2
)
@
expand
(
product
([
RGSpace
((
8
,),
harmonic
=
True
,
zerocenter
=
False
),
RGSpace
((
8
,
8
),
harmonic
=
True
,
distances
=
0.123
,
zerocenter
=
True
)],
[
RGSpace
((
8
,),
harmonic
=
True
,
zerocenter
=
False
),
LMSpace
(
12
)],
[
'real'
,
'complex'
]))
def
test_DiagonalOperator_power_analyze
(
self
,
space1
,
space2
,
base
):
nifty_configuration
[
'harmonic_rg_base'
]
=
base
d2o
.
random
.
seed
(
11
)
p1
=
PowerSpace
(
space1
)
spec1
=
lambda
k
:
42
/
(
1
+
k
)
**
2
fp1
=
Field
(
p1
,
val
=
spec1
)
p2
=
PowerSpace
(
space2
)
spec2
=
lambda
k
:
42
/
(
1
+
k
)
**
3
fp2
=
Field
(
p2
,
val
=
spec2
)
S_1
=
create_power_operator
(
space1
,
sqrt
(
fp1
))
S_2
=
create_power_operator
(
space2
,
sqrt
(
fp2
))
S_1
.
set_diagonal
(
S_1
.
diagonal
().
weight
(
-
1
),
bare
=
False
)
S_2
.
set_diagonal
(
S_2
.
diagonal
().
weight
(
-
1
),
bare
=
False
)
samples
=
2000
ps1
=
0.
ps2
=
0.
for
ii
in
range
(
samples
):
rand_k
=
Field
.
from_random
(
'normal'
,
domain
=
(
space1
,
space2
))
sk
=
S_1
.
times
(
S_2
.
times
(
rand_k
,
spaces
=
1
),
spaces
=
0
)
sp
=
sk
.
power_analyze
(
spaces
=
(
0
,
1
),
keep_phase_information
=
False
)
ps1
+=
sp
.
sum
(
spaces
=
1
)
/
fp2
.
sum
()
ps2
+=
sp
.
sum
(
spaces
=
0
)
/
fp1
.
sum
()
assert_allclose
(
ps1
.
val
.
get_full_data
()
/
samples
,
fp1
.
val
.
get_full_data
(),
rtol
=
0.2
)
assert_allclose
(
ps2
.
val
.
get_full_data
()
/
samples
,
fp2
.
val
.
get_full_data
(),
rtol
=
0.2
)
def
test_vdot
(
self
):
s
=
RGSpace
((
10
,))
...
...
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