High-throughput powder diffraction . I . A new approach to qualitative and quantitative powder diffraction pattern analysis using full pattern profiles

A new integrated approach to full powder diffraction pattern analysis is described. This new approach incorporates wavelet-based data pre-processing, non-parametric statistical tests for full-pattern matching, and singular value decomposition to extract quantitative phase information from mixtures. Every measured data point is used in both qualitative and quantitative analyses. The success of this new integrated approach is demonstrated through examples using several test data sets. The methods are incorporated within the commercial software program SNAP-1D, and can be extended to high-throughput powder diffraction experiments.


Introduction
The identi®cation of unknown materials via X-ray powder diffraction patterns has until recently relied on simpli®ed patterns in which the full diffraction pro®le is reduced to a set of point functions selected from the strongest normalized peaks. Each of these functions uses d-spacings (or 2 values) and intensities (the d±I system) to represent the diffraction peaks. This simpli®ed approach to the analysis of powder diffraction patterns has advantages primarily in computer storage requirements, and with respect to the speed of search algorithms especially in very large databases (ICDD, 2003). However, problems arise from the use of such data.
(i) Accurate determinations of the peak positions may be dif®cult to obtain, especially in cases where peak overlap occurs or there is signi®cant peak asymmetry.
(ii) The hardware and sample preparation used can also affect the d-spacing (or 2 value) that is recorded for the peak. Shoulders to main peaks and broad peaks can also be problematic.
(iii) There is an objective element in choosing the number of peaks to select. Different software packages produce a range of different numbers of peaks from an identical pattern. For example, an ICDD round robin using a standard corundum pattern returned values varying from 23 to 81 for the number of peaks, when the correct number was 42 (Jenkins, 1998).
(iv) Many weak peaks are discarded. This can affect quantitative analysis of mixtures if one component diffracts weakly or is present in small amounts.
(v) Sample preparation and instrumentation can induce signi®cant differences in near-identical samples. Preferred orientation is a very dif®cult problem.
(vi) The reduction of the pattern to point functions can also make it dif®cult to design effective algorithms.
In order to use the extra information contained within the full pro®le, search±match algorithms are required that utilize each measured data point in the analysis. Recent drastic reductions in the price of computer storage, and corresponding increases in speed and processing power, means that storing and handling large numbers of full-pro®le data sets is much more practical than it would have been just a few years ago, and a new approach would be timely. However, databases of full pro®les are not widely available.

Existing search±match software overview
Most existing search±match programs do not use the full pro®le data. Peak search and indexing programs are used ®rstly to extract a d-spacing and corresponding intensity for each identi®ed peak, although indexing is not a pre-requisite. The pattern is thus reduced to a stick pattern. As an example of such pre-processing, see N-TREOR (Altomare et al., 2000). The most popular search algorithm used with such`stick' patterns is the Hanawalt search index (Hanawalt et al., 1938). Based upon a method developed for manual search±match, this utilizes the eight strongest peak lines to identify the pattern. Likely matches are ranked using various ®gures of merit (FoM) or goodness of match (GoM) indicators (for example, see Johnson & Vand, 1967).
An intermediate approach between reduced-pattern matching programs and true full-pro®le programs, are programs that take a full-pro®le unknown pattern and compare it to a database of reduced patterns. An example of a computer program that includes such features is DIFFRACT-AT (Nusinovici & Winter, 1994). Patterns are assigned scores based upon a calculated ®gure of merit, and the best matches are displayed graphically, with their stick pro®les superimposed over the unknown full pro®le for visual comparison and veri®cation. The approach used allows small database peaks, which could potentially be obscured in the unknown pro®le by part of the full pro®le of a peak, not to be penalized as they would be in an approach based solely on a d±I system.
In contrast, true full-pro®le search±match programs compare full-pro®le unknowns to databases consisting of full pro®les. As such databases are not yet commercially available, they must be either built up gradually from existing, often locally collected, experimental patterns, or generated from stick patterns by pattern simulation software (see for example Steele & Biederman, 1994).
The latter approach is that taken by MATCHDB (Smith et al., 1991) where each unknown pattern data point is compared in turn with the corresponding database-pattern data point. Overall ®gures of merit for each database pattern are then calculated, and the top 15 matches are listed. The ®gures of merit used evaluate the patterns point-by-point in regions where the intensity is greater than a previously selected cut-off level. Several different proprietary full-pro®le search±match systems also exist, but since they are commercial products they are not discussed in any detail in the literature.
An excellent web site containing downloadable patternmatching software is available (CCP14, 2003).

Qualitative pattern matching using the full diffraction pattern
Although much less dependent on the quality of data than reduced-pattern methods, the reliability of full-pro®le pattern matching can be improved by accurate pre-processing that involves smoothing and background removal. A¯ow chart of the process is shown in outline in Fig. 1.

Data pre-processing
Data are imported either as ASCII xy data (2, intensity), CIF format (Hall et al., 1991) or a Bruker raw format. We have also developed a platform-independent binary format for this data that is used internally in the associated software. The data are normalized such that the maximum peak intensity is unity.
The pattern is interpolated if necessary to give increments of 0.02 in 2. High-order polynomials are used, employing Neville's algorithm (Press et al., 1992).
To remove the background, local nth-order polynomial functions are ®tted to the data, and then subtracted to produce a pattern with a¯at baseline. The value of n is selected by the algorithm. Three domains are usually de®ned, but this can be modi®ed for dif®cult cases.
Peak positions are found using Savitsky±Golay ®ltering (Savitzky & Golay, 1964). Smoothing via a digital ®lter replaces each data point x i with a linear combination of itself and a number of nearest neighbours. (This smoothing is distinct from the wavelet±SURE procedure and is only used to determine peak positions in the formalism that we use.) We can write any point g i as a linear combination of the immediate neighbours: nÀn l c n x in X 1 Figure 1 A¯owchart of data pre-processing before pattern matching. Items marked with an asterisk (*) are optional.

Figure 2
Pre-processing the powder data. The green line is the raw data. The blue line is the result of (a) removal of background using local nth-order polynomials, (b) smoothing via wavelets and the SURE procedure, and (c) peak searching using Golay±Savitsky ®ltering; peaks are marked with a bullet (*).
Savitsky±Golay ®ltering provides an ef®cient way to determine the coef®cients c n by the least-squares ®t of a polynomial of degree M in i, to the values x Àn l Y F F F x n r . For ®nding peaks we need the ®rstorder derivative and thus require a 1 . To distinguish maxima and minima the gradient change is inspected. This procedure is robust with respect to noise, peak shape and peak width.
As an example, Fig. 2 shows the pre-processing of powder data for a clay mineral including normalization, the removal of background using local nth-order polynomials, followed by smoothing via wavelets, then peak searching.

Non-parametric statistics
The full-pattern-matching tools described here utilize, in part, non-parametric statistics. In general, non-parametric statistics are little used in crystallography where the statistical distributions are well de®ned or, at least, well approximated. In contrast, the use of non-parametric statistics involves no assumptions about the underlying distributions of data; instead it works using ranks. A set of n data points x 1 , x 1 , F F F x n is represented by the data ranks in which the data are sorted into descending order and this order is used rather than the data value itself. Identical ranks are designated`ties'. Correlation, for example, becomes a processing of correlating ranks. This has special advantages for comparing powder patterns on a point-by-point basis, since the distribution of the data is unknown. Furthermore, such statistics are robust and resistant to unplanned defects, outliers, etc. (see, for example, Conover, 1971). In the case of powders, this robustness will encompass peak asymmetry and preferred orientation.
The ®rst step when dealing with non-parametric statistical tests is to convert the diffraction pattern from actual data values to the ranks of those values. If there are n data points in the pattern, the smallest intensity value is assigned a rank of 1  The Kolmogorov±Smirnov two-sample test. The two data sets are converted to ranks then further transformed to cumulative distributions, S 1 (x) and S 2 (x), and D is calculated as the maximum distance between S 1 (x) and S 2 (x). The associated probability is computed via equation (6).
[R(x) = 1], the largest a rank of n [R(x) = n] and the ith largest intensity a rank of I [denoted R(x i ) = I]. If any tied ranks exist (i.e. from data points of equal value) they are assigned a rank corresponding to the average value of the ranks they would have taken if they were not the same. Having transformed the data into such a form, non-parametric tests may then be applied.

Matching powder patterns
We employ up to four statistics for matching powder patterns with each other.
(i) The non-parametric Spearman rank over the full collected intersecting 2 range employed on a point-by-point basis.
(ii) The Pearson correlation coef®cient also taken over the same range.
(iii) The Kolmogorov±Smirnov test, also on a point-bypoint basis, but only involving regions of the patterns where there are marked peaks.
(iv) The Pearson correlation coef®cient that is the parametric equivalent of (iii).
Each statistic will now be discussed in turn.

Spearman's rank order coefficient
Consider two diffraction patterns, each with n measured points n[(x 1 , y 1 ), F F F (x n , y n )]. These are transformed to ranks R(x i ) and R(y i ). The Spearman test (Spearman, 1904) then gives a correlation coef®cient & xy , in the form (Conover, 1971;Press et al., 1992) & xy n i1 Rx i Ry i À n n1 2 À Á 2 n i1 Rx i 2 À n n1 This produces a coef®cient in the range À1 & xy 1. As with the conventional correlation coef®cient, a score of zero would indicate no correlation between the two data sets. A negative score indicates anti-correlation, i.e. that large values of x are paired with small values of y, and vice versa. A positive score means large x values are paired with large y values, and vice versa. Usually the whole pattern is used, but some regions, e.g. areas where standards are present, can be excluded.

Pearson's r
Pearson's r is a parametric linear correlation coef®cient widely used in crystallography. It has a similar form to Spearman's test, except that the data values themselves, and not their ranks, are used: (where xY y are the means of intensities taken over the full diffraction pattern). Again, r can range from À1.0 to 1.0. Fig. 3 shows the use of the Pearson and Spearman correlation coef®cients. In Fig. 3(a), r = 0.93 and & = 0.68. The high parametric coef®cient arises from the perfect match of the two biggest peaks, but the much lower Spearman coef®cient acts as a warning that there are unmatched regions in the two patterns. In Fig. 3(b), the situation is reversed: the Pearson r = 0.79, whereas & = 0.90, and it can be seen that there is a strong measure of association with the two patterns, although there are some discrepancies in the region 15±35 . In Fig. 3(c), r = 0.66 and & = 0.22; in this case the Spearman test is again warning of missing match regions. Thus, the use of the two coef®cients acts as a valuable balance of their respective properties when processing complete patterns.

Kolmogorov±Smirnov two-sample test
The third test we use is the Kolmogorov±Smirnov (KS) twosample test (also known as the Smirnov test) which we apply to individual peaks rather than the complete diffraction pattern, i.e. only peaks that occur at the same 2 values (within a user-speci®ed tolerance) in both patterns are compared, and this is done on a point-by-point basis. For further details of the KS test, see work by Smirnov (1939) with a fuller discussion by Steck & Smirnov (1969). The original Kolmogorov test was designed to compare an empirical distribution function to a hypothetical distribution function. The Smirnov variation compares two empirical distribution functions. As the correct function is generally not known, the Smirnov variation is more widely useful. Unlike tests such as the chi-squared, the KS test gives exact results for small data sets and does not require a large number of observations.
The two peak pro®les each have n p points, which are transformed to ranks then converted to cumulative distributions S 1 (x) and S 2 (x), respectively. The test then looks for the maximum value of the absolute difference between the two over the full range of n p : The process is shown graphically in Fig. 4. To establish the validity of the null hypothesis, H 0 , that the peaks are drawn from the same sample, the associated probability can be calculated via the approximation with the limits Q KS (0) = 1 and Q KS (I) = 0. The larger the value of D, the less likely it represents the same data and the two peaks are different. Just as with the Spearman coef®cient, the KS test is a robust non-parametric statistic. An example of the KS test applied to real data is shown in Fig. 5. In Fig. 5(a) the peaks have similar, although not identical shapes with identical peak positions; D = 0.22, with an associated probability for the null hypothesis of p(H 0 |D) = 0.98, i.e. there is a 98% chance that the null hypothesis is valid. In Fig. 5(b), where peak shapes are very different and there is a small offset of the peak maxima, the corresponding statistics are D = 0.51, with p(H 0 |D) = 0.25. In this case the null hypothesis is not accepted at the usual limits of 95 or 99%.

