Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
4ba18e98
Commit
4ba18e98
authored
Jun 19, 2018
by
Philipp Arras
Browse files
Simplify interface of PoissonLogLikelihood
parent
943ef47a
Pipeline
#31317
passed with stages
in 2 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/poisson_log_likelihood.py
View file @
4ba18e98
...
...
@@ -6,15 +6,15 @@ from ..sugar import log, makeOp
class
PoissonLogLikelihood
(
Energy
):
def
__init__
(
self
,
position
,
lamb
,
d
):
def
__init__
(
self
,
lamb
,
d
):
"""
s: Sky model object
value = 0.5 * s.vdot(s), i.e. a log-Gauss distribution with unit
covariance
"""
super
(
PoissonLogLikelihood
,
self
).
__init__
(
position
)
self
.
_lamb
=
lamb
.
at
(
position
)
super
(
PoissonLogLikelihood
,
self
).
__init__
(
lamb
.
position
)
self
.
_lamb
=
lamb
self
.
_d
=
d
lamb_val
=
self
.
_lamb
.
value
...
...
@@ -29,7 +29,7 @@ class PoissonLogLikelihood(Energy):
self
.
_curvature
=
SandwichOperator
.
make
(
self
.
_lamb
.
gradient
,
metric
)
def
at
(
self
,
position
):
return
self
.
__class__
(
position
,
self
.
_lamb
,
self
.
_d
)
return
self
.
__class__
(
self
.
_lamb
.
at
(
position
)
,
self
.
_d
)
@
property
def
value
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment