Skip to content
GitLab
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
5b0e1b78
Commit
5b0e1b78
authored
Jul 09, 2018
by
Martin Reinecke
Browse files
Merge branch 'work_on_fields' into 'NIFTy_5'
cosmetics See merge request ift/nifty-dev!42
parents
1f9e0de6
7d431ac9
Changes
2
Hide whitespace changes
Inline
Side-by-side
nifty5/library/correlated_fields.py
View file @
5b0e1b78
...
...
@@ -29,6 +29,7 @@ from ..operators.domain_distributor import DomainDistributor
from
..operators.harmonic_transform_operator
\
import
HarmonicTransformOperator
def
make_correlated_field
(
s_space
,
amplitude_model
):
'''
Method for construction of correlated fields
...
...
@@ -84,7 +85,8 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy,
a
=
a_spatial
*
a_energy
A
=
pd
(
a
)
position
=
MultiField
.
from_dict
({
'xi'
:
Field
.
from_random
(
'normal'
,
h_space
)})
position
=
MultiField
.
from_dict
(
{
'xi'
:
Field
.
from_random
(
'normal'
,
h_space
)})
xi
=
Variable
(
position
)[
'xi'
]
correlated_field_h
=
A
*
xi
correlated_field
=
ht
(
correlated_field_h
)
...
...
nifty5/multi/multi_field.py
View file @
5b0e1b78
...
...
@@ -132,8 +132,8 @@ class MultiField(object):
@
staticmethod
def
from_global_data
(
domain
,
arr
,
sum_up
=
False
):
return
MultiField
(
domain
,
tuple
(
Field
.
from_global_data
(
domain
[
key
],
arr
[
key
],
sum_up
)
return
MultiField
(
domain
,
tuple
(
Field
.
from_global_data
(
domain
[
key
],
arr
[
key
],
sum_up
)
for
key
in
domain
.
keys
()))
def
norm
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment