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

Acq-parameters: added motor positions

parent 482fc259
No related branches found
No related tags found
No related merge requests found
......@@ -18,11 +18,11 @@ function acq = gtLoadAcquisitionXML(xmlfname, interactive)
acq.date = tmpxml.date;
acq.xdet = tmpxml.projectionSize.DIM_1; % pixels
acq.ydet = tmpxml.projectionSize.DIM_2; % pixels
acq.nproj = tmpxml.tomo_N/2;
acq.nproj = tmpxml.tomo_N / 2;
acq.refon = tmpxml.ref_On;
acq.nref = tmpxml.ref_N;
acq.ndark = tmpxml.dark_N;
acq.pixelsize = tmpxml.pixelSize/1000; % mm
acq.pixelsize = tmpxml.pixelSize / 1000; % mm
acq.count_time = tmpxml.ccdtime;
acq.energy = tmpxml.energy; % keV
acq.dist = tmpxml.distance; % mm
......@@ -35,6 +35,14 @@ function acq = gtLoadAcquisitionXML(xmlfname, interactive)
end
acq.detroi_v_off = tmpxml.projectionSize.ROW_BEG;
acq.detroi_u_off = tmpxml.projectionSize.COL_BEG;
motors_xml = tmpxml.listMotors.motor;
for ii_m = 1:numel(motors_xml)
m = motors_xml(ii_m);
val = m.motorPosition.CONTENT;
unit = m.motorPosition.ATTRIBUTE.unit;
acq.motors.(m.motorName) = convert_to_mm_or_deg(val, unit);
end
else %if .xml not found
if interactive
disp('No .xml file found!');
......@@ -62,5 +70,19 @@ function acq = gtLoadAcquisitionXML(xmlfname, interactive)
acq.detroi_u_off = 0;
acq.detroi_v_off = 0;
end
end % end of function
end
function x = convert_to_mm_or_deg(x, unit)
switch(lower(unit))
case 'm'
x = 1e3 * x;
case {'mm', 'deg'}
case 'um'
x = 1e-3 * x;
case 'nm'
x = 1e-6 * x;
case 'rad'
x = x * 180 / pi;
end
end
......@@ -135,6 +135,18 @@ list.acq(end+1, :) = {'maxradius', ...
'[Computed] Maximum active radius of the detector, for example in case of vignetting', 'double', 0};
list.acq(end+1, :) = {'online', ...
'Is the analysis online?', 'logical', 1};
list.acq(end+1, :) = {'motors', ...
'Scan motor information', 'struct', 2};
list.acq(end+1, :) = {'sample_tilts', ...
'Sample tilts (samr): y, x (in order)', 'double', 2};
list.acq(end+1, :) = {'sample_shifts', ...
'Sample shifts (samt): x, y, z (in order)', 'double', 2};
list.acq(end+1, :) = {'nproj_basetilt', ...
'Topotomo number of basetilt steps', 'double', 2};
list.acq(end+1, :) = {'range_basetilt', ...
'Topotomo basetilt range', 'double', 2};
list.acq(end+1, :) = {'pl_ind', ...
'Topotomo plane normal index, with respect to first acquisition', 'double', 2};
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
......
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