kunyang
Dear all,
I've just upgraded TOPAS to new version V5. In the old version of TOPAS, we can't get error of d_spacing for each individual peaks in the whole TOF patterns, but the new version can.Could anyone explain how to get such errors?
Another question is: I've already fitted profiles well by rietveld refinement(using "str"). However, in "str" mode, it can't directly display the hkl_d_2th (such kind of hkl list) in INP files in jedit but only can create a txt file. Is there anyway to display the hkl list in INP files(like the way in "hkl_Is" mode)?
I'd appreciate any help and thanks a lot in advance.
johnsoevans
Tof peak fitting is discussed on the wiki.
You can output hkl lists at the end of a refinement to a separate file. As these quantities aren't directly refined it doesn't make sense to have them in the .inp file.
kunyang
Hi John
Thanks for getting back to me.
I thought in the new version it could update the .inp files with the newly calculated d spacings or 2 theta angles for each peak in the hkl block. OK, now I got it that it still can not.
Could you help me for my first question? I want to get the error of d_spacing for each peak. How can I do it?
Many many thanks~~~
johnsoevans
If you're doing a str fit you cant qoute uncertainties on each peak position. The uncertainties could be derived from those in the cell and any instrument corrections refined. If you do peak fitting (see wiki) you can get individual uncertainties.
alancoelho
Hi Kunyang
John is correct in that the program does not directly write errors for d-spacings for str phases. It can be done however by writing d-spacing as a function of lattice parameters.
The equations necessary are:
fn pi() = 3.14159265358979;
fn Cos_d(x) = Cos(x pi() / 180);
fn Sin_d(x) = Sin(x pi() / 180);
fn ax() = Get(a);
fn bx() = Get(b) Cos_d(Get(ga));
fn by() = Get(b) Sin_d(Get(ga));
fn cx() = Get(c) Cos_d(Get(be));
fn cy() = Get(c) (Cos_d(Get(al))- Cos_d(Get(be)) * Cos_d(Get(ga))) / Sin_d(Get(ga));
fn cz() = Sqrt(Get(c)^2 - cx()^2 - cy()^2);
fn vol() = ax() by() cz();
fn Ax() = by() cz() / vol();
fn Ay() = -bx() cz() / vol();
fn Az() = (bx() cy() - by() cx()) / vol();
fn By() = ax() cz() / vol();
fn Bz() = -ax() cy() / vol();
fn Cz() = ax() by() / vol();
fn d2_inv(h, k, l)
{
return
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();
}
fn d(h, k, l) = 1 / Sqrt(d2_inv(h, k, l));
Including the d(h,k,l) in a prm in test_examples\alvo4a.inp for example we get:
prm = d(1, 2, 3); : 1.78825`_0.00003
Thus the error for d-spacing for the (1 2 3) reflection is 0.00003 Angstroms.
To write all d-spacing error to a file then you coudl use:
phase_out SOME_FILE.TXT append load out_record out_fmt out_eqn
{
"%4.0f" = H;
"%4.0f" = K;
"%4.0f" = L;
" %11.5f" = D_spacing;
" %11.5f\n" = d(H, K, L);
}
cheers
alan
kunyang
Thank you very much Alan and John.
I've managed it. The errors of d_spacing obtained are very small however. I guess I'm going to ignore it.
@Alan
In case someone would also be interested in it, I post here a problem that I met.
Following Alan's guide, it works well if we only output the interested HKL peaks using prm = d(h, k, l); : 0. But for the method of writing all d_spacing error for all peaks(the second one), it can make a TXT file, but the last two columns in the obtained list are the same values (d_spacing values), which should be d_spacing & error.
cheers,
Kunyang