Commit 7beb5b80 authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup

parent 338dbccc
......@@ -29,13 +29,7 @@ from ..operators.harmonic_operators import FFTOperator
from ..operators.scaling_operator import ScalingOperator
from ..operators.simple_linear_operators import FieldAdapter, Realizer
from ..sugar import makeOp
from .light_cone_operator import LightConeOperator
def _field_from_function(domain, func, absolute=False):
domain = DomainTuple.make(domain)
k_array = _make_coords(domain, absolute=absolute)
return Field.from_global_data(domain, func(k_array))
from .light_cone_operator import LightConeOperator, _field_from_function
def make_dynamic_operator(FFT, harmonic_padding, sm_s0, sm_x0, keys=['f', 'c'],
......
......@@ -28,6 +28,12 @@ from ..operators.linear_operator import LinearOperator
from ..operators.operator import Operator
def _field_from_function(domain, func, absolute=False):
domain = DomainTuple.make(domain)
k_array = _make_coords(domain, absolute=absolute)
return Field.from_global_data(domain, func(k_array))
def _make_coords(domain, absolute=False):
domain = DomainTuple.make(domain)
dim = len(domain.shape)
......
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