Forum: Forums topas RSS
Error using the "phase_out" keyword
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: Error using the "phase_out" keyword
Hi everyone,

For making a quality plot for Rietveld refinements I use the keyword "phase_out" to get HKL ticks with the following code:

phase_out "phase_output.txt" append load out_record out_fmt out_eqn {
" %3.0f" = H;
" %3.0f" = K;
" %3.0f" = L;
" %3.0f" = M;
" %11.5f" = D_spacing;
" %11.5f\n" = 2 Rad Th;
     }


Recently I had a powder pattern with a large background and used the code in the following link to fit the background: http://topas.dur.ac.uk/topaswiki/doku.php?id=num_runs_2_0_determine_background_1_refine_structure&s%5b%5d=background

After fitting the background the "phase_out" keyword gives the following error when running the refinement:
"Cannot locate p_out from weighting in data structures"

When I do not fit the background the "phase_out" keyword works fine. And without the "phase_out" keyword the refinement of the background works. Anyone who has a clue why this error arises (I am using TOPAS v6)?

Best Regards
Andreas
AlanCoelho #2
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
Hi andrea

Send me your INP and data file and I will have a look
cheers
alan
AlanCoelho #3
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
In your INP file you have:

        #if (Run_Number == 0)  
                weighting...
    #else
        str...
    #endif
   
    phase_out ...


There's no phase when Run_Number == 0; phase_out is complaining about this. Place a condition around phase_out.
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 Alan

Thank you very much for your help.

I think I oversaw the meaning of the "Run_Number" when I included the code into the .INP file. By changing the Run_Number to the number 2 instead of 0 both places it is present, the "phase_out" keyword works again. The only problem is that my output file now has the data included twice, but it can be deleted manually. Maybe that it is because I defined "num_runs 2".

What I don't understand is that the refinement looks very weird if the Run_Number is given the value 1. Is that because the background is refined alone in the first run and then first included for the actual refinement of the structure in the second run?

Cheers
Andreas
AlanCoelho #5
Member since Aug 2011 · 323 posts
Group memberships: Members
Show profile · Link to this post
Without looking at your file again I'm not sure what should happen when Run_Number is 1. Note however that the first run Run_Number is zero as counting starts at zero in this case.
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, 14:38:40 (UTC +00:00)