Peak matching using Pearson's r
In the same way as the KS test, peaks can also be matched using their full pro®le by employing the Pearson r on a pointby-point basis but con®ning the match to the region of peak overlap(s) in the two samples. In general, this test is the least useful of the four, and is highly correlated with the r coef®cient computed over the whole diffraction pattern.

Combining the coefficients
It is usually advantageous to combine individual correlation coef®cients to give an overall measure of similarity. The Pearson r and the Spearman & are usually used together in a weighted mean to give an overall rank coef®cient r w : Usually w 1 = w 2 = 0.5. This argument is, of course, heuristic: there is no particularly rigorous statistical validity in doing this, but in practice the combination has considerable discriminating power. The KS test gives p(H 0 |D). In principle, this allows us to mix the KS test with r and &, but, in reality, we have here two classes of test: one is based on the entire pattern and the other uses only speci®ed peaks, and it is not easy to combine the two classes, since the second is a function of the number of peaks and there remains the problem of processing problems where a peak is present in the reference sample but not in another, and vice versa. In consequence, we tend to keep the two classes separate.

Full-profile qualitative pattern matching in action
The method proceeds as follows.
(i) A database of known samples is created. Each sample is optionally pre-processed as described in x3.1. Note that peak identi®cation is only necessary if the KS or the related parametric test are to be used: it is not required for the Spearman or full-pattern Pearson tests.
(ii) The sample pattern to be matched against this database is selected, and pre-processed as necessary.
(iii) The intersecting 2 range of the two data sets is calculated, and each of the pattern-matching tests is performed using only that region. The user may also de®ne excluded regions.
(iv) A minimum intensity is set, below which pro®le data are set to zero. This eliminates noise and does not reduce the discriminating power of the method. This is set to 0.1I max as a default, where I max is the maximum measured intensity, but the parameter may be varied.
(v) An optimal shift in 2 between patterns is often required, arising from equipment settings and data collection protocols. We use the form where a 0 and a 1 are constants that can be determined by maximizing equation (5). It is dif®cult to obtain suitable expressions for the derivatives da 0 adr w and da 1 adr w for use in the optimization, so we use the downhill simplex method (Nelder & Mead, 1965) which does not require them. The ef®ciency of this procedure is discussed in x4.5.
(vi) A parametric Pearson's test is performed using all the measured data points.
(vii) The Spearman & is computed in the same way.
(viii) Peak lists for the sample and database patterns are compared. Where a peak is located within a user-controllable tolerance at the same 2 in both patterns, a KS test is performed utilizing the full pro®les of each coinciding peak. A ®nal KS probability is calculated as the average of the individual KS peak test scores.
(ix) Procedure (viii) is repeated using the parametric Pearson test in exactly the same way as the KS test.
(x) Results from each of the four tests are stored and displayed by the program for each pattern in the database.
(xi) An overall rank value is calculated for each database sample after completion of the various calculations. It comprises the sum of weighted values of the available statistics. The weights applied are user-de®nable.
(xii) The matching results are then sorted in rank order, r w , or via any of the individual tests described above as required.

Test data
To provide suitable examples of SNAP-1D full-pro®le pattern matching, a database of 98 patterns in CIF format was imported into the program. These comprise a subset of the ICDD database for the analysis of clay minerals (Smith et al., 1996;Smith, 1999;ICDD, 2003). Clay minerals are layer silicates, in which layer stacking-sequence errors give rise to broad peaks which are often highly asymmetric, and are thus poorly represented by the standard d±I formalism, and so represent a suitable challenge for full-pro®le matching procedures. There is a good monograph on the use of powder diffraction and clay minerals by Moore & Reynolds (1997).

