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

Acq: small fixed to account for multiple detectors and single acq field (should be changed)

parent 22cc85b7
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,11 @@ function omega_step = gtGetOmegaStepDeg(parameters, det_ind) ...@@ -7,7 +7,11 @@ function omega_step = gtGetOmegaStepDeg(parameters, det_ind)
omega_step = parameters.detgeo(det_ind).omstep; omega_step = parameters.detgeo(det_ind).omstep;
elseif (isfield(parameters.labgeo, 'omstep')) elseif (isfield(parameters.labgeo, 'omstep'))
omega_step = parameters.labgeo.omstep; omega_step = parameters.labgeo.omstep;
else elseif (numel(parameters.acq) > 1 || det_ind == 1)
omega_step = 180 / parameters.acq(det_ind).nproj; omega_step = 180 / parameters.acq(det_ind).nproj;
else
% This is the last resort! It should become more verbose in the
% future, in case it happens!
omega_step = 180 / parameters.acq(1).nproj;
end end
end end
\ No newline at end of file
function totproj = gtGetTotNumberOfImages(parameters, det_index) function totproj = gtGetTotNumberOfImages(parameters, det_index)
if (~exist('det_index', 'var') || isempty(det_index)) if (~exist('det_index', 'var') || isempty(det_index) ...
|| (numel(parameters.acq) == 1 && det_index > 1))
% We should complain more about the third possibility
det_index = 1; det_index = 1;
end end
......
function w_tab = gtGrainAnglesTabularFix360deg(w_tab, ref_int_ws, parameters) function w_tab = gtGrainAnglesTabularFix360deg(w_tab, ref_int_ws, parameters, det_index)
if (exist('parameters', 'var') && ~isempty(parameters)) if (exist('parameters', 'var') && ~isempty(parameters))
num_images = gtGetTotNumberOfImages(parameters); if (~exist('det_index', 'var') || isempty(det_index))
det_index = 1;
end
num_images = gtGetTotNumberOfImages(parameters, det_index);
% Let's treat those blobs at the w edge 360->0 % Let's treat those blobs at the w edge 360->0
% (from the sampled orientations perspective) % (from the sampled orientations perspective)
......
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