diff options
-rw-r--r-- | src/Python/CMakeLists.txt | 6 | ||||
-rw-r--r-- | src/Python/fista_module.cpp | 4 | ||||
-rw-r--r-- | src/Python/test/test_reconstructor-os.py | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/Python/CMakeLists.txt b/src/Python/CMakeLists.txt index 66630cb..1b73380 100644 --- a/src/Python/CMakeLists.txt +++ b/src/Python/CMakeLists.txt @@ -154,20 +154,20 @@ add_custom_target(regularizers COMMAND bash compile.sh WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${update_code} + DEPENDS update_code ) add_custom_target(install-fista COMMAND conda install --force --use-local ccpi-fista=${CIL_VERSION} -c ccpi -c conda-forge WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${fista}) + ) add_custom_target(install-regularizers COMMAND conda install --force --use-local ccpi-regularizers=${CIL_VERSION} -c ccpi -c conda-forge WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS ${fista}) + ) ### add tests #add_executable(RegularizersTest ) diff --git a/src/Python/fista_module.cpp b/src/Python/fista_module.cpp index 94d156c..aca3be0 100644 --- a/src/Python/fista_module.cpp +++ b/src/Python/fista_module.cpp @@ -312,7 +312,7 @@ bp::list FGP_TV(np::ndarray input, double d_mu, int iter, double d_epsil, int me int number_of_dims, dimX, dimY, dimZ, ll, j, count; float *A, *D = NULL, *D_old = NULL, *P1 = NULL, *P2 = NULL, *P3 = NULL, *P1_old = NULL, *P2_old = NULL, *P3_old = NULL, *R1 = NULL, *R2 = NULL, *R3 = NULL; - float lambda, tk, tkp1, re, re1, re_old, epsil, funcval, mu; + float lambda, tk, tkp1, re, re1, re_old, epsil, funcval; //number_of_dims = mxGetNumberOfDimensions(prhs[0]); //dim_array = mxGetDimensions(prhs[0]); @@ -901,7 +901,7 @@ bp::list TGV_PD(np::ndarray input, double d_lambda, double d_alpha1, double d_al bp::list result; int number_of_dims, /*iter,*/ dimX, dimY, dimZ, ll; //const int *dim_array; - float *A, *U, *U_old, *P1, *P2, *P3, *Q1, *Q2, *Q3, *Q4, *Q5, *Q6, *Q7, *Q8, *Q9, *V1, *V1_old, *V2, *V2_old, *V3, *V3_old, lambda, L2, tau, sigma, alpha1, alpha0; + float *A, *U, *U_old, *P1, *P2, *Q1, *Q2, *Q3, *V1, *V1_old, *V2, *V2_old, lambda, L2, tau, sigma, alpha1, alpha0; //number_of_dims = mxGetNumberOfDimensions(prhs[0]); //dim_array = mxGetDimensions(prhs[0]); diff --git a/src/Python/test/test_reconstructor-os.py b/src/Python/test/test_reconstructor-os.py index 6c82ae0..3f419cf 100644 --- a/src/Python/test/test_reconstructor-os.py +++ b/src/Python/test/test_reconstructor-os.py @@ -78,12 +78,16 @@ fistaRecon.setParameter(ring_alpha = 21) fistaRecon.setParameter(ring_lambda_R_L1 = 0.002) +#reg = Regularizer(Regularizer.Algorithm.FGP_TV) +#reg.setParameter(regularization_parameter=0.005, +# number_of_iterations=50) reg = Regularizer(Regularizer.Algorithm.LLT_model) reg.setParameter(regularization_parameter=25, time_step=0.0003, tolerance_constant=0.0001, number_of_iterations=300) + ## Ordered subset if True: subsets = 16 @@ -306,7 +310,7 @@ if True: # for slices: # out = regularizer(input=X) print ("regularizer") - #X = reg(input=X) + X = reg(input=X)[0] ## FINAL |