Forum: Forums topas RSS
"out.txt" file reports different R_Bragg than reported in the ".INP" file
andreasdrejer #1
User title: Andreas Drejer
Member since Oct 2019 · 10 posts · Location: Odense, Denmark
Group memberships: Members
Show profile · Link to this post
Subject: "out.txt" file reports different R_Bragg than reported in the ".INP" file
Hi all

When I run a standard Rietveld refinement I also make a text file reporting agreement factors. It works fine for e.g. r_wp, but I recently noticed that the R_Bragg values reported in my text file are different from the ones in the .INP file (I update my INP file after the refinement). For example, in a refinement with two phases, phase one has a R_Bragg value of 12.89 in the INP, but the reported value is 11.51. For the second phase the INP file reports 11.05 while the text file reports a value of 15.73. I suspect the reported values in the text file are from from e.g. the first iteration of the refinement, but I don't know for sure. I tried to set the number of iterations to 1, but the problem is still the same.

From my INP file (how I give r_bragg a parameter name and get it out in a text file):

str
       a
       b
       c
       ....
       ....
       r_bragg r_bragg1  12.8889705



out "Agreement_factors.txt" append    
Out_String("R_Bragg_phase1 = \n")
Out(r_bragg1, "%11.2f\n")


Hope someone can give an advise or solution to my problem. I use TOPAS V6.

Best regards
Andreas
rowlesmr #2
Member since Oct 2011 · 245 posts
Group memberships: Members
Show profile · Link to this post
Instead of giving R_Bragg a parameter name and referencing it in your output bbit, can you try "Out(Get(r_bragg), "%11.2f\n")", and see how that compares?
--
Matthew
AlanCoelho #3
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
Hi Andreas

I an not able to reproduce the problem. I just ran test example PbsO4a.INP with the following:

    xdd ...
        r_wp 0
        str...
            r_bragg 0

    out aac.txt
        Out(Get(r_wp),     " %11.5f\n")
        Out(Get(r_bragg), " %11.5f\n")
        Out(r_bragg_1,     " %11.5f\n")

In the OUT file I get:

    xdd ...
        r_wp 7.87871059
        str...
            r_bragg r_bragg_1 2.67249449
           
and in aac.txt I get               

          7.87871
      2.67249
      2.67249
     
If you send me a simplified version of your INP/data file I will have a look.

cheers
alan
andreasdrejer #4
User title: Andreas Drejer
Member since Oct 2019 · 10 posts · Location: Odense, Denmark
Group memberships: Members
Show profile · Link to this post
Hi again

Matthew: I don't use "Out(Get(r_bragg), "%11.2f\n")" because I want the R_Bragg of each of the two phases present in the data. Even though I just tried to see what result it would give me. And as expected it gives R_Bragg for the second phase (because it is the last in the INP file), but not the value in the INP file. But thanks for the suggestion.

Thank you Alan, I have send you my data/INP files

Cheers
Andreas
This post was edited on 2020-04-22, 13:03 by andreasdrejer.
AlanCoelho #5
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
The r_bragg reported in the INP file is correct. In the OUT file it is not correct. There is a reporting bug and I am looking into it.

The problem is related to the use XYE files and the use of:

    x_calculation_step = Yobs_dx_at(Xo);

There is a work around for your data which is of XYE type data. Your data is of equal x-axis steps with a step size of 0.009228. Instead of using x_calculation_step, use:

    rebin_with_dx_of 0.009228

This then reports the correct r_bragg in your TXT file.

I will fix the problem and get back to you.
andreasdrejer #6
User title: Andreas Drejer
Member since Oct 2019 · 10 posts · Location: Odense, Denmark
Group memberships: Members
Show profile · Link to this post
Hi Alan

Thank you very much, the use of "rebin_with_dx_of" works and I now get the same R_Bragg values in the INP and OUT.TXT files

Cheers!
Andreas
AlanCoelho #7
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
I have fixed the problem for Version 7.

For Version 6 the problem occurs when r_bragg is outputted using 'out' and when using XYE files. Typically XYE files are detected as constant step size if the step size is indeed constant. In the present case round-off prevented this. The work around is as given above.

I will put  note in the Topics section of the Wiki (when I remember how to logon in that section).

alan
andreasdrejer #8
User title: Andreas Drejer
Member since Oct 2019 · 10 posts · Location: Odense, Denmark
Group memberships: Members
Show profile · Link to this post
I tried to look through some older refinements I did with .XY files and here the problem was the same. Again the use of
"rebin_with_dx_of" worked to get the same R_Bragg values in the out.txt as in the INP file.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Not logged in. · Lost password · Register
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-11-29, 13:46:55 (UTC +00:00)