Hi Ross There's no way of outputting a selection of hkls; it's all or none.
You can however omit hkls at the start of the refinement; ie. omit_hkls = And(H, K, Mod(L, 2)); omit_hkls = H > 10; etc... You can use this in an indirect manner to first refine using all hkls and then in a subsequent refinement omit the unwanted hkls; ie: tc INP_FILE "macro M_ {}" copy INP_FILE.OUT INP_FILE.INP tc INP_FILE "macro M_ { omit_hkls = H; iters 0 }" etc... where the macro M_ is placed at the str level; ie. xdd... str... M_ Alternatively an actual program can be written to manipulate the output hkl file; this should be trivial to do. I will for future reference however consider outputting a selection of hkls. Cheers Alan -----Original Message----- From: Ross Williams [mailto:[EMAIL PROTECTED] Sent: Thursday, 4 December 2008 7:41 PM To: rietveld_l@ill.fr Subject: macro's in TOPAS Dear All, I am trying to write a macro in TOPAS (version 4) to output the intensities of specific reflections for each phase, for the purposes comparing multiple structures of the same phase from the literature. To date I have been able to achieve this by using the following macro which output all the hkl's and the intensity of each, then I use a spreadsheet package to sort my data appropriately, but this is cumbersome and I have hundreds of structures I would like to examine. macro out_specific_hkl_details(file) { phase_out file append load out_record out_fmt out_eqn { " %s" = Get(phase_name); " %3.0f " = H; " %3.0f " = K; " %3.0f " = L; " %11.5f \n " = I_after_scale_pks; } } Ideally I would like to output: Phase1Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5) Phase2Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5) Phase3Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5) Phase4Name I(hkl_1) I(hkl_2) I(hkl_3) I(hkl_4) I(hkl_5) The problem is I can't work out how to output parameters for specific hkl's, can anyone help me? Thanks, Ross +++++++++++++++++++++++++ Ross Williams PhD Student Centre for Materials Research Department of Imaging and Applied Physics Curtin University of Technology GPO Box U1987 Perth WA 6845 Western Australia Phone: +61 (0)8 9266 4219 Fax: +61 (0)8 9266 2377 Email: [EMAIL PROTECTED]