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
b8bfb322
Commit
b8bfb322
authored
Jan 07, 2019
by
Martin Reinecke
Browse files
fix
parent
8e9d251f
Changes
1
Hide whitespace changes
Inline
Side-by-side
demos/getting_started_1.py
View file @
b8bfb322
...
...
@@ -101,15 +101,12 @@ if __name__ == '__main__':
# Masking operator to model that parts of the field have not been observed
mask
=
ift
.
Field
.
from_global_data
(
position_space
,
mask
)
Mask
=
ift
.
DiagonalOperator
(
mask
)
<<<<<<<
HEAD
# The response operator consists
out
of
# The response operator consists of
# - an harmonic transform (to get to image space)
# - the application of the mask
# - the removal of geometric information
=======
# Operators can be composed either with paranthesis
>>>>>>>
NIFTy_5
# Operators can be composed either with parenthesis
R
=
GR
(
Mask
(
HT
))
# or with @
R
=
GR
@
Mask
@
HT
...
...
@@ -125,17 +122,10 @@ if __name__ == '__main__':
MOCK_NOISE
=
N
.
draw_sample
()
data
=
R
(
MOCK_SIGNAL
)
+
MOCK_NOISE
<<<<<<<
HEAD
# Build inverse propagator D and information source j
D_inv
=
R
.
adjoint
(
N
.
inverse
(
R
))
+
S
.
inverse
D_inv
=
R
.
adjoint
@
N
.
inverse
@
R
+
S
.
inverse
j
=
R
.
adjoint_times
(
N
.
inverse_times
(
data
))
# Make D_inv invertible (via Conjugate Gradient)
=======
# Build propagator D and information source j
j
=
R
.
adjoint_times
(
N
.
inverse_times
(
data
))
D_inv
=
R
.
adjoint
@
N
.
inverse
@
R
+
S
.
inverse
# Make it invertible
>>>>>>>
NIFTy_5
IC
=
ift
.
GradientNormController
(
iteration_limit
=
500
,
tol_abs_gradnorm
=
1e-3
)
D
=
ift
.
InversionEnabler
(
D_inv
,
IC
,
approximation
=
S
.
inverse
).
inverse
...
...
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