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

Merge branch 'NIFTy_5' into more_flexibility

parents 18aaf0d1 f0bfdce8
......@@ -289,6 +289,10 @@ class SHTOperator(LinearOperator):
else:
self.sjob.set_Healpix_geometry(target.nside)
def __reduce__(self):
return (_unpickleSHTOperator,
(self._domain, self._target[self._space], self._space))
def apply(self, x, mode):
self._check_input(x, mode)
if utilities.iscomplextype(x.dtype):
......@@ -337,6 +341,10 @@ class SHTOperator(LinearOperator):
return Field(tdom, dobj.ensure_default_distributed(odat))
def _unpickleSHTOperator(*args):
return SHTOperator(*args)
class HarmonicTransformOperator(LinearOperator):
"""Transforms between a harmonic domain and a position domain counterpart.
......
......@@ -69,6 +69,6 @@ class OperatorAdapter(LinearOperator):
def __repr__(self):
from ..utilities import indent
mode = ["adjoint", "inverse", "adjoint inverse"][self._trafo]
mode = ["adjoint", "inverse", "adjoint inverse"][self._trafo-1]
res = "OperatorAdapter: {}\n".format(mode)
return res + indent(self._op.__repr__())
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