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
nam
ProxPython
Commits
cf48ce2d
Commit
cf48ce2d
authored
Sep 25, 2020
by
s.gretchko
Browse files
Fixed magproj calls (switched argument order) in P_M.py
parent
2679ce47
Changes
1
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/proxoperators/P_M.py
View file @
cf48ce2d
...
...
@@ -37,7 +37,7 @@ class P_M(ProxOperator):
"""
m
=
self
.
data
a
=
self
.
prop
.
eval
(
u
)
b
=
magproj
(
a
,
m
)
b
=
magproj
(
m
,
a
)
return
self
.
invprop
.
eval
(
b
)
...
...
@@ -70,7 +70,7 @@ class P_M_masked(P_M):
array_like - p_M: the projection IN THE PHYSICAL (time) DOMAIN
"""
fourier_space_iterate
=
self
.
prop
.
eval
(
u
)
constrained
=
magproj
(
fourier_space_iterate
.
copy
()
,
self
.
data
)
constrained
=
magproj
(
self
.
data
,
fourier_space_iterate
.
copy
())
update
=
where
(
self
.
mask
,
fourier_space_iterate
,
constrained
)
return
self
.
invprop
(
update
)
...
...
@@ -97,7 +97,7 @@ class Approx_P_M(P_M):
# Now see that the propagated field is within the ball around the data (if any).
# If not, the projection is calculated, otherwise we do nothing.
if
h_u_hat
>=
self
.
data_ball
+
self
.
TOL2
:
b
=
magproj
(
u_hat
,
self
.
data
)
b
=
magproj
(
self
.
data
,
u_hat
)
return
self
.
invprop
.
eval
(
b
)
else
:
return
u
...
...
@@ -124,7 +124,7 @@ class Approx_P_M_masked(P_M_masked):
# Now see that the propagated field is within the ball around the data (if any).
# If not, the projection is calculated, otherwise we do nothing.
if
h_u_hat
>=
self
.
data_ball
+
self
.
TOL2
:
constrained
=
magproj
(
u_hat
.
copy
()
,
self
.
data
)
# Apply constraint
constrained
=
magproj
(
self
.
data
,
u_hat
.
copy
())
# Apply constraint
update
=
where
(
self
.
mask
,
u_hat
,
constrained
)
# Masking operation
return
self
.
invprop
(
update
)
# Propagate back
else
:
...
...
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