tuerdi1982
Hi
In Topas, during Rietveld refinement if I try to extract the refined values of various phases I got an error message as shown it here:
"*** Macro recursion debth greater than 12 and thus a possible infinite loop".
Is there anyway to fix this problem, other than reducing the number of output parameters?
To extraction I had used:
out "results.txt"
Out_String("Rwp")
Out(Get (r_wp), " %11.5f"\n)
Out_String("phase1_a")
Out(phase1, " %11.5f"\n)
Out_String("phase1_c")
Out(phase1_c, " %11.5f"\n)
Out_String("phase1_v")
........
When I reduce the number of output parameters below 12 it works fine, otherwise no. Since I am working with multiphases I have more than 12 parameters need to extract. I can able to extract all of them just running the refinement several times and each time extracting 12 parameters, but this is really inconvenient. It will be very much appreciated if some one will help me to solve this problem or tell me another way can do the same job.
All the best
johnsoevans
You can definitely write out more parameters than this. I don't see immediately where your problem is coming from. Try initially removing the "Out_String" lines and see if the problem disappears. If not, try commenting the Out lines one by one until the problem goes away. Once you find the offending line it should be easy to spot the cause of the problem, correct it and reintroduce the other lines.
te37v
thank you for goods.
tuerdi1982
Thank you.
Problem just solved. If I use the capital letter in both out_string and out, it will gives the error message. If I just change the capital letter to the lower case like examples below, it worked fine.
Out_String("Zero_Error")
Out(zero_error, " %11.5f"\n)
Out_String("phase1_a")
Out(phase1_a, " %11.5f"\n)
tobias
I have a similar problem. When I run a Rietveld refinement and try to use Out( ) on the generated results of a structure, I succeed for parameters (like scale, weight_percent, a, b, c), but I get the mentioned error message if I want to output the result of a macro (e.g. CS_L or K_Factor_WP). I am working with Topas Academic 7.
This works: Out(Get(scale), "%f", "%f")
This does not: Out(Get(CS_L), "%f", "%f")
Does anybody have an idea how to solve this problem?
johnsoevans
You're trying to output the name of the macro, not the parameter. I guess when trying to create the output line in its more fundamental language, topas keeps substituting in the CS_L macro multiple times.
You need to give the parameter a name in the refinement:
CS_L(sizeL, 300.034495`)
and then output that parameter name.
tobias
Thank you for your answer.
Is there another way to obtain the parameter value without the need to name the parameter (like Get() but different)?
I am asking because I have several phases in my samples and I would like to output some phase specific results of the refinement. However, I do not want to write extra lines for each str and to adapt each input file individually. The idea I came up with, was to write something that applies to all strs.
Something like this:
for strs
{
Out(Get(phase_name), "\n%s")
Out(Get(K_Factor_WP), "\t%.2f") 'this line needs replacement
}
rowlesmr
Use local parameters
xdd
...
str
local csL 203
...
str
local csL 157
...
for strs {
Out(csL, " %11.5f"\n) 'or whatever the code is that you need.
}