diff --git a/nifty4/operators/chain_operator.py b/nifty4/operators/chain_operator.py index c9f054bab3a383a016f2446bb9aa27716f1c4705..89cf441426ff3b694ca5d0145ae87aae3a67de84 100644 --- a/nifty4/operators/chain_operator.py +++ b/nifty4/operators/chain_operator.py @@ -99,6 +99,14 @@ class ChainOperator(LinearOperator): def target(self): return self._ops[0].target + @property + def inverse(self): + return self.make([op.inverse for op in reversed(self._ops)]) + + @property + def adjoint(self): + return self.make([op.adjoint for op in reversed(self._ops)]) + @property def capability(self): return self._capability diff --git a/nifty4/operators/scaling_operator.py b/nifty4/operators/scaling_operator.py index 31819c60054b790c9fcd48b4f8057e5932d945c0..8c870a43d8f8cf19db093a22fa85296e7e9eff59 100644 --- a/nifty4/operators/scaling_operator.py +++ b/nifty4/operators/scaling_operator.py @@ -81,8 +81,7 @@ class ScalingOperator(EndomorphicOperator): def capability(self): if self._factor == 0.: return self.TIMES | self.ADJOINT_TIMES - return (self.TIMES | self.ADJOINT_TIMES | - self.INVERSE_TIMES | self.ADJOINT_INVERSE_TIMES) + return self._all_ops def draw_sample(self): return Field.from_random(random_type="normal", diff --git a/nifty4/operators/sum_operator.py b/nifty4/operators/sum_operator.py index 7a9f71b29c0b6d5f67f3758f539a3f406bde4162..ab2cdbf786f82f949a454399d3b21711bfccfc47 100644 --- a/nifty4/operators/sum_operator.py +++ b/nifty4/operators/sum_operator.py @@ -122,6 +122,10 @@ class SumOperator(LinearOperator): def target(self): return self._ops[0].target + @property + def adjoint(self): + return self.make([op.adjoint for op in self._ops], self._neg) + @property def capability(self): return self._capability