Skip to content
Snippets Groups Projects
Commit 6314361a authored by Nicola Vigano's avatar Nicola Vigano
Browse files

ODF-solvers: added ospace oversampling

parent 510f7402
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ classdef GtGrainODFwSolver < handle
St_ws;
tau_ws;
num_iter = 0;
num_iter = 50;
verbose = false;
end
......@@ -42,11 +42,13 @@ classdef GtGrainODFwSolver < handle
conf = struct( ...
'algorithm', 'sirt', ...
'lambda', 1e-2, ...
'ospace_oversize', 1.1, ...
'ospace_oversize', 1, ...
'ospace_oversampling', 0, ...
'det_index', 1 );
conf = parse_pv_pairs(conf, varargin);
self.build_orientation_sampling(ref_gr, conf.ospace_oversize, conf.det_index);
self.build_orientation_sampling(ref_gr, conf.det_index, ...
conf.ospace_oversize, conf.ospace_oversampling);
bls = self.sampler.bl(self.sampler.selected);
self.build_sinogram();
......@@ -68,10 +70,10 @@ classdef GtGrainODFwSolver < handle
end
methods (Access = public) % Low Level API
function build_orientation_sampling(self, ref_gr, oversize, det_index)
function build_orientation_sampling(self, ref_gr, det_index, oversize, oversampling)
self.sampler = GtOrientationSampling(self.parameters, ref_gr, ...
'verbose', self.verbose, 'detector_index', det_index);
self.sampler.make_grid_estim_ODF_resoluion('cubic', 0, oversize);
'verbose', self.verbose && false, 'detector_index', det_index);
self.sampler.make_grid_estim_ODF_resoluion('cubic', -oversampling, oversize);
self.size_volume = size(self.sampler.lattice.gr);
end
......@@ -202,9 +204,6 @@ classdef GtGrainODFwSolver < handle
function solve_sirt(self)
c = tic();
if (~self.num_iter)
self.num_iter = 100;
end
residuals = zeros(self.num_iter, 1);
x0 = self.bw(self.bp(self.fw(self.sino)));
......@@ -241,9 +240,6 @@ classdef GtGrainODFwSolver < handle
function solve_cplsnn(self)
c = tic();
if (~self.num_iter)
self.num_iter = 50;
end
residuals = zeros(self.num_iter, 1);
p = gtMathsGetSameSizeZeros(self.S__ws);
......@@ -278,9 +274,6 @@ classdef GtGrainODFwSolver < handle
function solve_cplsl1nn(self, lambda)
c = tic();
if (~self.num_iter)
self.num_iter = 50;
end
residuals = zeros(self.num_iter, 1);
p = gtMathsGetSameSizeZeros(self.S__ws);
......@@ -324,9 +317,6 @@ classdef GtGrainODFwSolver < handle
rescaled_sino = self.sino ./ norm(self.sino(:)) .* self.get_num_ws();
c = tic();
if (~self.num_iter)
self.num_iter = 50;
end
residuals = zeros(self.num_iter, 1);
p = gtMathsGetSameSizeZeros(self.S__ws);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment