Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
bdef7437
Commit
bdef7437
authored
Sep 27, 2018
by
Philipp Arras
Browse files
Simplification for do_adjust_variances
parent
cb31d136
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty5/library/adjust_variances.py
View file @
bdef7437
...
...
@@ -78,11 +78,15 @@ def make_adjust_variances(a,
return
Hamiltonian
(
InverseGammaLikelihood
(
d_eval
)(
x
),
ic_samp
=
ic_samp
)
def
do_adjust_variances
(
position
,
xi
,
amplitude_model
,
minimizer
,
samples
=
[]):
h_space
=
xi
.
target
[
0
]
def
do_adjust_variances
(
position
,
amplitude_model
,
minimizer
,
xi_key
=
'xi'
,
samples
=
[]):
h_space
=
position
[
xi_key
].
domain
[
0
]
pd
=
PowerDistributor
(
h_space
,
amplitude_model
.
target
[
0
])
a
=
pd
(
amplitude_model
)
xi
=
FieldAdapter
(
MultiDomain
.
make
({
"
xi
"
:
h_space
}),
"
xi
"
)
xi
=
FieldAdapter
(
MultiDomain
.
make
({
xi
_key
:
h_space
}),
xi
_key
)
axi_domain
=
MultiDomain
.
union
([
a
.
domain
,
xi
.
domain
])
ham
=
make_adjust_variances
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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