Commit 5b0e1b78 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'work_on_fields' into 'NIFTy_5'


See merge request ift/nifty-dev!42
parents 1f9e0de6 7d431ac9
......@@ -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)
......@@ -132,8 +132,8 @@ class MultiField(object):
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):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment