Commit a2d0f803 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cleanups

parent 2fc8a9fc
Pipeline #22719 passed with stage
in 4 minutes and 47 seconds
...@@ -58,12 +58,6 @@ class EndomorphicOperator(LinearOperator): ...@@ -58,12 +58,6 @@ class EndomorphicOperator(LinearOperator):
else: else:
return super(EndomorphicOperator, self).adjoint_inverse_times(x) return super(EndomorphicOperator, self).adjoint_inverse_times(x)
def inverse_adjoint_times(self, x):
if self.self_adjoint:
return self.inverse_times(x)
else:
return super(EndomorphicOperator, self).inverse_adjoint_times(x)
@property @property
def target(self): def target(self):
return self.domain return self.domain
......
...@@ -171,6 +171,7 @@ class LinearOperator(with_metaclass( ...@@ -171,6 +171,7 @@ class LinearOperator(with_metaclass(
return y return y
def inverse_adjoint_times(self, x): def inverse_adjoint_times(self, x):
"""Same as adjoint_inverse_times()"""
return self.adjoint_inverse_times(x) return self.adjoint_inverse_times(x)
def _times(self, x): def _times(self, x):
......
...@@ -40,8 +40,7 @@ class GLSpace(Space): ...@@ -40,8 +40,7 @@ class GLSpace(Space):
See Also See Also
-------- --------
hp_space : A class for the HEALPix discretization of the sphere [#]_. HPSpace, LMSpace
lm_space : A class for spherical harmonic components.
References References
---------- ----------
...@@ -53,8 +52,6 @@ class GLSpace(Space): ...@@ -53,8 +52,6 @@ class GLSpace(Space):
Distributed on the Sphere", *ApJ* 622..759G. Distributed on the Sphere", *ApJ* 622..759G.
""" """
# ---Overwritten properties and methods---
def __init__(self, nlat, nlon=None): def __init__(self, nlat, nlon=None):
super(GLSpace, self).__init__() super(GLSpace, self).__init__()
self._needed_for_hash += ["_nlat", "_nlon"] self._needed_for_hash += ["_nlat", "_nlon"]
...@@ -70,8 +67,6 @@ class GLSpace(Space): ...@@ -70,8 +67,6 @@ class GLSpace(Space):
raise ValueError("nlon must be a positive number.") raise ValueError("nlon must be a positive number.")
self._dvol = None self._dvol = None
# ---Mandatory properties and methods---
def __repr__(self): def __repr__(self):
return ("GLSpace(nlat=%r, nlon=%r)" % (self.nlat, self.nlon)) return ("GLSpace(nlat=%r, nlon=%r)" % (self.nlat, self.nlon))
......
...@@ -37,9 +37,7 @@ class HPSpace(Space): ...@@ -37,9 +37,7 @@ class HPSpace(Space):
See Also See Also
-------- --------
GLSpace : A class for the Gauss-Legendre discretization of the GLSpace, LMSpace
sphere [#]_.
LMSpace : A class for spherical harmonic components.
References References
---------- ----------
......
...@@ -42,9 +42,7 @@ class LMSpace(Space): ...@@ -42,9 +42,7 @@ class LMSpace(Space):
See Also See Also
-------- --------
HPSpace : A class for the HEALPix discretization of the sphere [#]_. HPSpace, GLSpace
GLSpace : A class for the Gauss-Legendre discretization of the
sphere [#]_.
References References
---------- ----------
......
...@@ -50,8 +50,6 @@ class PowerSpace(Space): ...@@ -50,8 +50,6 @@ class PowerSpace(Space):
_powerIndexCache = {} _powerIndexCache = {}
# ---Overwritten properties and methods---
@staticmethod @staticmethod
def linear_binbounds(nbin, first_bound, last_bound): def linear_binbounds(nbin, first_bound, last_bound):
""" """
...@@ -158,16 +156,12 @@ class PowerSpace(Space): ...@@ -158,16 +156,12 @@ class PowerSpace(Space):
minlength=nbin).astype(np.float64, copy=False) minlength=nbin).astype(np.float64, copy=False)
temp_k_lengths = dobj.np_allreduce_sum(temp_k_lengths) / temp_rho temp_k_lengths = dobj.np_allreduce_sum(temp_k_lengths) / temp_rho
temp_dvol = temp_rho*pdvol temp_dvol = temp_rho*pdvol
self._powerIndexCache[key] = (binbounds, self._powerIndexCache[key] = (binbounds, temp_pindex,
temp_pindex, temp_k_lengths, temp_dvol)
temp_k_lengths,
temp_dvol)
(self._binbounds, self._pindex, self._k_lengths, self._dvol) = \ (self._binbounds, self._pindex, self._k_lengths, self._dvol) = \
self._powerIndexCache[key] self._powerIndexCache[key]
# ---Mandatory properties and methods---
def __repr__(self): def __repr__(self):
return ("PowerSpace(harmonic_partner=%r, binbounds=%r)" return ("PowerSpace(harmonic_partner=%r, binbounds=%r)"
% (self.harmonic_partner, self._binbounds)) % (self.harmonic_partner, self._binbounds))
...@@ -190,8 +184,6 @@ class PowerSpace(Space): ...@@ -190,8 +184,6 @@ class PowerSpace(Space):
def dvol(self): def dvol(self):
return self._dvol return self._dvol
# ---Added properties and methods---
@property @property
def harmonic_partner(self): def harmonic_partner(self):
"""Returns the Space of which this is the power space.""" """Returns the Space of which this is the power space."""
......
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