Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Commits
2c5d7fd2
Commit
2c5d7fd2
authored
5 years ago
by
Philipp Arras
Browse files
Options
Downloads
Patches
Plain Diff
Add non-vanishing zeromode mean to tests
parent
8b7d2857
No related branches found
No related tags found
1 merge request
!415
CorrelatedFieldMaker: offset parametrization in one place
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test_operators/test_correlated_fields.py
+3
-2
3 additions, 2 deletions
test/test_operators/test_correlated_fields.py
with
3 additions
and
2 deletions
test/test_operators/test_correlated_fields.py
+
3
−
2
View file @
2c5d7fd2
...
@@ -32,7 +32,8 @@ import nifty6 as ift
...
@@ -32,7 +32,8 @@ import nifty6 as ift
@pytest.mark.parametrize
(
'
Astds
'
,
[[
1.
,
3.
],
[
0.2
,
1.4
]])
@pytest.mark.parametrize
(
'
Astds
'
,
[[
1.
,
3.
],
[
0.2
,
1.4
]])
@pytest.mark.parametrize
(
'
offset_std_mean
'
,
[
1.
,
10.
])
@pytest.mark.parametrize
(
'
offset_std_mean
'
,
[
1.
,
10.
])
@pytest.mark.parametrize
(
'
N
'
,
[
0
,
2
])
@pytest.mark.parametrize
(
'
N
'
,
[
0
,
2
])
def
testAmplitudesConsistency
(
rseed
,
sspace
,
Astds
,
offset_std_mean
,
N
):
@pytest.mark.parametrize
(
'
zm_mean
'
,
[
0
,
1.
])
def
testAmplitudesConsistency
(
rseed
,
sspace
,
Astds
,
offset_std_mean
,
N
,
zm_mean
):
def
stats
(
op
,
samples
):
def
stats
(
op
,
samples
):
sc
=
ift
.
StatCalculator
()
sc
=
ift
.
StatCalculator
()
for
s
in
samples
:
for
s
in
samples
:
...
@@ -50,7 +51,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std_mean, N):
...
@@ -50,7 +51,7 @@ def testAmplitudesConsistency(rseed, sspace, Astds, offset_std_mean, N):
else
:
else
:
dofdex1
,
dofdex2
,
dofdex3
=
None
,
None
,
None
dofdex1
,
dofdex2
,
dofdex3
=
None
,
None
,
None
fa
=
ift
.
CorrelatedFieldMaker
.
make
(
0.
,
offset_std_mean
,
1E-8
,
''
,
N
,
dofdex1
)
fa
=
ift
.
CorrelatedFieldMaker
.
make
(
zm_mean
,
offset_std_mean
,
1E-8
,
''
,
N
,
dofdex1
)
fa
.
add_fluctuations
(
sspace
,
Astds
[
0
],
1E-8
,
1.1
,
2.
,
2.1
,
.
5
,
-
2
,
1.
,
'
spatial
'
,
dofdex
=
dofdex2
)
fa
.
add_fluctuations
(
sspace
,
Astds
[
0
],
1E-8
,
1.1
,
2.
,
2.1
,
.
5
,
-
2
,
1.
,
'
spatial
'
,
dofdex
=
dofdex2
)
fa
.
add_fluctuations
(
fsspace
,
Astds
[
1
],
1E-8
,
3.1
,
1.
,
.
5
,
.
1
,
-
4
,
1.
,
'
freq
'
,
dofdex
=
dofdex3
)
fa
.
add_fluctuations
(
fsspace
,
Astds
[
1
],
1E-8
,
3.1
,
1.
,
.
5
,
.
1
,
-
4
,
1.
,
'
freq
'
,
dofdex
=
dofdex3
)
op
=
fa
.
finalize
()
op
=
fa
.
finalize
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment