Commit 7e3f46ba authored by Philipp Arras's avatar Philipp Arras
Browse files

Merge branch 'support_mf_calcpos' into 'NIFTy_6'

Add multi field support for find_position

See merge request !445
parents f9d8ed85 e3f9d9b4
Pipeline #73142 passed with stages
in 29 minutes and 28 seconds
......@@ -493,7 +493,10 @@ def calculate_position(operator, output):
raise TypeError
if output.domain !=
raise TypeError
cov = 1e-3*output.val.max()**2
if isinstance(output, MultiField):
cov = 1e-3*max([vv.max() for vv in output.val.values()])**2
cov = 1e-3*output.val.max()**2
invcov = ScalingOperator(output.domain, cov).inverse
d = output + invcov.draw_sample(from_inverse=True)
lh = GaussianEnergy(d, invcov) @ operator
Supports Markdown
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