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

Fixed a couple of bug with the latest changes in the grain structure

parent e351fbfc
No related branches found
No related tags found
No related merge requests found
......@@ -123,9 +123,13 @@ for det_ind = app.det_ind
end
if (is_topotomo && isempty(app.pl_ind))
warning('gtCalculateGrain:wrong_argument', ...
'When mode is "topotomo", "pl_ind" should also be pased');
continue
if (~isfield(acq, 'pl_ind') || isempty(acq.pl_ind))
warning('gtCalculateGrain:wrong_argument', ...
'When mode is "topotomo", "pl_ind" should also be pased');
continue
else
app.pl_ind = acq.pl_ind;
end
end
omstep = gtAcqGetOmegaStep(parameters, det_ind);
......
......@@ -20,7 +20,7 @@ function gr = gtGrainAllblobsFilterOrder(gr, refgr_omind, det_ind)
for ii_f = 1:numel(fnames)
fname = fnames{ii_f};
switch(fname)
case 'srot'
case {'srot', 'rot_s2l', 'rot_l2s'}
srot = gr.allblobs(ii_d).(fname);
srot(:, :, refgr_omind_ind) = srot(:, :, gr_omind_ind);
gr.allblobs(ii_d).(fname) = srot;
......@@ -32,6 +32,8 @@ function gr = gtGrainAllblobsFilterOrder(gr, refgr_omind, det_ind)
prop(refgr_omind_ind, :) = prop(gr_omind_ind, :);
gr.allblobs(ii_d).detector.(subfname) = prop;
end
case 'type'
% Do nothing
otherwise
prop = gr.allblobs(ii_d).(fname);
prop(refgr_omind_ind, :) = prop(gr_omind_ind, :);
......
......@@ -459,9 +459,6 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
is_topotomo = strcmpi(self.parameters.acq(det_ind).type, 'topotomo');
ref_gr = sampler.get_reference_grain();
if (is_topotomo)
ref_gr_topo = sampler.get_reference_grain_topotomo();
end
[orients, orients_ss] = sampler.get_orientations(det_ind);
......@@ -490,11 +487,7 @@ classdef Gt6DReconstructionAlgorithmFactory < handle
fprintf(' - Dealing with blobs/scattering intensities:\n')
if (self.use_predicted_scatter_ints)
fprintf(' * Computing families'' scattering intensities\n')
if (is_topotomo)
[scatter_ints_avg, scatter_ints_ors] = self.get_scattering_intensities(ref_gr_topo, ors_allblobs, det_ind);
else
[scatter_ints_avg, scatter_ints_ors] = self.get_scattering_intensities(ref_gr, ors_allblobs, det_ind);
end
[scatter_ints_avg, scatter_ints_ors] = self.get_scattering_intensities(ref_gr, ors_allblobs, det_ind);
else
fprintf(' * Using blobs'' intensities\n')
scatter_ints_avg = [bl(:).intensity]';
......
......@@ -115,7 +115,7 @@ function shape_funcs = gtDefShapeFunctionsFwdProj(sampler, varargin)
fedpars.ref_eta = ref_gr.allblobs(conf.det_ind).eta;
% Only one lattice allowed for the moment!
num_ors = numel(sampler.lattice(conf.det_ind).gr);
num_ors = size(sampler.R_vectors, 1);
shape_funcs = cell(num_ors, 1);
fprintf('Computing %s shape functions: ', upper(conf.shape_function_type))
......@@ -123,7 +123,7 @@ function shape_funcs = gtDefShapeFunctionsFwdProj(sampler, varargin)
for ii_g = 1:num_ors
num_chars = fprintf('%03d/%03d', ii_g, num_ors);
or = sampler.lattice(conf.det_ind).gr{ii_g};
or = sampler.lattice.gr{ii_g};
or_gv = gv;
or_gv.d = gtMathsRodSum(gv.d, or.R_vector');
......
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