Commit ed008f28 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

bug fixes

parent 0a9153e1
...@@ -28,7 +28,7 @@ __all__ = ['cos', 'sin', 'cosh', 'sinh', 'tan', 'tanh', 'arccos', 'arcsin', ...@@ -28,7 +28,7 @@ __all__ = ['cos', 'sin', 'cosh', 'sinh', 'tan', 'tanh', 'arccos', 'arcsin',
def _math_helper(x, function): def _math_helper(x, function):
if isinstance(x, Field): if isinstance(x, Field):
return Field(val=function(x.val)) return Field(domain=x.domain, val=function(x.val))
else: else:
return function(np.asarray(x)) return function(np.asarray(x))
...@@ -429,10 +429,10 @@ class Field(object): ...@@ -429,10 +429,10 @@ class Field(object):
result_list[1].val *= spec.imag result_list[1].val *= spec.imag
if real_signal: if real_signal:
for i in result_list: result_list=[Field(i.domain,self._hermitian_decomposition(
i.val = self._hermitian_decomposition( i.val,
i.val, preserve_gaussian_variance=True)[0])
preserve_gaussian_variance=True)[0] for i in result_list]
if real_power: if real_power:
result = result_list[0] result = result_list[0]
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