diff --git a/nifty/operators/composed_operator/composed_operator.py b/nifty/operators/composed_operator/composed_operator.py index 31c38ca72fa4b270427423268ef930df55bfd138..4e1ef497f7608cc6410c78b6b2c023b2a71684bb 100644 --- a/nifty/operators/composed_operator/composed_operator.py +++ b/nifty/operators/composed_operator/composed_operator.py @@ -54,10 +54,6 @@ class ComposedOperator(LinearOperator): self._target += op.target return self._target - @property - def implemented(self): - return True - @property def unitary(self): return False diff --git a/nifty/operators/diagonal_operator/diagonal_operator.py b/nifty/operators/diagonal_operator/diagonal_operator.py index a7d678ac1aa28b9181fce0ab439f866faf4ca1b5..264a4e1d5104f2ef2d397ff7729c45ff1166e191 100644 --- a/nifty/operators/diagonal_operator/diagonal_operator.py +++ b/nifty/operators/diagonal_operator/diagonal_operator.py @@ -30,13 +30,11 @@ class DiagonalOperator(EndomorphicOperator): # ---Overwritten properties and methods--- - def __init__(self, domain=(), implemented=True, + def __init__(self, domain=(), diagonal=None, bare=False, copy=True, distribution_strategy=None): self._domain = self._parse_domain(domain) - self._implemented = bool(implemented) - if distribution_strategy is None: if isinstance(diagonal, distributed_data_object): distribution_strategy = diagonal.distribution_strategy @@ -100,10 +98,6 @@ class DiagonalOperator(EndomorphicOperator): def domain(self): return self._domain - @property - def implemented(self): - return self._implemented - @property def self_adjoint(self): if self._self_adjoint is None: @@ -144,16 +138,12 @@ class DiagonalOperator(EndomorphicOperator): distribution_strategy=self.distribution_strategy, copy=copy) - # weight if the given values were `bare` and `implemented` is True + # weight if the given values were `bare` is True # do inverse weightening if the other way around - if bare and self.implemented: + if bare: # If `copy` is True, we won't change external data by weightening # Otherwise, inplace weightening would change the external field f.weight(inplace=copy) - elif not bare and not self.implemented: - # If `copy` is True, we won't change external data by weightening - # Otherwise, inplace weightening would change the external field - f.weight(inplace=copy, power=-1) # Reset the self_adjoint property: self._self_adjoint = None diff --git a/nifty/operators/fft_operator/fft_operator.py b/nifty/operators/fft_operator/fft_operator.py index 144d578070006b1c99b0ea626b4ee5ec61f312be..61712ac5abf2ac92fc63a7771c16ee879f004377 100644 --- a/nifty/operators/fft_operator/fft_operator.py +++ b/nifty/operators/fft_operator/fft_operator.py @@ -152,10 +152,6 @@ class FFTOperator(LinearOperator): def target(self): return self._target - @property - def implemented(self): - return True - @property def unitary(self): return True diff --git a/nifty/operators/linear_operator/linear_operator.py b/nifty/operators/linear_operator/linear_operator.py index 956228c18d86d706fa7c2636cc19c7339b3bb718..8643d8aed8f792bdcab45f522d02db660eb74181 100644 --- a/nifty/operators/linear_operator/linear_operator.py +++ b/nifty/operators/linear_operator/linear_operator.py @@ -40,10 +40,6 @@ class LinearOperator(Loggable, object): def target(self): raise NotImplementedError - @abc.abstractproperty - def implemented(self): - raise NotImplementedError - @abc.abstractproperty def unitary(self): raise NotImplementedError @@ -54,9 +50,6 @@ class LinearOperator(Loggable, object): def times(self, x, spaces=None, **kwargs): spaces = self._check_input_compatibility(x, spaces) - if not self.implemented: - x = x.weight(spaces=spaces) - y = self._times(x, spaces, **kwargs) return y @@ -64,8 +57,6 @@ class LinearOperator(Loggable, object): spaces = self._check_input_compatibility(x, spaces, inverse=True) y = self._inverse_times(x, spaces, **kwargs) - if not self.implemented: - y = y.weight(power=-1, spaces=spaces) return y def adjoint_times(self, x, spaces=None, **kwargs): @@ -74,8 +65,6 @@ class LinearOperator(Loggable, object): spaces = self._check_input_compatibility(x, spaces, inverse=True) - if not self.implemented: - x = x.weight(spaces=spaces) y = self._adjoint_times(x, spaces, **kwargs) return y @@ -86,8 +75,6 @@ class LinearOperator(Loggable, object): spaces = self._check_input_compatibility(x, spaces) y = self._adjoint_inverse_times(x, spaces, **kwargs) - if not self.implemented: - y = y.weight(power=-1, spaces=spaces) return y def inverse_adjoint_times(self, x, spaces=None, **kwargs): @@ -97,8 +84,6 @@ class LinearOperator(Loggable, object): spaces = self._check_input_compatibility(x, spaces) y = self._inverse_adjoint_times(x, spaces) - if not self.implemented: - y = y.weight(power=-1, spaces=spaces) return y def _times(self, x, spaces): diff --git a/nifty/operators/projection_operator/projection_operator.py b/nifty/operators/projection_operator/projection_operator.py index 26e49154e304fc6629b618e3ce9f4d4fe9a57ddb..9d4c88eb1c2305d79bb46053b4e6a4af22650cde 100644 --- a/nifty/operators/projection_operator/projection_operator.py +++ b/nifty/operators/projection_operator/projection_operator.py @@ -101,10 +101,6 @@ class ProjectionOperator(EndomorphicOperator): def domain(self): return self._projection_field.domain - @property - def implemented(self): - return True - @property def unitary(self): if self._unitary is None: diff --git a/nifty/operators/propagator_operator/propagator_operator.py b/nifty/operators/propagator_operator/propagator_operator.py index f0ded80a41f823d25cea4de327f32ac784733888..4cb31ab1e45e7aeacb599b1bc569d6529ed7fe2a 100644 --- a/nifty/operators/propagator_operator/propagator_operator.py +++ b/nifty/operators/propagator_operator/propagator_operator.py @@ -74,10 +74,6 @@ class PropagatorOperator(InvertibleOperatorMixin, EndomorphicOperator): def domain(self): return self._domain - @property - def implemented(self): - return True - @property def self_adjoint(self): return True diff --git a/nifty/operators/smoothing_operator/smoothing_operator.py b/nifty/operators/smoothing_operator/smoothing_operator.py index 76e5ec4b1385a54347c900f568b8878c5b73e3a7..ff8f5bf05b980c22c60995e586912b156c4f7fc6 100644 --- a/nifty/operators/smoothing_operator/smoothing_operator.py +++ b/nifty/operators/smoothing_operator/smoothing_operator.py @@ -53,10 +53,6 @@ class SmoothingOperator(EndomorphicOperator): def domain(self): return self._domain - @property - def implemented(self): - return True - @property def self_adjoint(self): return True