Pattern matching on montmorillonite using the ICDD database of clay minerals
There are three samples of montmorillonite in the database. One of these was selected as the reference pattern and matched against the remaining 97 patterns. The results are shown in Fig. 6 and tabulated in Table 1, sorted on the r w value. The three montmorillonite samples are clearly identi®ed with the top r w values; the next pattern in the list is nonite and there is a clear and signi®cant drop in r w for this sample. There are substantial differences in the three montmorillonite patterns, especially in the region 18±35 2, but the combined use of the Pearson and Spearman coef®cients allows the patterns to be successfully matched. The KS test highlights the fact that signi®cant peak pro®le differences are present. As expected, the Pearson peak correlation coef®cient is less sensitive, and less useful, and is closely correlated to the full Pearson r coef®cient.

Opal
Opal is a quartz mineral. Opaline silicates form a diagenetic series which begins with amorphous opal (opal A) and progresses through opal-CT to opal C, ending with low-quartz (Moore & Reynolds, 1997). An opal-CT sample was matched against the database. The results are shown in Fig. 7 and tabulated in Table 2, sorted on the r w value. There are only three opal samples in the database as used. They have all been identi®ed despite considerable difference in peak shapes, widths and offsets, especially those involving opal-A. As before, the KS test highlights the differences in peak shape. Sample matching using d±I values would be very dif®cult with these data.

Using the Kolmogorov±Smirnov test
As an example of the use of the KS test to monitor small peak shape differences, the KS test was applied to quartz in Table 1 Pattern matching on a sample of montmorillonite using an ICDD database of clay minerals.

Figure 6
Pattern matching for montmorillonite using the ICDD clay minerals database. This needs to be read in conjunction with Table 1, which includes the key for line colours. There are three montmorillonite samples in the database and these have been successfully identi®ed as the top three matches despite considerable pro®le differences. The next pattern in the sorted list of r w values is the unrelated nonite mineral, which is quite different, having a sharp peak around 27 . This is re¯ected in the low value of 0.55 for r w .

Figure 7
Pattern matching using an Opal-CT sample in the ICDD clays database as a reference. This ®gure needs to be examined in conjunction with Table 2. The top two matches (excluding the reference opal) are opal CT and opal-A; the latter has a very different peak pro®le compared with the remaining samples. There are also problems with peak offsets.

Figure 5
The Kolmogorov±Smirnov two-sample test applied to single peaks from two patterns which occur at the same value of 2. the 2 range 79.0±84.5 . The Pearson and Spearman correlation coef®cients are 0.88 and 0.87, respectively; the Pearson coef®cient applied to the peaks only is 0.82, but the KS test gives a coef®cient of 0.19, highlighting the fact that there are signi®cant differences. Fig. 8 shows the two patterns superimposed; it can be seen that there are differences in peak widths and data resolution, although overall the peaks are very similar, especially as characterized by d±I values.

Pattern shifts
To test the ef®cacy of the downhill simplex method for determining the parameters a 0 and a 1 in equation (9), a series of eight shifted patterns were generated for an organic powder sample in the range 0 2 35 using values of a 0 and a 1 in the range À1.0 to 1.0. The simplex method was then used to compare the calculated values of the shift parameters with those used to generate the offset patterns. The method uses multiple starting points: if the maximum search values for a 0 and a 1 are de®ned as (a 0max , a 1max ), we use the starting points (0.0, 0.0), (a 0max + 0.1, 0.0), (0, a 1max + 0.1, 0.0). Once an optimum point has been found, it is usually recommended that the calculation is restarted from the optimum point, but we found this to be unnecessary. Table 3 summarizes the results; the average deviation between true and calculated values of the a 0 coef®cients is 0.02 , and for a 1 is 0.005. This is within the resolution of the data, which is 0.02 .

Quantitative analysis without Rietveld refinement
Quantitative analysis seeks to identify the components of a mixture given the powder diffraction patterns of the pure components and that of the mixture itself. It is obvious that the full pro®le data will, in general, be invaluable in these cases, and should give more accurate answers than d±I-based calculations, but will be less tractable mathematically. In this section we ®rst review existing techniques and then demonstrate the use of least-squares combined with singular value decomposition to use full-pro®le diffraction data to obtain quantitative analyses of mixtures, without the use of Rietveld re®nement and thus without knowledge of the crystal structures of the components.

