Skip to content
Snippets Groups Projects
Commit 2a72af0a authored by preischig's avatar preischig
Browse files

Added theta update according to beam energy.


Signed-off-by: default avatarpreischig <preischig@gmail.com>
parent e5f778d1
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,11 @@ while (~phase_ok)
if (ismember(lower(test), {'y', 'yes'}))
%%%% get complete information from another parameters file %%%%%
parameters = sfGetInfoFromParameters(parameters, phase_ndx);
% Update reflections for actual photon energy
% !!! intensity missing, but it is not yet used in the processing
parameters.cryst = sfUpdateReflections(parameters.cryst, parameters.acq.energy);
% this is a "new" experiment, set up the names and read from the datafile
fprintf('Please modify the description for this phase (%d)\n', phase_ndx);
parameters = sfModifyMaterialDescription(parameters, phase_ndx);
......@@ -356,4 +361,20 @@ function parameters = sfGetSymmCrystInfo(parameters, phase_id)
end % end of sfGetSymmCrystInfo
function cryst = sfUpdateReflections(cryst, energy)
% Updates the reflection data according to a new photon energy
% Update the d-spacing info in cryst according to new lattice parameters.
% Bmat = gtCrystHKL2CartesianMatrix(cryst.latticepar);
% cryst.dspacing = gtCrystDSpacing(cryst.hkl, Bmat);
% cryst.dspacingsp = gtCrystDSpacing(cryst.hklsp, Bmat);
% Update the theta info according to new photon energy
lambda = gtConvEnergyToWavelength(energy);
cryst.theta = asind(0.5*lambda./cryst.dspacing);
cryst.thetasp = asind(0.5*lambda./cryst.dspacingsp);
% Update the intensity info: MISSING !
cryst.int = [];
cryst.intsp = [];
end
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