mathiasmorch
Is it possible to extract phase contributions from multiple phases to the same file using Get(phase_ycalc)?
Is there a keyword for Get(phase_ycalc), or a trick to structure the .inp file so multiple phase contributions can be written to the same file.
Say I have 3 phases and want to extract their contribution to the pattern
xdd
str
...
str
...
str
...
If I use the following only the third str is put in Get(Phase_Ycalc):
phase_out_X Phase.txt load out_record out_fmt out_eqn {
" %11.5f" = X;
" %11.5f" = Ycalc;
" %11.5f" = Yobs;
" %11.5f" = Yobs-Ycalc;
" %11.5f" = Get(phase_ycalc); 'Phase 1
" %11.5f" = Get(phase_ycalc); 'Phase 2
" %11.5f" = Get(phase_ycalc); 'Phase 3
" %11.5f\n" = Get(bkg);
}
I hoped to do
for strs {
" %11.5f" = Get(phase_ycalc);
}
But it seems this is not possible within "out_record out_fmt out_eqn { .. }"?
Is there a keyword to specify str(1), str(2), str(3).. or a way to use the for loop shown above?
Currently I append the phase contributions after X,Yobs,Ycalc,Ydif,Bkg but that means I need run a second program to format the Phase.txt file to place the phase contributions in colums next to the X,Yobs,Ycalc,Ydif,Bkg
phase_out_X Phase.txt load out_record out_fmt out_eqn {
" %11.5f" = X;
" %11.5f" = Ycalc;
" %11.5f" = Yobs;
" %11.5f" = Yobs-Ycalc;
" %11.5f\n" = Get(bkg);
}
for strs {
phase_out_X Phase.txt load out_record out_fmt out_eqn {
" %11.5f\n" = Get(phase_ycalc);
}
}
alancoelho
Its not possible to output the phases in columns from an INP file. It is possible to save the phase_Ycalcs in column order from the GUI even if the phase_Ycalcs is obtaind from Launch mode.
To output the phase_Ycalcs in column order then Right Click on the Xdd in the TreeView and then use the "Save if displayed Yobs, Ycalc, ...". See the attached to see the Option. This option will save any displayed patterns into a file in column order.
mathiasmorch
Alright, thank you for the swift reply. The GUI is mode is ok normally, but for sequential and parametric refinements I hoped the GUI used a keyword to do exactly this, and that this had now become available together with phase_Ycalc in TOPAS v7.
But this is already significantly faster than having several runs setting each phase scale to 0 and outputting Ycalc, so a small script to reformat this is ok.