Overview of existing quantitative techniques
There is an excellent text by Zevin & Kimmel (1995) covering all aspects of quantitative X-ray diffractometry. Quantitative analyses of powder diffraction patterns may be roughly divided into two categories: those involving the use of either an internal or an external standard, or those utilizing a full diffraction pro®le. The latter approach may be subdivided into the Rietveld method, pro®le stripping and least-squares best-®t summation.
The Rietveld approach requires crystal structures to be known for all individual phases in the mixture. A calculated full pro®le is produced based upon that knowledge, and crystallographic parameters re®ned to produce the best ®t to the experimental data. See, for example, works by Bish & Howard (1988) and Hill (1993).
In the pro®le-stripping method (also known as pattern subtraction), ®gures of merit are used to identify a phase that best ®ts the overall mixture pattern. This pure-phase pro®le is then subtracted from the mixture pro®le, after scaling has been performed. The process is then repeated until no residual pattern remains, showing that all phases have been accounted for. Our approach is related to this but works in the opposite direction, taking all candidate patterns simultaneously, then reducing the possible candidates.
The best-®t summation approach, described by Smith et al. (1988), is suited to situations where the user has prior knowledge of likely candidate phases, and can therefore select them individually for inclusion. Using least-squares techniques, the best-®t of the weighted sum of combined phase patterns to the mixture pattern is obtained. Weight fractions are then calculated using the reference intensity ratio method (RIR) (Hill & Howard, 1987). A modi®cation of this by Chipera & Bish (2002) obtains weight fractions using the prescaled patterns and the internal standard approach, and is implemented as an Excel worksheet.

237
research papers Table 3 The use of the downhill simplex method to determine the shift parameters a 0 and a 1 from equation (9).
Columns 1 and 4 contain the values of a 0 and a 1 that were used to generate the offset data. The calculated values from the downhill simplex method optimizing r w are given in columns 2 and 5, with the absolute differences in columns 3 and 6. The mean deviation of a 0 from the true values is 0.02, while that of a 1 is 0.005. This compares well with the resolution of the data, which is 0.02 2.

