Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
On Thursday, 7th July from 1 to 3 pm there will be a maintenance with a short downtime of GitLab.
Open sidebar
ift
NIFTy
Commits
f1696ca8
Commit
f1696ca8
authored
Jul 26, 2018
by
Martin Reinecke
Browse files
cosmetics
parent
ba58ae24
Changes
2
Hide whitespace changes
Inline
Side-by-side
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