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

gtCalculateGrain: let's re-use some existing function

parent c9567589
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,6 @@ detgeo = parameters.detgeo;
%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% % Crystallography from parameters file
lambda = gtConvEnergyToWavelength(parameters.acq.energy);
%disp('Translating Miller indices into normalized cartesian coordinates for plane normals')
Bmat = gtCrystHKL2CartesianMatrix(cryst.latticepar);
......@@ -128,11 +127,9 @@ end
% d-spacing after applying the strain tensor
dsp_d = drel .* dsp_ref;
% Bragg angles theta in the deformed state
sinth = 0.5 * lambda ./ dsp_d;
% New sin(theta) in deformed state is inversely proportional to elongation
theta = asind(sinth);
% Bragg angles theta and sin(theta) in deformed state is inversely proportional
% to elongation
[theta, sinth] = gtCrystTheta(dsp_d, parameters.acq.energy);
% The plane normals need to be brought in the Lab reference where the
% beam direction and rotation axis are defined.
......
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