Commit 50d6a969 authored by Theo Steininger's avatar Theo Steininger
Browse files

Merge branch 'cleanup' into 'master'

various cleanups

See merge request !158
parents e25f7013 443de529
Pipeline #14515 passed with stages
in 12 minutes and 54 seconds
...@@ -21,7 +21,6 @@ import numpy as np ...@@ -21,7 +21,6 @@ import numpy as np
from d2o import distributed_data_object,\ from d2o import distributed_data_object,\
STRATEGIES as DISTRIBUTION_STRATEGIES STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.basic_arithmetics import log as nifty_log
from nifty.config import nifty_configuration as gc from nifty.config import nifty_configuration as gc
from nifty.field import Field from nifty.field import Field
from nifty.operators.endomorphic_operator import EndomorphicOperator from nifty.operators.endomorphic_operator import EndomorphicOperator
......
...@@ -73,7 +73,7 @@ class LinearOperator(Loggable, object): ...@@ -73,7 +73,7 @@ class LinearOperator(Loggable, object):
__metaclass__ = NiftyMeta __metaclass__ = NiftyMeta
def __init__(self, default_spaces=None): def __init__(self, default_spaces=None):
self.default_spaces = default_spaces self._default_spaces = default_spaces
@staticmethod @staticmethod
def _parse_domain(domain): def _parse_domain(domain):
...@@ -119,10 +119,6 @@ class LinearOperator(Loggable, object): ...@@ -119,10 +119,6 @@ class LinearOperator(Loggable, object):
def default_spaces(self): def default_spaces(self):
return self._default_spaces return self._default_spaces
@default_spaces.setter
def default_spaces(self, spaces):
self._default_spaces = utilities.cast_axis_to_tuple(spaces)
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
return self.times(*args, **kwargs) return self.times(*args, **kwargs)
......
...@@ -135,8 +135,8 @@ class SmoothingOperator(EndomorphicOperator): ...@@ -135,8 +135,8 @@ class SmoothingOperator(EndomorphicOperator):
# "space as input domain.") # "space as input domain.")
self._domain = self._parse_domain(domain) self._domain = self._parse_domain(domain)
self.sigma = sigma self._sigma = sigma
self.log_distances = log_distances self._log_distances = log_distances
def _inverse_times(self, x, spaces): def _inverse_times(self, x, spaces):
if self.sigma == 0: if self.sigma == 0:
...@@ -183,18 +183,10 @@ class SmoothingOperator(EndomorphicOperator): ...@@ -183,18 +183,10 @@ class SmoothingOperator(EndomorphicOperator):
def sigma(self): def sigma(self):
return self._sigma return self._sigma
@sigma.setter
def sigma(self, sigma):
self._sigma = np.float(sigma)
@property @property
def log_distances(self): def log_distances(self):
return self._log_distances return self._log_distances
@log_distances.setter
def log_distances(self, log_distances):
self._log_distances = bool(log_distances)
@abc.abstractmethod @abc.abstractmethod
def _smooth(self, x, spaces, inverse): def _smooth(self, x, spaces, inverse):
raise NotImplementedError raise NotImplementedError
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