Procedure to draw diffraction patterns using Igor Pro from GSAS. This is one of many solutions to create a publishable figure containing a diffraction pattern. This one is based on GSAS and uses the graphic drivers of Igor Pro. GSAS is the well-known crystal structure analyses program by Bob von Dreele (ftp://mist.lansce.lanl.gov/, or look at http://rrdjazz.nist.gov/~toby/unixgsas.html) and Igor Pro (http://www.wavemetrics.com/) is a very good general data analyses program running on Macs and Windows based computers. This utility has been tested using GSAS version linux6, and Igor Pro version 2.04 (Mac). Little doubt that it will fail as least partially if you try to run it with other versions but you can give it a try. It is certainly incompatible with older SG and linux version of GSAS and you will have a lot of work to do if you want to port it to a PC. Further it has been tested with data from several sources, neutron constant wavelength (ILL: D2b and D1b) neutron time-of-flight (ISIS: HRPD and IRIS) and Cu-X-ray radiation (only alpha 1 position will be shown) and synchrotron radiation (SRS, station 2.3) This utility contains a set of four files: 1) this readme.txt file 2) a GSAS add-in file 3) a fortran source code called toigor.f 4) a Igor macro file Diffmaker 2.0 All these files are fairly small and not compressed, so transfer times shouldn't be disastrous. Installation on Linux or SG server. To install get include your GSAS add-in into your main gsas c shell file, in the part of the file where all kinds of commands are defined, the 'case' region. Put it between any 'breaksw' and any 'case'. Compile toigor.f using. f77 toigor.f this should result in a file called a.out, and should be an executable, if not make it so by typing chmod +x a.out. Now move a.out to the directory where the GSAS executables are: mv a.out /usr/local/gsas/exe Or something like that. The next time you start GSAS you will be able to type 'export' which will perform the following tasks: mv -I $expnam.LST $expnam.OUT moves the list file to a temporary location. Requests confirmation if $expnam.OUT exists $GSASDIR/exe/hstdmp $expnam runs hstdmp, the GSAS histogram extraction program. You have to give a few answer to the standard questions. mv $expnam.LST export.hst moves the output to a temporarily position $GSASDIR/exe/reflist $expnam runs the GSAS reflection list creator, again some questions have to be answer. mv $expnam.LST export.ref moves the output to a temporarily position $GSASDIR/exe/toigor Runs the converter, it prompts the user for a new filename where the exported data should go to. The file consists out of two regions, first there are three columns, the x-axis, iobs, and icalc, secondly there are two, a description of the phase number and the position of the reflection. Only a bit of cleaning up to do! mv $expnam.OUT $expnam.LST rm export.hst rm export.ref breaksw Please FTP you file now to your desktop machine! Installation on the Mac, or PC. Copy the file Diffmaker2.0 to the folder 'User Procedure' in your Igor folder. The following actions have to be undertaken with every new experiment, i.e. every new diffraction pattern that you want to create. Load the Macro by Open File - - > Procedure and select the Diffmaker2.0. Go to the Macro's menu and do 'compile'. Again Macro's menu do 'Loaddata'. Now give some more details and your toigor file, and watch as things fly by! This should be enough! If you have problems or do note bugs, ideas for improvements, or if you have made an improvement, or with any comment, please contact me and drop an email. Please remember that this was never intended to be distributed but I found that people are really liking it so..... Good luck! Jaap Vente Cinvestav-IPN Unidad Merida Departemento de Fisica Aplicada Carretera Ant. a Progreso km 6 Apartado Postal #73 Cordemex Merida, Yucatan, 97310 Mexico Fax: (..) 52 - 99 - 812917 Tel: (..) 52 - 99 - 812960 ext 246 e-mail: jaap@jade.cieamer.conacyt.mx