summaryrefslogtreecommitdiffstats
path: root/demos/SoftwareX_supp
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2019-03-17 12:42:49 +0000
committerDaniil Kazantsev <dkazanc@hotmail.com>2019-03-17 12:42:49 +0000
commit39c1d5148ff5ad8126daafc1375baafb87631b5b (patch)
tree592e46937844a8a81fcce28814f4fe41d85c3295 /demos/SoftwareX_supp
parentce6ec432cca73780e6f30e7075c0eb1b661a13be (diff)
downloadregularization-39c1d5148ff5ad8126daafc1375baafb87631b5b.tar.gz
regularization-39c1d5148ff5ad8126daafc1375baafb87631b5b.tar.bz2
regularization-39c1d5148ff5ad8126daafc1375baafb87631b5b.tar.xz
regularization-39c1d5148ff5ad8126daafc1375baafb87631b5b.zip
demo change
Diffstat (limited to 'demos/SoftwareX_supp')
-rw-r--r--demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py b/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
index ae2bfba..63f94a7 100644
--- a/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
+++ b/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
@@ -52,9 +52,9 @@ reg_param_tgv_vec = h5f['reg_param_tgv_vec'][:]
erros_vec_tgv = h5f['erros_vec_tgv'][:]
h5f.close()
-index_minSBTV = min(xrange(len(erros_vec_sbtv)), key=erros_vec_sbtv.__getitem__)
-index_minROFLLT = min(xrange(len(erros_vec_rofllt)), key=erros_vec_rofllt.__getitem__)
-index_minTGV = min(xrange(len(erros_vec_tgv)), key=erros_vec_tgv.__getitem__)
+index_minSBTV = np.argmin(erros_vec_sbtv)
+index_minROFLLT = np.argmin(erros_vec_rofllt)
+index_minTGV = np.argmin(erros_vec_tgv)
# assign optimal regularisation parameters:
optimReg_sbtv = reg_param_sb_vec[index_minSBTV]
optimReg_rofllt = reg_param_rofllt_vec[index_minROFLLT]
@@ -163,7 +163,7 @@ RectoolsIR = RecToolsIR(DetectorsDimH = Horiz_det, # DetectorsDimH # detector d
datafidelity='LS',# data fidelity, choose LS, PWLS (wip), GH (wip), Student (wip)
nonnegativity='ENABLE', # enable nonnegativity constraint (set to 'ENABLE')
OS_number = None, # the number of subsets, NONE/(or > 1) ~ classical / ordered subsets
- tolerance = 0.0, # tolerance to stop inner (regularisation) iterations earlier
+ tolerance = 1e-06, # tolerance to stop outer -ADMM iterations earlier
device='gpu')
#%%
print ("Reconstructing with ADMM method using SB-TV penalty")
@@ -198,7 +198,7 @@ plt.imshow(RecADMM_reg_sbtv[:,sliceSel,:],vmin=0, vmax=max_val, cmap="PuOr")
plt.title('ADMM-SBTV (Y-Z) view', fontsize=19)
plt.colorbar(ax=ax4)
plt.show()
-plt.savefig('SBTV_phantom.pdf', format='pdf', dpi=1600)
+#plt.savefig('SBTV_phantom.pdf', format='pdf', dpi=1600)
# calculate errors
Qtools = QualityTools(phantom, RecADMM_reg_sbtv)