Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NIFTy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ift
NIFTy
Commits
f1696ca8
Commit
f1696ca8
authored
Jul 26, 2018
by
Martin Reinecke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics
parent
ba58ae24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
demos/getting_started_2b.py
demos/getting_started_2b.py
+2
-2
nifty5/linearization.py
nifty5/linearization.py
+7
-0
No files found.
demos/getting_started_2b.py
View file @
f1696ca8
...
...
@@ -69,7 +69,7 @@ class EnergyAdapter(ift.Energy):
@
property
def
gradient
(
self
):
return
self
.
_res
.
jac
.
adjoint_times
(
ift
.
full
(
self
.
_res
.
jac
.
target
,
1.
))
return
self
.
_res
.
gradient
@
property
def
metric
(
self
):
...
...
@@ -126,7 +126,7 @@ if __name__ == '__main__':
A
=
pd
(
a
)
# Set up a sky model
sky
=
lambda
inp
:
(
HT
(
A
*
inp
)).
exp
()
sky
=
lambda
inp
:
(
HT
(
inp
*
A
)).
exp
()
M
=
ift
.
DiagonalOperator
(
exposure
)
GR
=
ift
.
GeometryRemover
(
position_space
)
...
...
nifty5/linearization.py
View file @
f1696ca8
...
...
@@ -30,8 +30,15 @@ class Linearization(object):
def
jac
(
self
):
return
self
.
_jac
@
property
def
gradient
(
self
):
"""Only available if target is a scalar"""
from
.sugar
import
full
return
self
.
_jac
.
adjoint_times
(
full
(
self
.
_jac
.
target
,
1.
))
@
property
def
metric
(
self
):
"""Only available if target is a scalar"""
return
self
.
_metric
def
__neg__
(
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