Commit 6d09a243 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

more rearrangements

parent 3d134e6f
Pipeline #21632 passed with stage
in 4 minutes and 18 seconds
......@@ -14,8 +14,6 @@ from .utilities import *
from .field_types import *
from .energies import *
from .minimization import *
from .spaces import *
......
from .energy import Energy
from .quadratic_energy import QuadraticEnergy
from .line_energy import LineEnergy
from ...energies.energy import Energy
from ...minimization.energy import Energy
from ...operators.smoothness_operator import SmoothnessOperator
from ...operators.power_projection_operator import PowerProjectionOperator
from ...operators.inversion_enabler import InversionEnabler
......
from ...energies.energy import Energy
from ...minimization.energy import Energy
from ...utilities import memo
from . import LogNormalWienerFilterCurvature
from ...sugar import create_composed_fft_operator
......
from ...energies.energy import Energy
from ...minimization.energy import Energy
from ...utilities import memo
from ...operators.inversion_enabler import InversionEnabler
from . import WienerFilterCurvature
......
......@@ -9,3 +9,6 @@ from .descent_minimizer import DescentMinimizer
from .steepest_descent import SteepestDescent
from .vl_bfgs import VL_BFGS
from .relaxed_newton import RelaxedNewton
from .energy import Energy
from .quadratic_energy import QuadraticEnergy
from .line_energy import LineEnergy
......@@ -20,7 +20,7 @@ from __future__ import division
from builtins import range
import numpy as np
from .line_search import LineSearch
from ..energies import LineEnergy
from .line_energy import LineEnergy
from .. import dobj
......
......@@ -16,7 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from ..energies import QuadraticEnergy
from ..minimization.quadratic_energy import QuadraticEnergy
from ..field import Field
from .linear_operator import LinearOperator
......
......@@ -28,8 +28,8 @@ class SmoothnessOperator(EndomorphicOperator):
def __init__(self, domain, strength=1., logarithmic=True, space=None):
super(SmoothnessOperator, self).__init__()
self._laplace = LaplaceOperator(domain,
logarithmic=logarithmic, space=space)
self._laplace = LaplaceOperator(domain, logarithmic=logarithmic,
space=space)
if strength <= 0:
raise ValueError("ERROR: invalid sigma.")
......@@ -48,11 +48,8 @@ class SmoothnessOperator(EndomorphicOperator):
return False
def _times(self, x):
if self._strength != 0:
result = self._laplace.adjoint_times(self._laplace(x))
result *= self._strength**2
else:
result = Field.zeros_like(x)
result = self._laplace.adjoint_times(self._laplace(x))
result *= self._strength**2
return result
@property
......
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