Quantitative analysis using full profiles and singular value decomposition
Assume we have a sample pattern, S, which is considered to be a mixture of up to N components. S comprises m data points, S 1 , S 2 , F F F S m . The N patterns can be considered to make up fractions p 1 , p 2 , p 3 , F F F p N of the sample pattern. We want the best possible combination of database patterns to make up the sample pattern. A system of linear equations can be constructed in which x 11 is measurement point 1 of pattern 1, etc.: Writing these in matrix form: or x Á p S X 12 We seek a solution for S that minimizes Since N ( m, the system is heavily overdetermined, and we can use least squares. The condition number of a matrix is the ratio of the largest to the smallest values of its corresponding diagonal matrix W. It is called singular if its condition number is or approaches in®nity, and ill-conditioned if the value of the reciprocal of the condition number begins to approach the precision limit of the machine being used to calculate it (see, for example, Searle, 1999). Normal least-squares procedures can have dif®culties attempting to invert very poorly conditioned matrices, such as will arise with powder data where every data point is included. Singular value decomposition (SVD) is ideal in such cases as it allows singular and ill-conditioned matrices to be dealt with. In particular, not every m Â N matrix has an inverse. However, every such matrix does have a corresponding singular value decomposition.
SVD decomposes the x matrix to several constituent matrices to give the solution (Press et al., 1992) W is a diagonal matrix with positive or zero elements. If most of its components are unusually small, then it is possible to approximate the matrix p with only a few terms of S (i.e. we can make up the sample pattern using only a combination of just a few database patterns) so that combinations of equations that do not contribute to the best possible ®nal solution are effectively ignored. This system of least squares is highly stable, and the use of W gives us a¯exible and powerful way of producing a solution for the composition of an unknown number of pure phases contributing to a measured pattern. Although computationally the method is, relatively speaking, quite a slow and memory-hungry one, as it involves calculations dealing with several large matrices, it is exceptionally stable, and, when dealt with properly, rarely causes computational problems. The method has found use in powder indexing (Coelho, 2003).
The variance±covariance matrix can also be obtained from the V matrix and the diagonal of W: From this an estimate of the variances of the component percentages can be found. Powder diffraction yields the fractional percentages arising from the scattering power of the component mixtures, p i À p N . The values of p can be used to calculate a weight fraction for that particular phase provided that the atomic absorption coef®cients are known, and this in turn requires the unit-cell dimensions and cell contents, but not the atomic coordinates (Smith et al., 1993;Cressey & Scho®eld, 1996). The general formula for the weight fraction of component n in a mixture comprising N components is (Leroux et al., 1953) where " j is the atomic X-ray absorption coef®cient and & j is the density of component j. The variance of c n can be computed via (see Appendix A for details). Clearly the variance of any component depends on the variances of the other phases which are themselves unknown at the start of the calculation. Equation (19) is solved by assigning equal variances of 1.0 to each ' 2 c j and iterating until there is no signi®cant change in variance.

Applications of the SVD method
This method requires a database of full-pro®le patterns, and assumes that the patterns of the individual pure phases are included within that database. Obviously, the quality of the overall results is strongly dependent on the quality of the measured data and care is needed to use suitable protocols. As in qualitative analysis, data interpolation followed by optional background subtraction and wavelet smoothing procedures are performed upon all the patterns.
Depending upon user preferences, either the entire database, or just a subset of it can be used as possible phase input. The subset is selected using a user-controlled correlation cutoff level. In this case only those patterns that have a weighted mean correlation, r w , greater than a given cut-off value are subsequently used in the SVD-based least squares. The full angle range of the unknown sample is used by default in the calculations, but a smaller sub-range may be employed if required. The method selects the top 15 results as measured by the p matrix from this solution vector as long as the associated weights from the W matrix are signi®cantly greater than zero, and builds another matrix p with them, carrying out the entire procedure again.
Finally, the top j patterns (where j is a user-controllable integer between 1 and 15) are put through the matrix decomposition process once more. The results returned are the fractions of each pattern included in the test pattern. These are scaled to a percentage, and the number of possible phases is limited to j. The displayed results are effectively the scale fraction for each phase; weight percentages may be calculated from these if required. Any patterns that are considered to be incorrect can be marked as such by the user, and may then be ignored and the analysis repeated.
6. Examples of quantitative analysis

Simulated mixtures
To provide a test for the method, the powder diffraction patterns of mixtures were simulated by combining various experimental patterns from the ICDD clay database, and then adding 5% Gaussian noise to the resulting pattern.
The ®rst example of this involved three individual minerals: gibbsite, anastase and¯uorite. A powder pattern was generated by combining the individual patterns in equal proportions. A qualitative search was ®rst carried out of the entire database, and all patterns with an r w value of <0.01 were excluded from the quantitative analysis which then followed. The results are shown in Table 4(a). Note that these are the only suggested constituent phases returned by the program; all other phases in the database were discarded by the analysis process. That two different gibbsite phases are suggested is a consequence of the database, which contains multiple patterns for some minerals, and two for gibbsite. Marking one of the two gibbsites to be ignored and re-running the analysis gave the results shown in Table 4(b). A mixture containing the same phases, but in different proportions, was then constructed. The same data handling and options were used as previously. The results from this run are in Table 4(c). Table 4 Quantitative analysis test using a subset of an ICDD clay minerals database.

research papers
Only the scale percentages are calculated. (a) A synthetic mixture of equal proportions of¯uorite, anatase and gibbsite tested against the whole database, which has two gibbsite entries. The scale fraction for gibbsite sums to 0.330. (b) A mixture of equal proportions of¯uorite, anatase and gibbsite tested against the whole database with one of the two gibbsite entries removed. (c) A synthetic mixture of unequal proportions of¯uorite, anatase and gibbsite tested against the whole database with one of the two gibbsite entries removed.
Sample 3 contains silica rather than brucite (indicated by asterisks *). For sample 3, the weight percentage corrundum was provided by the organizers and the results have been scaled to this value. Standard errors are in brackets. The average deviation for corundum is 20%, that for¯uorite is 18%, and that of zincite is 3%, with an overall average deviation of 23%. The results for 1a±1h are also shown graphically in Fig. 8 These calculations give values of the scale factors p 1 , p 2 , etc. in equation (23), rather than weight percentages. The average deviation of the calculated value from the true value is 0.2 and is always less than 2% in error, indicating that the method is capable, with good sample preparation techniques and with well characterized samples, of a viable level of accuracy.

IUCr round robin
The International Union of Crystallography Commission on Powder Diffraction (CPD) sponsored a round robin on the determination of quantitative phase abundance from diffraction data. The results were published in two papers (Madsen et al., 2001;Scarlett et al., 2002). We have used the data supplied for samples 1a±1h, 2 and 3 to test the viability of the fullpattern SVD methodology. Sample 1 is a three-phase system prepared with eight different and widely varying compositions. It was possible for participants to collect their own data or use that supplied by the CPD; we chose the latter approach. The papers identi®ed a large variation in reported results arising from incorrect data processing and program usage. The results from the full-pattern SVD method are tabulated in Table 5 and are shown graphically in Fig. 9 (which is partially taken from Fig. 2 of Madsen et al., 2001). The average deviation between true and calculated weight percentages is 2.0% for corundum; that for¯uorite is 1.8%, and that of zincite is 3%, with an overall average deviation for all components of 2.3%. Given the simplicity and speed of our calculations, this is quite satisfactory. It should be noted that we are not proposing that this formalism is a substitute for Rietveld methods when high accuracy is required. However, it should also be emphasized that the total time for all these calculations is less than 1 min on a modest PC once the data are in a suitable format.
The errors seem to be underestimated, however. The source of this is probably due to systematic errors associated with peak shapes and background that do not ®nd their way into our current model.

BCA round robin
The BCA 2003 Industrial Group Quantitative round robin (Cockcroft & Frampton, 2003) used a two-phase sample comprising paracetamol and lactose. Samples of mixture and pure phases were provided. Data collection was carried out on a Bruker D5000 diffractometer in re¯ection mode and analysed using the quantitative mode of SNAP-1D. There were noticeable preferred orientation effects in the lactose sample. The correct results were paracetamol 84.92% and lactose 15.08%. The values obtained by SNAP-1D were 86.2 and 14.8%, respectively. This represents an average deviation of 0.8%, which is very satisfactory.

Conclusions
We have shown that a mixture of parametric and non-parametric statistical tests using full-pro®le powder diffraction patterns is useful in both qualitative and quantitative powder diffractometry. The method is relatively simple and overcomes the problems that arise when only the peaks or representations of the peaks in the pattern are used. In quantitative mode, the use of singular value decomposition gives a stable mathematical formalism capable of being used with full diffraction data where every measured point is included. This can act as a simple alternative to Rietveld re®nement and does not require atomic coordinates, although it does need X-ray absorption coef®cients, and thus the unit-cell dimensions and contents, unless one is dealing with polymorphic mixtures. It is not as accurate as the Rietveld method, but can give percentage weight compositions with an estimated uncertainty of 1± 5% depending on data quality. The limit of detectability for a given component is well below 5%.
The methodology is incorporated into the commercial computer program SNAP-1D (Barr et al., 2003) that runs on PCs using the Windows 2000/XP operating systems and is marketed by Bruker-AXS.
The title of the paper concerns high-throughput crystallography, and the link with this technique now needs to be made: it is possible to generate a correlation matrix in which every pattern in a database of n patterns is matched with every other to give an n Â n correlation matrix q using a weighted mean of the Spearman and Pearson coef®cients with the optional inclusion of the KS and PP coef®cients. The matrix q can be converted to a distance matrix, d, of the same dimensions via d 0X51X0 À qX 20 Figure 9 The results of the full-pattern quantitative analysis on mixtures of corundum, zincite and¯uorite used in the IUCr round robin (Madsen et al., 2001). The values are in weight percentage. The yellow circles are the correct results; the red are those calculated by SNAP-1D. This ®gure has been adapted from the paper by Madsen et al. (2001).
At this point, the tools of cluster analysis and multivariate data analysis are now available to classify patterns, identify clusters, estimate the number of pure components and to visualize them. This topic is addressed in the following paper. It can be used with more than 1000 patterns, and so is relevant to highthroughput techniques. The methods described here can also be applied to other one-dimensional spectroscopies, such as Raman and IR, and results will also be presented elsewhere.

APPENDIX A Error propagation in quantitative analysis
The general formula for the weight fraction of component n in a mixture comprising N components is: