This is the README file for the program MKDAT. Please see the file INSTALL for installation instructions. Before using, copying or modifying this program or any of its components, please read first the file MKDAT_COPYRIGHT. Part 1. Description of the program MKDAT: The program mkdat recognizes ASCII input data file format containing either the equidistantly sampled intensity values in one column or should have two columns with 2*theta in the first and the intensity values in the second column. The files can contain any number of Bragg-reflections. The preparation consists of the separation of the overlapping peaks and the background subtraction and instrumental correction of the profiles. The program consists of the following steps: - The program is searching for the peaks if the whole powder diffractogram is available and gives a list of the positions and intensity maxima of the diffraction peaks. - The user has the option to keep or skip any of the peaks or to assign hkl indices to the corresponding peaks. - The principle of the peak separation is the following: after the nonlinear 2*theta -> K transformation (K=2*sin(theta)/lambda) the program prompts for the type (see below) and approximate positions of the selected and the unwanted overlapping peaks. Only in this particular correction procedure the peaks are fitted by simple mathematical functions, the type of which can be selected by the user: Pseudo-Voigtian or Pearson VII. The physical background is approximated by a polynom. The order of the polynom must be specified by the user. The "background" of the peak selected for correction is the sum of the physical background and the other overlapping unwanted peaks. The parameters of the "background" and the selected peak (including the positions and intensity maxima of the peaks) are refined using the nonlinear M-L algorithm of the gnuplot program. After the fit converges, the fitted "background" is subtracted from the measured data. The position of the selected peak is shifted to K=0 and the intensity is normalized. If the fit was sufficiently good, only the separated and normalized peak remains. If instrumental profiles are available, the program can correct the measured profiles for the instrumental effect using the method of complex deconvolution (Stokes, 1948). However, the deconvolution of the physical and instrumental profiles has to be carried out with special care particularly when the breadth of the observed profiles is close to that of the instrumental profiles (Snyder et al., 1999). - Finally the program saves the separated and corrected profile in the file hkl.dat (hkl are the indices of reflection) in a two-column format in which the first and second columns contain the Delta K and the intensity values, respectively. If the instrumental effect was taken into account, the Fourier-transform (which is a result of the deconvolution) is saved too. Part 2. Usage of the program MKDAT: Step 1: cd into MKDAT's directory Step 2: - if you have a data file of one column format (containing a single profile) named "data.adt", run: ./adt2dat data.adt - if you have data file of two columns format (containing more peaks) named "data.epf", run: ./adt2dat data.epf Step 3: follow the steps of the procedure described in Part 1.