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

Merge branch 'NIFTy_5' into fix_doc

parents 6447e7a8 ee760ed2
Pipeline #63499 passed with stages
in 8 minutes and 24 seconds
......@@ -95,7 +95,7 @@ def _actual_domain_check(op, domain_dtype=None, inp=None):
assert_(op(inp).domain is op.target)
def _actual_domain_check_nonlinear(op, loc, target_dtype=np.float64):
def _actual_domain_check_nonlinear(op, loc):
assert isinstance(loc, (Field, MultiField))
assert_(loc.domain is op.domain)
lin = Linearization.make_var(loc, False)
......@@ -112,7 +112,7 @@ def _actual_domain_check_nonlinear(op, loc, target_dtype=np.float64):
assert_(reslin.jac.domain is reslin.domain)
assert_(reslin.jac.target is reslin.target)
_actual_domain_check(reslin.jac, inp=loc)
_actual_domain_check(reslin.jac.adjoint, domain_dtype=target_dtype)
_actual_domain_check(reslin.jac.adjoint, inp=reslin.jac(loc))
def _domain_check(op):
......
......@@ -63,7 +63,7 @@ class _LightConeDerivative(LinearOperator):
if mode == self.TIMES:
res += self._derivatives[i]*x[i]
else:
res[i] = np.sum(self._derivatives[i]*x)
res[i] = np.sum(self._derivatives[i]*x.real)
return Field.from_global_data(self._tgt(mode), res)
......
......@@ -250,20 +250,18 @@ class InverseGammaLikelihood(EnergyOperator):
class StudentTEnergy(EnergyOperator):
"""Computes likelihood energy of expected event frequency constrained by
event data.
"""Computes likelihood energy corresponding to Student's t-distribution.
.. math ::
E(f) = -\\log \\text{Bernoulli}(d|f)
= -d^\\dagger \\log f - (1-d)^\\dagger \\log(1-f),
E_\\theta(f) = -\\log \\text{StudentT}_\\theta(f)
= \\frac{\\theta + 1}{2} \\log(1 + \\frac{f^2}{\\theta}),
where f is a field defined on `d.domain` with the expected
frequencies of events.
where f is a field defined on `domain`.
Parameters
----------
d : Field
Data field with events (1) or non-events (0).
domain : `Domain` or `DomainTuple`
Domain of the operator
theta : Scalar
Degree of freedom parameter for the student t distribution
"""
......
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