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
1d10be46
Commit
1d10be46
authored
Jul 18, 2017
by
Theo Steininger
Browse files
distribution_strategy can now be chosen explicitly in power_synthesize.
parent
3030e93d
Pipeline
#15055
passed with stages
in 12 minutes and 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty/field.py
View file @
1d10be46
...
...
@@ -466,7 +466,7 @@ class Field(Loggable, Versionable, object):
return
result_obj
def
power_synthesize
(
self
,
spaces
=
None
,
real_power
=
True
,
real_signal
=
True
,
mean
=
None
,
std
=
None
):
mean
=
None
,
std
=
None
,
distribution_strategy
=
None
):
""" Yields a sampled field with `self`**2 as its power spectrum.
This method draws a Gaussian random field in the harmonic partner
...
...
@@ -541,13 +541,16 @@ class Field(Loggable, Versionable, object):
else
:
result_list
=
[
None
,
None
]
if
distribution_strategy
is
None
:
distribution_strategy
=
gc
[
'default_distribution_strategy'
]
result_list
=
[
self
.
__class__
.
from_random
(
'normal'
,
mean
=
mean
,
std
=
std
,
domain
=
result_domain
,
dtype
=
np
.
complex
,
distribution_strategy
=
self
.
distribution_strategy
)
distribution_strategy
=
distribution_strategy
)
for
x
in
result_list
]
# from now on extract the values from the random fields for further
...
...
Philipp Arras
@parras
mentioned in commit
81cab5d6
·
Feb 01, 2018
mentioned in commit
81cab5d6
mentioned in commit 81cab5d61991f51f3de0426bd3af33b9e01dd561
Toggle commit list
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