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

Detgeo: fixed small bug in calculation of detrefpos

parent 35853926
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,7 @@ end % end of function
% SUB-FUNCTIONS
%%%%%%%%%%%%%%%%%%%%%
function [dy, dz] = sfDetrefpos(acq_bb, par_labgeo)
function d_yz = sfDetrefpos(acq_bb, par_labgeo)
% Returns the detector lateral (Y) and vertical (Z) positions which approximately
% account for an offset of the sample bounding box position:
% Y lateral: It assumes that the projection of the rotation axis is at the
......@@ -93,6 +93,6 @@ function [dy, dz] = sfDetrefpos(acq_bb, par_labgeo)
% box will have coordinate Z=0.
% It assumes rotpos = [0 0 0] and view into the beam.
dy = -((acq_bb(1) + acq_bb(3)/2) - par_labgeo.detrefu) * par_labgeo.pixelsizeu;
dz = ((acq_bb(2) + acq_bb(4)/2) - par_labgeo.detrefv) * par_labgeo.pixelsizev;
d_yz(1) = -((acq_bb(1) + acq_bb(3)/2) - par_labgeo.detrefu) * par_labgeo.pixelsizeu;
d_yz(2) = ((acq_bb(2) + acq_bb(4)/2) - par_labgeo.detrefv) * par_labgeo.pixelsizev;
end
\ No newline at end of file
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