\!\subrub Data and Peak File Formats\par
%HLP%1 File_formats 
\!\leftskip 0pt

There are two types of data files recognized in the Powder Suite 
programs, data files and peak files. Data files usually contain the 
raw diffraction results and values describing how the measurement was made,
while peak files contain derived results such as peak positions, heights and
areas. Occasionally a single file may contain both sets of information. 

The philosophy used in the Powder Suite programs is to allow the programs 
to read as many different types of data files as can be conveniently 
incorporated and to allow the programs to be easily expanded to accept
additional formats. 
Also, rather than require users to specify the format of the file
they want to read, the code has been written to automatically determine 
the format by reading the file. 

Associated with each file format is a default extension.
For example, DuPont files are expected to have extension |.DDAT|,
and Brookhaven X7A files are expected to have extension |.X7A|.
If a program is instructed to read data file |TEST|, 
then it will first search for a file named |TEST.DDAT| and if it is found
check if it is in DuPont format, if no such file is found or the file cannot
be read, it will then search for a file named |TEST.X7A|. 
Successive attempts will be made until each file type has been tried.
If the file name is supplied to the program with an extension, for example
|TEST.XXX| or |TEST.DDAT|, the procedure used is 
slightly different. In this case, the program will attempt to read the
file successively in each format until it is successfully read. 

On occasion, it may be necessary to specify the file format to be used.
This may be done by following the file name with a |/FORMAT=| and 
the file format: |filename[.ext]/FORMAT=DUPONT|. When the filename is
specified on the command line, the |/FORMAT=| qualifier may be abbreviated, 
but must be used. However, if the filename is specified in response to 
a prompt from the program, the string |FORMAT=| may be omitted: 
|filename.ext/DUPONT|.

\HANG
Dupont.
	Dupont binary format files contain diffractogram data and
	optionally peaks and baseline points. 
	The default file extension is |.DDAT|; FORMAT=DUPONT.

\HANG
NIST (NBS).
	The NIST format is a simple ASCII format for raw 
	intensity data. The file contains two header lines 
	followed by intensity values as either counts per 
	second or counts, ten per line. The count time is not 
	stored, so ESD's are computed assuming the intensity values 
	are stored as counts. 
	The default file extension is |.NBS|; FORMAT=NIST.

