Forum: Forums topas RSS
creating ascii output in GUI mode
Karsten #1
Member since May 2019 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: creating ascii output in GUI mode
Hi everyone,

I would like to share some experience for creating ascii output in GUI mode (Topas 5). For evaluation of in-situ measurements it's a convenient way to export refinement results to Excel. Therefore a few lines have to be added to excisting macros in topas.inc

For example by adding following lines to macro Out_FCF(file) weight percent of all phases are exported (seperated by tab), if the FCF output checkbox is marked for the last active phase

out D:\results.txt append
    for xdds {
    'Out(file, "%s")
    #ifdef newline
    Out(Get (r_wp), "\t%4.3f")
    #else
    Out(Get (r_wp), "\n%4.3f")
    #endif
    for strs {
    load out_record out_fmt out_eqn { "\t%2.2f" =Get(weight_percent);}
    }}

or adding following lines to macro Out_CIF_STR(file, with_id) exports phase specific information (seperated by ; ), if the CIF output checkbox is marked

out D:\results.txt append
    #ifdef newline
    load out_record out_fmt out_eqn { "\t%s" =Get(phase_name);}
    #else
    load out_record out_fmt out_eqn { "\n%s" =Get(phase_name);}
    #define newline
    #endif
    load out_record out_fmt out_eqn { ";%2.2f" =Get(a);}
    load out_record out_fmt out_eqn { ";%2.2f" =Get(b);}
    load out_record out_fmt out_eqn { ";%2.2f" =Get(c);}
    phase_out D:\results.txt append
    load out_record out_fmt out_eqn
       {
       ";%2.0f" = H;
       "%2.0f" = K;
       "%2.0f" = L;
       ";%6.1f" = I_no_scale_pks;
       ";%6.1f" = Iobs_no_scale_pks;
    }

and for peak phases macro CS_G(c, v) could be used

 phase_out D:\results.txt append
    load out_record out_fmt out_eqn { "\t\t%2.1f" = Xo;
             "\t%2.3f" = I_no_scale_pks;}
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, 20120620-dev, © 2003-2011 by Yves Goergen
Current time: 2019-11-22, 08:37:56 (UTC +00:00)