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
9c1c88b3
Commit
9c1c88b3
authored
Jun 30, 2017
by
Martin Reinecke
Browse files
fixes
parent
02762786
Pipeline
#14222
passed with stage
in 5 minutes and 8 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
demos/wiener_filter_hamiltonian.py
View file @
9c1c88b3
...
...
@@ -27,7 +27,7 @@ class WienerFilterEnergy(Energy):
@
property
def
value
(
self
):
D_inv_x
=
self
.
D_inverse_x
()
H
=
0.5
*
D_inv_x
.
vdot
(
self
.
position
)
-
self
.
j
.
dot
(
self
.
position
)
H
=
0.5
*
D_inv_x
.
vdot
(
self
.
position
)
-
self
.
j
.
v
dot
(
self
.
position
)
return
H
.
real
@
property
...
...
@@ -75,7 +75,7 @@ if __name__ == "__main__":
ss
=
fft
.
inverse_times
(
sh
)
# model the measurement process
R
=
SmoothingOperator
(
s_space
,
sigma
=
0.01
)
R
=
SmoothingOperator
.
make
(
s_space
,
sigma
=
0.01
)
# R = DiagonalOperator(s_space, diagonal=1.)
# R._diagonal.val[200:400, 200:400] = 0
...
...
@@ -95,7 +95,7 @@ if __name__ == "__main__":
def
distance_measure
(
energy
,
iteration
):
x
=
energy
.
position
print
(
(
iteration
,
(
x
-
ss
).
norm
()
/
ss
.
norm
()
)
.
real
)
)
print
(
iteration
,
(
x
-
ss
).
norm
()
/
ss
.
norm
().
real
)
# minimizer = SteepestDescent(convergence_tolerance=0,
# iteration_limit=50,
...
...
demos/wiener_filter_unit.py
View file @
9c1c88b3
...
...
@@ -88,7 +88,7 @@ if __name__ == "__main__":
x1
=
RGSpace
(
npix
,
distances
=
total_volume
/
npix
,
zerocenter
=
False
)
k1
=
RGRGTransformation
.
get_codomain
(
x1
)
p1
=
PowerSpace
(
harmonic_
domain
=
k1
,
log
=
False
)
p1
=
PowerSpace
(
harmonic_
partner
=
k1
,
log
arithmic
=
False
)
# creating Power Operator with given spectrum
spec
=
(
lambda
k
:
a_s
/
(
1
+
(
k
/
k_0
)
**
2
)
**
2
)
...
...
nifty/field.py
View file @
9c1c88b3
...
...
@@ -1104,7 +1104,7 @@ class Field(Loggable, Versionable, object):
The Lq-norm of the field values.
"""
return
np
.
sqrt
(
np
.
abs
(
self
.
dot
(
x
=
self
)))
return
np
.
sqrt
(
np
.
abs
(
self
.
v
dot
(
x
=
self
)))
def
conjugate
(
self
,
inplace
=
False
):
""" Retruns the complex conjugate of the field.
...
...
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