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
cc079555
Commit
cc079555
authored
May 12, 2017
by
alexander.dornheim
Browse files
Added more testing for tasse AP
parent
829ca38b
Changes
3
Hide whitespace changes
Inline
Side-by-side
proxtoolbox/Algorithms/AP.py
View file @
cc079555
...
...
@@ -83,7 +83,7 @@ class AP(Algorithm):
Relerrs
=
change
.
copy
()
tmp1
=
prox2
.
work
(
u
);
while
iters
<
maxiter
and
change
[
iters
]
>=
tol
:
iters
+=
1
;
...
...
@@ -119,7 +119,7 @@ class AP(Algorithm):
change
[
iters
]
=
sqrt
(
tmp_change
);
gap
[
iters
]
=
sqrt
(
tmp_gap
);
u
=
tmp_u
.
copy
()
;
u
=
tmp_u
;
tmp
=
prox1
.
work
(
u
);
tmp2
=
prox2
.
work
(
u
);
...
...
proxtoolbox/Problems/Phase/JWST_in.py
View file @
cc079555
...
...
@@ -70,7 +70,7 @@ new_config = {
# able to control (without too much damage)'''
# Algorithm:
'algorithm'
:
'
RAAR
'
,
#'Accelerated_AP_product_space';
'algorithm'
:
'
AP
'
,
#'Accelerated_AP_product_space';
'numruns'
:
1
,
# the only time this parameter will
# be different than 1 is when we are
# benchmarking...not something a normal user
...
...
@@ -88,7 +88,7 @@ new_config = {
#maximum number of iterations and tolerances
'MAXIT'
:
500
,
'MAXIT'
:
1
,
'TOL'
:
1e-8
,
# relaxaton parameters in RAAR, HPR and HAAR
...
...
proxtoolbox/Problems/Phase/phase.py
View file @
cc079555
...
...
@@ -241,13 +241,17 @@ class Phase(Problem):
print
(
self
.
config
[
'proxoperators'
])
if
self
.
config
[
'experiment'
]
==
'JWST'
:
if
self
.
config
[
'MAXIT'
]
==
1
:
f
=
h5py
.
File
(
'Phase_test_data/u1_1.mat'
)
elif
self
.
config
[
'MAXIT'
]
==
500
:
f
=
h5py
.
File
(
'Phase_test_data/u1_500.mat'
)
else
:
print
(
"No file available to compare to."
)
return
if
self
.
config
[
'algorithm'
]
==
'RAAR'
:
if
self
.
config
[
'MAXIT'
]
==
1
:
f
=
h5py
.
File
(
'Phase_test_data/u1_1.mat'
)
elif
self
.
config
[
'MAXIT'
]
==
500
:
f
=
h5py
.
File
(
'Phase_test_data/u1_500.mat'
)
else
:
print
(
"No file available to compare to."
)
return
elif
self
.
config
[
'algorithm'
]
==
'AP'
:
f
=
h5py
.
File
(
'Phase_test_data/JWST_u1_ap_'
+
str
(
self
.
config
[
'MAXIT'
])
+
'.mat'
)
u1
=
f
[
'u1'
].
value
.
view
(
np
.
complex
)
else
:
if
self
.
config
[
'algorithm'
]
==
'RAAR'
:
...
...
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