Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
756095e7
Commit
756095e7
authored
Jan 17, 2019
by
Philipp Arras
Browse files
Cleanup and docs
parent
4f8fa350
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/adjust_variances.py
View file @
756095e7
...
...
@@ -16,7 +16,6 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
from
..minimization.energy_adapter
import
EnergyAdapter
from
..multi_domain
import
MultiDomain
from
..multi_field
import
MultiField
from
..operators.distributors
import
PowerDistributor
from
..operators.energy_operators
import
Hamiltonian
,
InverseGammaLikelihood
...
...
@@ -35,25 +34,27 @@ def make_adjust_variances(a,
Constructs a Hamiltonian to solve constant likelihood optimizations of the
form phi = a * xi under the constraint that phi remains constant.
FIXME xi is white.
Parameters
----------
a : Operator
Operator which g
ives the amplitude when evaluated at a position
G
ives the amplitude when evaluated at a position
.
xi : Operator
Operator which g
ives the excitation when evaluated at a position
G
ives the excitation when evaluated at a position
.
postion : Field, MultiField
Position of the whole problem
Position of the whole problem
.
samples : Field, MultiField
Residual samples of the whole problem
Residual samples of the whole problem
.
scaling : Float
Optional rescaling of the Likelihood
Optional rescaling of the Likelihood
.
ic_samp : Controller
Iteration Controller for Hamiltonian
Iteration Controller for Hamiltonian
.
Returns
-------
Hamiltonian
A
Hamiltonian that can be used for further minimization
Energy
Hamiltonian that can be used for further minimization
.
"""
d
=
a
*
xi
...
...
@@ -79,6 +80,9 @@ def do_adjust_variances(position,
minimizer
,
xi_key
=
'xi'
,
samples
=
[]):
'''
FIXME
'''
h_space
=
position
[
xi_key
].
domain
[
0
]
pd
=
PowerDistributor
(
h_space
,
amplitude_operator
.
target
[
0
])
...
...
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