diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-12 10:25:21 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-04-12 10:25:21 +0100 |
commit | 58f5ce047b063d53906e38047b6ae744ccdbd4eb (patch) | |
tree | 611d46727147c2473f81c35174a6c105e830e94c /Wrappers/Python/ccpi | |
parent | aa99eb8a9bd47ecd6e4d3d1e8c9f0cfbefb4f7bb (diff) | |
download | regularization-58f5ce047b063d53906e38047b6ae744ccdbd4eb.tar.gz regularization-58f5ce047b063d53906e38047b6ae744ccdbd4eb.tar.bz2 regularization-58f5ce047b063d53906e38047b6ae744ccdbd4eb.tar.xz regularization-58f5ce047b063d53906e38047b6ae744ccdbd4eb.zip |
dTV method added
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r-- | Wrappers/Python/ccpi/filters/regularisers.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/Wrappers/Python/ccpi/filters/regularisers.py b/Wrappers/Python/ccpi/filters/regularisers.py index 039daab..c6723fa 100644 --- a/Wrappers/Python/ccpi/filters/regularisers.py +++ b/Wrappers/Python/ccpi/filters/regularisers.py @@ -2,8 +2,8 @@ script which assigns a proper device core function based on a flag ('cpu' or 'gpu') """ -from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU -from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU +from ccpi.filters.cpu_regularisers_cython import TV_ROF_CPU, TV_FGP_CPU dTV_FGP_CPU +from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU dTV_FGP_GPU def ROF_TV(inputData, regularisation_parameter, iterations, time_marching_parameter,device='cpu'): @@ -42,3 +42,28 @@ def FGP_TV(inputData, regularisation_parameter,iterations, else: raise ValueError('Unknown device {0}. Expecting gpu or cpu'\ .format(device)) +def FGP_dTV(inputData, refdata, regularisation_parameter, iterations, + tolerance_param, eta_const, methodTV, nonneg, printM, device='cpu'): + if device == 'cpu': + return dTV_FGP_CPU(inputData, + refdata, + regularisation_parameter, + iterations, + tolerance_param, + eta_const, + methodTV, + nonneg, + printM) + elif device == 'gpu': + return dTV_FGP_GPU(inputData, + refdata, + regularisation_parameter, + iterations, + tolerance_param, + eta_const, + methodTV, + nonneg, + printM) + else: + raise ValueError('Unknown device {0}. Expecting gpu or cpu'\ + .format(device)) |