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
Neel Shah
NIFTy
Commits
d33f19a3
Commit
d33f19a3
authored
Jan 09, 2019
by
Martin Reinecke
Browse files
cosmetics
parent
77d54592
Changes
4
Hide whitespace changes
Inline
Side-by-side
test/test_model_gradients.py
View file @
d33f19a3
...
...
@@ -91,7 +91,8 @@ def testModelLibrary(space, seed):
# Tests amplitude model and coorelated field model
Npixdof
,
ceps_a
,
ceps_k
,
sm
,
sv
,
im
,
iv
=
4
,
0.5
,
2.
,
3.
,
1.5
,
1.75
,
1.3
np
.
random
.
seed
(
seed
)
model
=
ift
.
AmplitudeOperator
(
space
,
Npixdof
,
ceps_a
,
ceps_k
,
sm
,
sv
,
im
,
iv
)
model
=
ift
.
AmplitudeOperator
(
space
,
Npixdof
,
ceps_a
,
ceps_k
,
sm
,
sv
,
im
,
iv
)
S
=
ift
.
ScalingOperator
(
1.
,
model
.
domain
)
pos
=
S
.
draw_sample
()
ift
.
extra
.
check_value_gradient_consistency
(
model
,
pos
,
ntries
=
20
)
...
...
test/test_operators/__init__.py
View file @
d33f19a3
test/test_spaces/__init__.py
View file @
d33f19a3
test/test_spaces/test_lm_space.py
View file @
d33f19a3
...
...
@@ -53,7 +53,7 @@ def _k_length_array_helper(index_arr, lmax):
else
:
index_half
=
(
index_arr
+
lmax
+
1
)
//
2
m
=
np
.
ceil
(((
2
*
lmax
+
1
)
-
np
.
sqrt
((
2
*
lmax
+
1
)
**
2
-
8
*
m
=
np
.
ceil
(((
2
*
lmax
+
1
)
-
np
.
sqrt
((
2
*
lmax
+
1
)
**
2
-
8
*
(
index_half
-
lmax
)))
/
2
).
astype
(
int
)
return
index_half
-
m
*
(
2
*
lmax
+
1
-
m
)
//
2
...
...
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