Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NIFTy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
NIFTy
Merge requests
!445
Add multi field support for find_position
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add multi field support for find_position
support_mf_calcpos
into
NIFTy_6
Overview
1
Commits
1
Pipelines
1
Changes
1
Merged
Philipp Arras
requested to merge
support_mf_calcpos
into
NIFTy_6
5 years ago
Overview
1
Commits
1
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
NIFTy_6
NIFTy_6 (base)
and
latest version
latest version
e3f9d9b4
1 commit,
5 years ago
1 file
+
4
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
nifty6/sugar.py
+
4
−
1
Options
@@ -496,7 +496,10 @@ def calculate_position(operator, output):
raise
TypeError
if
output
.
domain
!=
operator
.
target
:
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
else
:
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
Loading