\HANG
GSAS.
	The programs can read some of the ASCII GSAS Standard 
	Powder Data files used as input to GSAS (BINTYP='CONST',
	optionally with ESD's). See the GSAS manual for details.
	The default file extension is |.GSAS|; FORMAT=GSASASC.
	In addition, information can also be read from GSAS 
	histogram and reflection files (refinement output).
	The program must read several files, including the |.EXP|,
	the |.REFxxP| file and the |.Pxx| file. 
	The default file extension is |.EXP|; FORMAT=GSASHIST.

\HANG
BNLX7A.
	This is the format used for data recorded at the 
	Brookhaven NSLS X7A (formerly X13A) instrument. 
	The source flux changes with ring current so 
	intensities are recorded with both scaler and monitor 
	values versus either Q or \twotheta. After reading,
	Intensities are scaled to constant monitor counts.
	The default file extension is |.X7A|; FORMAT=BNLX7A.

\HANG
JONES.
	This highly complex format was developed by Glover 
	Jones of DuPont. It consists of one angle and one 
	intensity value (format |2F10.3|) per line, with no 
	header information. Data need not be recorded with equal 
	steps of \twotheta, but the first two lines must have
	decimal points (.) in columns 7 and 17.
	The default file extension is |.JONES|; FORMAT=JONES.

\HANG
IPNS.
	Binary files produced by the Penn versions of Argonne 
	Intense Pulsed Neutron Source (IPNS) GLASS package and
	TOF package may be read: the file types that can be read are 
	Radial Distribution Functions, rho(r), g(r), n(r), (default file 
	  extension |.RDF|, FORMAT=IPNSRHO, IPNSGOFR, IPNSNOFR); 
	Structure factors, S(Q), S(d) (default file extension |.SOQ|, 
	  FORMAT=IPNSSOFQ, IPNSSOFD)
	ASCII raw counts from .RUN files written by RUNPLT
	  (default file extension |.TOF|, FORMAT=IPNSTOFx where
	  x = T for time, L for wavelength, Q for Q and D for d-spaces)
	Argonne TOF Rietveld .PLT files written by TOFLS
	  (default file extension |.PLT|, FORMAT=IPNSRIETxy where
	  x = T for time, L for wavelength, Q for Q and D for d-spaces
	  and y = O for the observed, background subracted pattern, 
	  C for the computed pattern and D differences [obs-calc]).

\HANG
PHILIPS -- Nova.
	This format corresponds to an ASCII data file created by
	the Philips APD system running on a Data General Nova 
	computer. The file contains a single header line with the
	step size, the starting and the ending angle, followed by 
	intensity values as either counts per second or counts, 
	ten per line. The count time is not stored, so ESD's are 
	computed assuming values in counts. The source radiation
	is assumed to be both Cu \Kalpha1.
	The default file extension is |.RD|; FORMAT=APDNOVA.

\HANG
PHILIPS -- VAX.
	This format corresponds to an binary data file created by
	the Philips 3720 APD system running on a VAX/VMS 
	computer and two associated peak files, one ASCII and
	one binary. The binary data file consists of fixed length, 
	512 byte records and the default file extension is |.RD|.
	The binary format peak file also has 512 byte records and
	has a default extension of |.DI|. The ASCII peak file is
	the contents of a peak report from the APD 3720 and 
	has a default extension of |.APLIS|; 
	The FORMAT is APDVAX for all of these files. 

\HANG
SCINTAG -- VAX.
	This format corresponds to an binary data file created by
	the Scintag system running on a VAX/VMS and two associated
	peak files. The data file consists of fixed length, 4 byte 
	records and the default file extension is |.RD|. The binary 
	format peak file also has 4 byte records and has default file 
	extension is |.PK|. The ASCII format peak file has default 
	extension |.PKLST|. Since the x-ray tube type is not stored,
	the radiation is assumed to be both Cu \Kalpha1\  
	and \Kalpha2. FORMAT=SCINTAG.


\HANG
Penn State University ``ASCII data file'' and ``Standard D-I format'' 
	peak files.
	The data file has a title for the first line. The second line
	contains the starting, ending angles, step size and count time
	(Format |4F10.0|). The remainder of the file has 10 intensity
	values (as counts) per line (Format |10F8.0|). 
	The default data file extension is |.ASC|.
	The peak file has any number of header lines, followed by a 
	card with ``|PEAK|'' in the first four columns.
	Remaining lines have one d-space and one peak height per line 
	(Format |14X,F8.4,2X,F3.0|).
	The default peak file extension is |.ADR|.

In addition to the peak files associated with data files, several 
additional peak files may be read. They all use FORMAT=PEAK.

\HANG
SEARCH temporary (peak) files.
	The temporary files with lists of peak positions may be 
	read by other programs as a peak file. For example, if peaks
	are entered into SEARCH for use in identification of an
	unknown pattern, the same peak list may be displayed along 
	with peak positions from JCPDS-ICDD cards in program LOGIC.
	The default file extension is |.SEA_IN|.

\HANG
Free Format peak file.
	The first line in this file is read as a title and the second
	line (format |F10.0|) is a wavelength. The wavelength should be
	zero if peak positions have been entered as d-spaces and non-zero
	for \twotheta\ angles. Remaining lines have one 
	d-space and one peak height per line (Format |2F10.0|). Note
	that positions and heights may be separated by a comma, if 
	the position and both preceeding and following spaces are less 
	than 10 characters. For example
		|  10.01, 99.  |
	is valid.
	These files must have extension |.PEAK| to be read.
