summaryrefslogtreecommitdiffstats
path: root/Wrappers
diff options
context:
space:
mode:
authordkazanc <dkazanc@hotmail.com>2019-02-25 10:07:50 +0000
committerdkazanc <dkazanc@hotmail.com>2019-02-25 10:07:50 +0000
commitdc5a92771dcf9bfd262ba34b0fc8a1c2df40897d (patch)
tree26cc34005e287f3ca3bf2d15a95a2c1add6400eb /Wrappers
parent3c9af3e44778005948f6727c3e8280fcb6d3a3c9 (diff)
downloadregularization-dc5a92771dcf9bfd262ba34b0fc8a1c2df40897d.tar.gz
regularization-dc5a92771dcf9bfd262ba34b0fc8a1c2df40897d.tar.bz2
regularization-dc5a92771dcf9bfd262ba34b0fc8a1c2df40897d.tar.xz
regularization-dc5a92771dcf9bfd262ba34b0fc8a1c2df40897d.zip
demo upf
Diffstat (limited to 'Wrappers')
-rw-r--r--Wrappers/Python/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py34
1 files changed, 6 insertions, 28 deletions
diff --git a/Wrappers/Python/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py b/Wrappers/Python/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
index 148fdcc..a79d0a3 100644
--- a/Wrappers/Python/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
+++ b/Wrappers/Python/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
@@ -79,8 +79,8 @@ RectoolsIR = RecToolsIR(DetectorsDimH = Horiz_det, # DetectorsDimH # detector d
tolerance = 1e-08, # tolerance to stop outer iterations earlier
device='gpu')
#%%
-param_space = 20
-reg_param_sb_vec = np.linspace(0.001,0.03,param_space,dtype='float32') # a vector of parameters
+param_space = 30
+reg_param_sb_vec = np.linspace(0.03,0.15,param_space,dtype='float32') # a vector of parameters
erros_vec_sbtv = np.zeros((param_space)) # a vector of errors
print ("Reconstructing with ADMM method using SB-TV penalty")
@@ -99,8 +99,8 @@ for i in range(0,param_space):
plt.figure()
plt.plot(erros_vec_sbtv)
#%%
-param_space = 20
-reg_param_rofllt_vec = np.linspace(0.001,0.03,param_space,dtype='float32') # a vector of parameters
+param_space = 30
+reg_param_rofllt_vec = np.linspace(0.03,0.15,param_space,dtype='float32') # a vector of parameters
erros_vec_rofllt = np.zeros((param_space)) # a vector of errors
print ("Reconstructing with ADMM method using ROF-LLT penalty")
@@ -120,8 +120,8 @@ for i in range(0,param_space):
plt.figure()
plt.plot(erros_vec_rofllt)
#%%
-param_space = 20
-reg_param_tgv_vec = np.linspace(0.001,0.03,param_space,dtype='float32') # a vector of parameters
+param_space = 30
+reg_param_tgv_vec = np.linspace(0.03,0.15,param_space,dtype='float32') # a vector of parameters
erros_vec_tgv = np.zeros((param_space)) # a vector of errors
print ("Reconstructing with ADMM method using TGV penalty")
@@ -139,26 +139,4 @@ for i in range(0,param_space):
plt.figure()
plt.plot(erros_vec_tgv)
-#%%
-param_space = 1
-reg_param_diff4th = np.linspace(10,100,param_space,dtype='float32') # a vector of parameters
-erros_vec_diff4th = np.zeros((param_space)) # a vector of errors
-
-print ("Reconstructing with ADMM method using Diff4th penalty")
-for i in range(0,param_space):
- RecADMM_reg_diff4th = RectoolsIR.ADMM(projdata_norm,
- rho_const = 2000.0, \
- iterationsADMM = 15, \
- regularisation = 'Diff4th', \
- regularisation_parameter = reg_param_diff4th[i],\
- edge_param = 0.03,
- time_marching_parameter = 0.001,\
- regularisation_iterations = 750)
- # calculate errors
- Qtools = QualityTools(phantom, RecADMM_reg_diff4th)
- erros_vec_diff4th[i] = Qtools.rmse()
- print("RMSE for regularisation parameter {} for ADMM-Diff4th is {}".format(reg_param_diff4th[i],erros_vec_diff4th[i]))
-
-plt.figure()
-plt.plot(erros_vec_diff4th)
#%% \ No newline at end of file