kunyang
I have refined some TOF data. By using "hkl_Is", we can get a list "load hkl_m_d_t I". Now I want to get the error of d-spacing for all these hkl individual peaks, how can I do?
"do error" doesn't work for d-spacing here, only for the intensity. I post part of my refinment below.
load hkl_m_d_th2 I
2 1 1 12 1.54662 28364.40299 @ 9.23339301`_0.0258480296
1 1 6 12 1.60177 29375.97836 @ 93.7869742`_0.0343453843
0 2 4 6 1.74016 31914.41555 @ 19.5656829`_0.0172452435
alancoelho
Version 4.1 wont give an error for d-spacing in this context.
Version 5 however can but it means making an entry for each d-spacing; for example:
str...
fn D_spacing_eqn(h, k, l)
{
return 1 /
Sqrt(
h^2 (Ax^2 + Ay^2 + Az^2) +
k^2 (By^2 + Bz^2) +
l^2 (Cz^2) +
2 h k (Ay By + Az Bz) +
2 h l Az Cz +
2 k l Bz Cz
);
}
local a_ = Get(a);
local b_ = Get(b);
local c_ = Get(c);
local al_ = Get(al);
local be_ = Get(be);
local ga_ = Get(ga);
local cv_ = Get(cell_volume); : 0
' Alternate Cell Volume
local = a_ b_ c_ Sqrt(1 + 2 cal cbe cga - cal^2 - cbe^2 - cga^2); : 0
local cal = Cos(al_ Pi/180);
local cbe = Cos(be_ Pi/180);
local cga = Cos(ga_ Pi/180);
local sga = Sin(ga_ Pi/180);
' Cartesian lattice parameters
local ax = a_;
local bx = b_ cga;
local by = b_ sga;
local cx = c_ cbe;
local cy = c_ (cal - cbe cga) / sga;
local cz = Sqrt(c_^2 - cx^2 - cy^2);
' Reciprocal lattice parameters
local Ax = by cz / cv_;
local Ay = -bx cz / cv_;
local Az = (bx cy - by cx) / cv_;
local By = cz ax / cv_;
local Bz = -cy ax / cv_;
local Cz = ax by / cv_;
To output the error in d-spacing then you would need to write for each hkl the following:
local = D_spacing_eqn(4, -5, -2); : 1.21152`_0.00077
local = D_spacing_eqn(...
etc...
where (4,-5,-2) is an example hkl.
A good editor makes entering the necessary lines easy