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

Small style change

parent 4b83fff8
No related branches found
No related tags found
No related merge requests found
function theta = gtCrystTheta(dsp,energy)
function [theta, sin_theta] = gtCrystTheta(dsp, energy)
% GTCRYSTTHETA Calculates theta angle given a list of d-spacing
% theta = gtCrystTheta(dsp,energy)
% theta = gtCrystTheta(dsp, energy)
% --------------------------------
%
% INPUT:
......@@ -14,15 +14,9 @@ function theta = gtCrystTheta(dsp,energy)
%
% Version 001 10-07-2013 by LNervo
lambda = gtConvEnergyToWavelength(energy);
if ~exist('energy','var') || isempty(energy)
load parameters
energy = parameters.acq.energy;
% theta from the Bragg's law
sin_theta = lambda ./ (2 .* dsp);
theta = asind(sin_theta);
end
lambda = gtConvEnergyToWavelength(energy);
% theta from the Bragg's law
theta = asind(lambda./(2*dsp));
end % end of function
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