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
ift
NIFTy
Commits
e5f17f22
Commit
e5f17f22
authored
May 20, 2020
by
Philipp Arras
Browse files
Add tests
parent
c858374e
Pipeline
#75303
failed with stages
in 3 minutes and 8 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_operators/test_correlated_fields.py
View file @
e5f17f22
...
...
@@ -52,7 +52,11 @@ def testAmplitudesInvariants(sspace, N):
'freq'
,
dofdex
=
dofdex3
)
op
=
fa
.
finalize
()
samples
=
[
ift
.
from_random
(
op
.
domain
,
'normal'
)
for
_
in
range
(
100
)]
for
ampl
in
fa
.
normalized_amplitudes
:
ift
.
extra
.
check_jacobian_consistency
(
ampl
,
ift
.
from_random
(
ampl
.
domain
),
ntries
=
10
)
samples
=
[
ift
.
from_random
(
op
.
domain
)
for
_
in
range
(
100
)]
tot_flm
,
_
=
_stats
(
fa
.
total_fluctuation
,
samples
)
offset_amp_std
,
_
=
_stats
(
fa
.
amplitude_total_offset
,
samples
)
intergated_fluct_std0
,
_
=
_stats
(
fa
.
average_fluctuation
(
0
),
samples
)
...
...
test/test_operators/test_jacobian.py
View file @
e5f17f22
...
...
@@ -161,3 +161,10 @@ def testNormalization(h_space, specialbinbounds, logarithmic, nbin):
op
=
ift
.
library
.
correlated_fields
.
_Normalization
(
dom
)
pos
=
0.1
*
ift
.
from_random
(
op
.
domain
,
'normal'
)
ift
.
extra
.
check_jacobian_consistency
(
op
,
pos
,
ntries
=
10
)
@
pmp
(
'N'
,
[
1
,
3
])
def
testMomentMatchingJacobian
(
N
):
op
=
ift
.
library
.
correlated_fields
.
_LognormalMomentMatching
(
1
,
0.2
,
''
,
N
)
ift
.
extra
.
check_jacobian_consistency
(
op
,
ift
.
from_random
(
op
.
domain
),
ntries
=
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