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
b84dfad9
Commit
b84dfad9
authored
Jan 07, 2019
by
Philipp Arras
Browse files
Cosmetics
parent
e0f0f20a
Changes
3
Hide whitespace changes
Inline
Side-by-side
demos/getting_started_1.py
View file @
b84dfad9
...
...
@@ -21,9 +21,10 @@
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
###############################################################################
import
nifty5
as
ift
import
numpy
as
np
import
nifty5
as
ift
def
make_checkerboard_mask
(
position_space
):
# Checkerboard mask for 2D mode
...
...
demos/getting_started_2.py
View file @
b84dfad9
...
...
@@ -21,9 +21,10 @@
# 1D (set mode=0), 2D (mode=1), or on the sphere (mode=2)
###############################################################################
import
nifty5
as
ift
import
numpy
as
np
import
nifty5
as
ift
def
exposure_2d
():
# Structured exposure for 2D mode
...
...
demos/getting_started_3.py
View file @
b84dfad9
...
...
@@ -116,10 +116,9 @@ if __name__ == '__main__':
# Draw new samples to approximate the KL five times
for
i
in
range
(
5
):
# Draw new samples and minimize KL
KL
=
ift
.
KL_Energy
(
position
,
H
,
N_samples
)
# Minimize KL
KL
,
convergence
=
minimizer
(
KL
)
# Update position
position
=
KL
.
position
# Plot current reconstruction
...
...
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