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

Merge branch 'work_on_fields' into 'NIFTy_5'

cosmetics

See merge request ift/nifty-dev!42
parents 1f9e0de6 7d431ac9
...@@ -29,6 +29,7 @@ from ..operators.domain_distributor import DomainDistributor ...@@ -29,6 +29,7 @@ from ..operators.domain_distributor import DomainDistributor
from ..operators.harmonic_transform_operator \ from ..operators.harmonic_transform_operator \
import HarmonicTransformOperator import HarmonicTransformOperator
def make_correlated_field(s_space, amplitude_model): def make_correlated_field(s_space, amplitude_model):
''' '''
Method for construction of correlated fields Method for construction of correlated fields
...@@ -84,7 +85,8 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy, ...@@ -84,7 +85,8 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy,
a = a_spatial*a_energy a = a_spatial*a_energy
A = pd(a) 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'] xi = Variable(position)['xi']
correlated_field_h = A*xi correlated_field_h = A*xi
correlated_field = ht(correlated_field_h) correlated_field = ht(correlated_field_h)
......
...@@ -132,8 +132,8 @@ class MultiField(object): ...@@ -132,8 +132,8 @@ class MultiField(object):
@staticmethod @staticmethod
def from_global_data(domain, arr, sum_up=False): def from_global_data(domain, arr, sum_up=False):
return MultiField(domain, tuple(Field.from_global_data(domain[key], return MultiField(
arr[key], sum_up) domain, tuple(Field.from_global_data(domain[key], arr[key], sum_up)
for key in domain.keys())) for key in domain.keys()))
def norm(self): def norm(self):
......
Markdown is supported
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