Commit 68e9f355 authored by Philipp Arras's avatar Philipp Arras
Browse files

Changes

parent 2f5dab3d
......@@ -132,9 +132,20 @@ class AmplitudeModel(Operator):
self._smooth_op = sym(qht(makeOp(sqrt(cepstrum))))
self._keys = tuple(keys)
self._qht = qht
self._ceps = makeOp(sqrt(cepstrum))
def apply(self, x):
smooth_spec = self._smooth_op(x[self._keys[0]])
phi = x[self._keys[1]] + self._norm_phi_mean
linear_spec = self._slope(phi)
loglog_spec = smooth_spec + linear_spec
return self._exp_transform((0.5*loglog_spec).exp())
@property
def qht(self):
return self._qht
@property
def ceps(self):
return self._ceps
......@@ -90,7 +90,7 @@ class GaussianEnergy(EnergyOperator):
def apply(self, x):
residual = x if self._mean is None else x-self._mean
res = self._op(residual)
res = self._op(residual).real
if not isinstance(x, Linearization):
return res
metric = SandwichOperator.make(x.jac, self._icov)
......
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