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

Switched back to offset in LogNormalWienerFilterCurvature

parent d08745f2
......@@ -26,14 +26,14 @@ class LogNormalWienerFilterCurvature(InvertibleOperatorMixin,
"""
def __init__(self, R, N, S, d, position, inverter=None,
preconditioner=None, fft4exp=None, prefactor=None, **kwargs):
preconditioner=None, fft4exp=None, offset=None, **kwargs):
self._cache = {}
self.R = R
self.N = N
self.S = S
self.d = d
self.position = position
self.prefactor = prefactor
self.offset = offset
if preconditioner is None:
preconditioner = self.S.times
self._domain = self.S.domain
......@@ -56,7 +56,7 @@ class LogNormalWienerFilterCurvature(InvertibleOperatorMixin,
copy.N = self.N.copy()
copy.S = self.S.copy()
copy.d = self.d.copy()
copy.prefactor = self.prefactor
copy.offset = self.offset
if 'position' in kwargs:
copy.position = kwargs['position']
else:
......@@ -94,10 +94,10 @@ class LogNormalWienerFilterCurvature(InvertibleOperatorMixin,
@property
@memo
def _expp_sspace(self):
result = clipped_exp(self._fft(self.position))
if self.prefactor is not None:
result *= self.prefactor
return result
xs = self._fft(self.position)
if self.offset is not None:
xs += self.offset
return clipped_exp(xs)
@property
@memo
......
......@@ -25,13 +25,13 @@ class LogNormalWienerFilterEnergy(Energy):
"""
def __init__(self, position, d, R, N, S, fft4exp=None, old_curvature=None,
prefactor=None):
offset=None):
super(LogNormalWienerFilterEnergy, self).__init__(position=position)
self.d = d
self.R = R
self.N = N
self.S = S
self.prefactor = prefactor
self.offset = offset
if fft4exp is None:
self._fft = create_composed_fft_operator(self.S.domain,
......@@ -46,7 +46,7 @@ class LogNormalWienerFilterEnergy(Energy):
return self.__class__(position=position, d=self.d, R=self.R, N=self.N,
S=self.S, fft4exp=self._fft,
old_curvature=self._curvature,
prefactor=self.prefactor)
o=self.offset)
@property
@memo
......@@ -70,7 +70,7 @@ class LogNormalWienerFilterEnergy(Energy):
d=self.d,
position=self.position,
fft4exp=self._fft,
prefactor=self.prefactor)
offset=self.offset)
else:
self._curvature = \
self._old_curvature.copy(position=self.position)
......
Supports Markdown
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