Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
eac8a311
Commit
eac8a311
authored
Apr 04, 2020
by
Martin Reinecke
Browse files
fixes
parent
f103534f
Pipeline
#72237
passed with stages
in 20 minutes and 13 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
demos/bernoulli_demo.py
View file @
eac8a311
...
@@ -52,7 +52,7 @@ if __name__ == '__main__':
...
@@ -52,7 +52,7 @@ if __name__ == '__main__':
A
=
ift
.
create_power_operator
(
harmonic_space
,
sqrtpspec
)
A
=
ift
.
create_power_operator
(
harmonic_space
,
sqrtpspec
)
# Set up a sky operator and instrumental response
# Set up a sky operator and instrumental response
sky
=
ift
.
sigmoid
(
HT
(
A
)
)
sky
=
HT
(
A
).
ptw
(
"
sigmoid
"
)
GR
=
ift
.
GeometryRemover
(
position_space
)
GR
=
ift
.
GeometryRemover
(
position_space
)
R
=
GR
R
=
GR
...
...
demos/getting_started_mf.py
View file @
eac8a311
...
@@ -84,7 +84,7 @@ if __name__ == '__main__':
...
@@ -84,7 +84,7 @@ if __name__ == '__main__':
DC
=
SingleDomain
(
correlated_field
.
target
,
position_space
)
DC
=
SingleDomain
(
correlated_field
.
target
,
position_space
)
## Apply a nonlinearity
## Apply a nonlinearity
signal
=
DC
@
ift
.
sigmoid
(
correlated_field
)
signal
=
DC
@
correlated_field
.
ptw
(
"sigmoid"
)
# Build the line-of-sight response and define signal response
# Build the line-of-sight response and define signal response
LOS_starts
,
LOS_ends
=
random_los
(
100
)
if
mode
==
0
else
radial_los
(
100
)
LOS_starts
,
LOS_ends
=
random_los
(
100
)
if
mode
==
0
else
radial_los
(
100
)
...
@@ -170,7 +170,7 @@ if __name__ == '__main__':
...
@@ -170,7 +170,7 @@ if __name__ == '__main__':
filename_res
=
filename
.
format
(
"results"
)
filename_res
=
filename
.
format
(
"results"
)
plot
=
ift
.
Plot
()
plot
=
ift
.
Plot
()
plot
.
add
(
sc
.
mean
,
title
=
"Posterior Mean"
)
plot
.
add
(
sc
.
mean
,
title
=
"Posterior Mean"
)
plot
.
add
(
ift
.
sqrt
(
sc
.
var
),
title
=
"Posterior Standard Deviation"
)
plot
.
add
(
sc
.
var
.
ptw
(
"sqrt"
),
title
=
"Posterior Standard Deviation"
)
powers1
=
[
A1
.
force
(
s
+
KL
.
position
)
for
s
in
KL
.
samples
]
powers1
=
[
A1
.
force
(
s
+
KL
.
position
)
for
s
in
KL
.
samples
]
powers2
=
[
A2
.
force
(
s
+
KL
.
position
)
for
s
in
KL
.
samples
]
powers2
=
[
A2
.
force
(
s
+
KL
.
position
)
for
s
in
KL
.
samples
]
...
...
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