********************************************************************** * * Copyright (C) 2000 Scott Belmonte * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * *********************************************************************** FOUE - current version as of 8 September 2000: V1.3 FOUE (pronounced FOOEY) extracts Fourier map information from the binary Fourier map files produced by GSAS: DELF, FOBS, FCLC, NFDF, PTSN and DPTS formats. Version 1.3: Fixes some bugs found in Foue 1.1 Version 1.1: Outputs ASCII dump, WinGX *.map format, Marching Cubes *.fou format, Porject XD *.grd format. The Project XD format has not been tested on a viewer yet so may not work. Experience has shown that GSAS Z projections work best in WinGX's MapView. Files: readme.txt This file foue.c C source code foue.exe PC Intel executable license.htm The GNU public licence. FOUE is written in C and should compile on most UNIX machines with the following command line: cc -o foue foue.c -lm Put the executable in your path; the GSAS exe directory would be a good place to put it. FOUE askes for the base name of the experiment file (EXPNAM). For example, if you have the following files: BB99.EXP BB99.FCL Then enter BB99 when prompted for EXPNAM. Case does not matter for FOUE as it tries both upper and lower case when opening files. Next enter which type of Fourier map file you want to decode (DELF, FOBS, FCLC, NFDF, PTSN or DPTS). The type is used to determine which extention to use when opening Fourier map files. You are then prompted for the output type: ASCII, WINGX, MARCH or XD. FOUE then tries to open EXPNAM.EXP and parses it to find the unit cell information. If FOUE can't open EXPNAM.EXP then the user is prompted to give the unit cell. The correct unit cell is not mandatory for ASCII output But it is essential for the correct output of the other formats. If there is more than one phase is present in EXPNAM.EXP then the user is prompted to pick the appropriate one from a list. And finally, the output filename is asked for. For ASCII output, the precision (i.e. number of decimal places) with which to write out the density map is asked for. Setting the precision to zero sometimes makes it easier to spot peaks in a hardcopy. FOUE can handle all types of *.EXP files (PC and UNIX) without the need to convert. However, .... ******** N.B. ************* Because of difference in byte ordering (little-endian/big-endian) between machines, binary files are NOT general portable between machines. FOUE will not correctly decode binary Fourier files produced by GSAS on a machine with a different byte ordering to the machine that FOUE is run on. It is not possible to determine, programmatically, the byte ordering of GSAS binary files. The best way to avoid problems is to always run FOUE on the same machine that produced the binary files you want to decode. Command Line Only Version. FOUE can also be run using a command line of the form: foue -in_type -out_type expnam where in_type is one of: delf, fobs, fclc, nfdf, ptsn, dpsn and out_type is one of: ascii # (where # is a number between 0 and 6 that signifies the precision of ASCII output), wingx, march, xd. The name of the output file is constructed from expnam. For example, given the GSAS files TEST.EXP and TEST.FCLC, to convert to ASCII output with 2 decimal places in the output, the command line is: foue -fclc -ascii 2 test The output is test.txt To convert to: WinGX: foue -fclc -wingx test output file: test.map Marching Cubes: foue -fclc -march test output file: test.fou Project XD: foue -fclc -xd test output file: test.grd Any bug reports or suggestions are most welcome. Send them to the following e-mail address. Scott A. Belmonte e-mail: S.A.Belmonte@dl.ac.uk