Commit c6c1bbb9 authored by Theo Steininger's avatar Theo Steininger
Browse files

Merge branch 'master' into 'space_without_dtype_2'

Master

See merge request !76
parents ecc43e1b c9d48415
Pipeline #11881 passed with stage
in 10 minutes and 15 seconds
......@@ -105,10 +105,10 @@ class DiagonalOperator(EndomorphicOperator):
return self._implemented
@property
def symmetric(self):
if self._symmetric is None:
self._symmetric = (self._diagonal.val.imag == 0).all()
return self._symmetric
def self_adjoint(self):
if self._self_adjoint is None:
self._self_adjoint = (self._diagonal.val.imag == 0).all()
return self._self_adjoint
@property
def unitary(self):
......@@ -155,8 +155,8 @@ class DiagonalOperator(EndomorphicOperator):
# Otherwise, inplace weightening would change the external field
f.weight(inplace=copy, power=-1)
# Reset the symmetric property:
self._symmetric = None
# Reset the self_adjoint property:
self._self_adjoint = None
# Reset the unitarity property
self._unitary = None
......
......@@ -26,7 +26,7 @@ class EndomorphicOperator(LinearOperator):
# ---Overwritten properties and methods---
def inverse_times(self, x, spaces=None):
if self.symmetric and self.unitary:
if self.self_adjoint and self.unitary:
return self.times(x, spaces)
else:
return super(EndomorphicOperator, self).inverse_times(
......@@ -34,7 +34,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.times(x, spaces)
else:
return super(EndomorphicOperator, self).adjoint_times(
......@@ -42,7 +42,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def adjoint_inverse_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
return super(EndomorphicOperator, self).adjoint_inverse_times(
......@@ -50,7 +50,7 @@ class EndomorphicOperator(LinearOperator):
spaces=spaces)
def inverse_adjoint_times(self, x, spaces=None):
if self.symmetric:
if self.self_adjoint:
return self.inverse_times(x, spaces)
else:
return super(EndomorphicOperator, self).inverse_adjoint_times(
......@@ -66,5 +66,5 @@ class EndomorphicOperator(LinearOperator):
# ---Added properties and methods---
@abc.abstractproperty
def symmetric(self):
def self_adjoint(self):
raise NotImplementedError
......@@ -112,5 +112,5 @@ class ProjectionOperator(EndomorphicOperator):
return self._unitary
@property
def symmetric(self):
def self_adjoint(self):
return True
......@@ -79,7 +79,7 @@ class PropagatorOperator(InvertibleOperatorMixin, EndomorphicOperator):
return True
@property
def symmetric(self):
def self_adjoint(self):
return True
@property
......
......@@ -58,7 +58,7 @@ class SmoothingOperator(EndomorphicOperator):
return True
@property
def symmetric(self):
def self_adjoint(self):
return True
@property
......
......@@ -39,6 +39,6 @@ def create_power_operator(domain, power_spectrum, dtype=None,
f = fp.power_synthesize(mean=1, std=0, real_signal=False)
power_operator = DiagonalOperator(domain, diagonal=f)
power_operator = DiagonalOperator(domain, diagonal=f, bare=True)
return power_operator
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