diff --git a/nifty/library/log_normal_wiener_filter_curvature.py b/nifty/library/log_normal_wiener_filter_curvature.py index 068dba17a5b3ec1128e56f195155710a3445255b..6446a136a52d3668d145e6b87162bb1269049993 100644 --- a/nifty/library/log_normal_wiener_filter_curvature.py +++ b/nifty/library/log_normal_wiener_filter_curvature.py @@ -38,10 +38,6 @@ class LogNormalWienerFilterCurvature(InversionEnabler, EndomorphicOperator): def self_adjoint(self): return True - @property - def unitary(self): - return False - def _times(self, x): part1 = self.S.inverse_times(x) part3 = self._fft.adjoint_times(self._expp_sspace * self._fft(x)) diff --git a/nifty/library/nonlinear_power_curvature.py b/nifty/library/nonlinear_power_curvature.py index d2845013690edc09efff284c1e18c977e08bea61..8e30ef54dc4bb769e4102ae08bd90c99d2f8096c 100644 --- a/nifty/library/nonlinear_power_curvature.py +++ b/nifty/library/nonlinear_power_curvature.py @@ -25,10 +25,6 @@ class NonlinearPowerCurvature(InversionEnabler, EndomorphicOperator): def self_adjoint(self): return True - @property - def unitary(self): - return False - def _times(self, x): result = None for sample in self.sample_list: diff --git a/nifty/library/response_operators.py b/nifty/library/response_operators.py index 7b698c9b25640765ccf3a1fd7ca733dfdd2a58a7..436efb8838d55e6b1f9cb592bb03687b25fb9842 100644 --- a/nifty/library/response_operators.py +++ b/nifty/library/response_operators.py @@ -31,10 +31,6 @@ class LinearizedSignalResponse(LinearOperator): def target(self): return self.Instrument.target - @property - def unitary(self): - return False - class LinearizedPowerResponse(LinearOperator): def __init__(self, Instrument, nonlinearity, FFT, Projection, t, m): @@ -74,7 +70,3 @@ class LinearizedPowerResponse(LinearOperator): @property def target(self): return self.Instrument.target - - @property - def unitary(self): - return False diff --git a/nifty/library/wiener_filter_curvature.py b/nifty/library/wiener_filter_curvature.py index d3d00bfbf1fb3393d296aa1d22a5da74cac363a8..8a6008f129305c4583cb2705b9b0a5b5ea6b83db 100644 --- a/nifty/library/wiener_filter_curvature.py +++ b/nifty/library/wiener_filter_curvature.py @@ -36,10 +36,6 @@ class WienerFilterCurvature(InversionEnabler, EndomorphicOperator): def self_adjoint(self): return True - @property - def unitary(self): - return False - def _times(self, x): res = self.R.adjoint_times(self.N.inverse_times(self.R(x))) res += self.S.inverse_times(x) diff --git a/nifty/operators/composed_operator.py b/nifty/operators/composed_operator.py index 97f424a5747afd91c91a5cf7b1e7056e38c1b88e..c77896140f788c3b02523ba625abbd16dbe069c5 100644 --- a/nifty/operators/composed_operator.py +++ b/nifty/operators/composed_operator.py @@ -37,8 +37,6 @@ class ComposedOperator(LinearOperator): The NIFTy.space in which the operator is defined. target : DomainTuple The NIFTy.space in which the outcome of the operator lives - unitary : boolean - Indicates whether the Operator is unitary or not. """ def __init__(self, operators): @@ -63,10 +61,6 @@ class ComposedOperator(LinearOperator): def target(self): return self._operator_store[-1].target - @property - def unitary(self): - return False - def _times(self, x): return self._times_helper(x, func='times') diff --git a/nifty/operators/direct_smoothing_operator.py b/nifty/operators/direct_smoothing_operator.py index f50d048db6d76bee1b521efae53bd2de9785cfca..da382eb7f23ed8303fbe36c757cde878dae967fb 100644 --- a/nifty/operators/direct_smoothing_operator.py +++ b/nifty/operators/direct_smoothing_operator.py @@ -42,10 +42,6 @@ class DirectSmoothingOperator(EndomorphicOperator): def self_adjoint(self): return True - @property - def unitary(self): - return False - def _precompute(self, x): """ Does precomputations for Gaussian smoothing on a 1D irregular grid. diff --git a/nifty/operators/dof_projection_operator.py b/nifty/operators/dof_projection_operator.py index 8ff85c29e45d4578b731c1e1fe8443a4bf6f5bf5..10daa73335f419b7a6d4ee9b8e995cdd5ef36a91 100644 --- a/nifty/operators/dof_projection_operator.py +++ b/nifty/operators/dof_projection_operator.py @@ -95,7 +95,3 @@ class DOFProjectionOperator(LinearOperator): @property def target(self): return self._target - - @property - def unitary(self): - return False diff --git a/nifty/operators/endomorphic_operator.py b/nifty/operators/endomorphic_operator.py index 056e046c373ee3a7819921c12c576478c79c008e..184297337b0376440d897119243a906b2cc2a82f 100644 --- a/nifty/operators/endomorphic_operator.py +++ b/nifty/operators/endomorphic_operator.py @@ -34,8 +34,6 @@ class EndomorphicOperator(LinearOperator): target : DomainTuple The domain in which the outcome of the operator lives. As the Operator is endomorphic this is the same as its domain. - unitary : boolean - Indicates whether the Operator is unitary or not. self_adjoint : boolean Indicates whether the operator is self_adjoint or not. """ diff --git a/nifty/operators/fft_smoothing_operator.py b/nifty/operators/fft_smoothing_operator.py index c0b7b07b5cda9547570470132ceeb6d8b517f4ce..7752c9171ea30e15a5615bb5d8373e6ceadc43d3 100644 --- a/nifty/operators/fft_smoothing_operator.py +++ b/nifty/operators/fft_smoothing_operator.py @@ -35,7 +35,3 @@ class FFTSmoothingOperator(EndomorphicOperator): @property def self_adjoint(self): return True - - @property - def unitary(self): - return False diff --git a/nifty/operators/laplace_operator.py b/nifty/operators/laplace_operator.py index d7dc59b8e8db3eaeb49ed2ac40171d3174af6969..09bfa90fe9f25dafb0498446694b8513a793a009 100644 --- a/nifty/operators/laplace_operator.py +++ b/nifty/operators/laplace_operator.py @@ -70,10 +70,6 @@ class LaplaceOperator(EndomorphicOperator): def domain(self): return self._domain - @property - def unitary(self): - return False - @property def self_adjoint(self): return False diff --git a/nifty/operators/linear_operator.py b/nifty/operators/linear_operator.py index 7e94a501576fefec48cc1da0e3759f7547946638..e26550de627b66255195f6d6d32c43bf5d5f44ed 100644 --- a/nifty/operators/linear_operator.py +++ b/nifty/operators/linear_operator.py @@ -64,15 +64,15 @@ class LinearOperator(with_metaclass( """ raise NotImplementedError - @abc.abstractproperty + @property def unitary(self): """ unitary : boolean States whether the Operator is unitary or not. - Every Operator which inherits from the abstract LinearOperator - base class must have this attribute. + Since the majority of operators will not be unitary, this property + returns False, unless it is overridden in a subclass. """ - raise NotImplementedError + return False def __call__(self, x): return self.times(x) diff --git a/nifty/operators/response_operator.py b/nifty/operators/response_operator.py index 7dba4002c3ce76f2750d4f2b291e6b605dc3007b..04b4fc7aa97319978516962a8df788b5c4360601 100644 --- a/nifty/operators/response_operator.py +++ b/nifty/operators/response_operator.py @@ -33,8 +33,6 @@ class ResponseOperator(LinearOperator): The domain on which the Operator's input Field lives. target : DomainTuple The domain in which the outcome of the operator lives. - unitary : boolean - Indicates whether the Operator is unitary or not. Raises ------ @@ -78,10 +76,6 @@ class ResponseOperator(LinearOperator): def target(self): return self._target - @property - def unitary(self): - return False - def _times(self, x): res = self._composed_kernel.times(x) res = self._composed_exposure.times(res) diff --git a/nifty/operators/smoothness_operator.py b/nifty/operators/smoothness_operator.py index abd5ddc60b89a4266e9c7e9bbce0aab4fc5d40c4..610a238e664c0a7956de56287b64da31f1f60da4 100644 --- a/nifty/operators/smoothness_operator.py +++ b/nifty/operators/smoothness_operator.py @@ -38,10 +38,6 @@ class SmoothnessOperator(EndomorphicOperator): def domain(self): return self._laplace._domain - @property - def unitary(self): - return False - @property def self_adjoint(self): return False