computer programs MarqX: a new program for whole-powder-pattern fitting
Journal of
Applied Crystallography ISSN 0021-8898
Y. H. Dong and P. Scardi* Received 7 June 1999 Accepted 5 November 1999
Dipartimento di Ingegneria dei Materiali, UniversitaÁ di Trento, 38050 Mesiano (TN), Italy. Correspondence e-mail:
[email protected]
# 2000 International Union of Crystallography Printed in Great Britain ± all rights reserved
MarqX is a computer program for the modelling of powder diffraction data. It can be used for an unconstrained pro®le ®tting (pattern decomposition, PD) or constrained modelling of the whole powder pattern (Pawley method, PM), for single- as well as multiple-phase samples. The program output includes: lattice parameters or peak positions (for PM and PD, respectively), width and shape of the diffraction peak (in terms of half width at half-maximum and mixing parameter of a pseudo-Voigt function), corrected for the instrumental broadening component, intensity, peak area and pro®le asymmetry. In addition, errors on the goniometer zero and shift in sample position with respect to the goniometric axis can also be modelled, together with distance and relative intensity of the spectral components of the X-ray beam (e.g. K1 and K2). Speci®c output ®les are provided for line-pro®le analysis, including the Williamson±Hall plot and Warren±Averbach method.
1. Introduction The modelling of powder diffraction patterns is of considerable interest in several ®elds of study, from crystallography to materials science. Besides the obvious application to separate the contribution of Bragg re¯ections in the case of peak overlap, pro®le ®tting is the basis of the Rietveld method (Rietveld, 1969; Young, 1993) and is increasingly used for line-pro®le analysis (LPA) and lattice-parameter determination (Langford, 1992; Langford & LoueÈr, 1996; Toraya, 1993). The latter two applications do not require any treatment of the information related to peak intensity and area, which can be considered as ®tting parameters to be optimized during the modelling of the pattern. The interest in this approach lies in the modelling of peak positions, with possible inclusion of an internal standard, and pro®le parameters (width and shape). This type of analysis is referred to as the Pawley method (Pawley, 1981; Snyder, 1993; Toraya, 1993) or, more generally, whole-powder-pattern ®tting (Scardi, 1999). Besides the obvious interest in the study of lattice parameters, diffraction domain size and lattice defects, an advantage of this procedure is that it does not require a structural model of the phases present; moreover, the material to be studied need not be pure, as additional diffraction peaks can be easily included to model peaks from impurities or unknown phases. MarqX is a computer program for the modelling of diffraction patterns; it mostly addresses materials science problems, which typically include lattice-parameter determination and line-pro®le analysis. MarqX is designed to permit several modalities of pro®le ®tting, but the main targets are pattern decomposition, lattice-parameter re®nement and line-pro®le analysis. In general, MarqX can be considered as a whole-powder-pattern ®tting program, which can operate unconstrained pro®le ®tting [pattern decomposition (Langford et al., 1986; Langford & LoueÈr, 1996; Audebrand & LoueÈr, 1998)] as well as constrained modelling [Pawley method (Pawley, 1981; Toraya, 1993)]. A speci®c feature of MarqX is the convolutive approach used to introduce the instru-
184
Dong and Scardi
MarqX
mental pro®le component in the modelling procedure, together with the simultaneous modelling of lattice parameters (also including some systematic errors). A further peculiarity is the direct output of the results of peak width and shape for LPA, corrected for the instrumental broadening. Speci®c data output is provided for Williamson±Hall plots, average size±strain plots (Langford, 1992) and Fourier coef®cients of modelled pro®les, with a speci®c format for the Warren±Averbach method (Warren & Averbach, 1950, 1952; Warren, 1969). In the present paper, the main features of MarqX are illustrated with the help of some speci®c examples of application to typical materials science problems.
2. The algorithm The program incorporates a non-linear least-squares ®tting (LSF) engine [from the library of Argonne National Laboratory (Garbow et al., 1996)] based on the Levenberg±Marqardt algorithm. Suitable changes were performed to adapt the Argonne library to pro®le ®tting of diffraction data. Diffraction pro®les are modelled by pseudo-Voigt (pV) functions (Wertheim et al., 1974), considering the required spectral components (e.g. K1 and K2), whereas the background is ®tted by a polynomial. The program can operate under the following modalities. Pattern decomposition 1 (PD1). A (user-de®ned) number of pro®les is used to ®t the experimental data. Pro®le modelling consists of the re®nement of peak position (2), maximum intensity, half width at half-maximum (HWHM) and pV mixing factor (, or Lorentzian fraction). Pattern decomposition 2 (PD2). This is the same as PD1, but it includes the instrumental pro®le broadening component (or instrumental resolution function, IRF). In this way, the re®ned parameters are directly those of the pro®le due to domain size and lattice defects (f pro®le). J. Appl. Cryst. (2000). 33, 184±189
computer programs Whole-powder-pattern ®tting 1 (WPPF1). Peak positions are constrained by crystal lattice. For each of the phases present, it is possible to re®ne lattice parameters as well as peak intensity, HWHM and mixing factor. Whole-powder-pattern ®tting 2 (WPPF2). This is the same as WPPF1, but the HWHM values and mixing factors of all pro®les are constrained by a suitable analytical representation, like the Caglioti formula (Caglioti et al., 1958) for 2HWHM. In this way, the parameters of the analytical representation can be re®ned instead of the HWHM and values. Whole Powder Pattern Fitting 3 (WPPF3). Again, this is the same as WPPF1, but including the convolution with the instrumental component. Like PD2, the re®ned parameters are directly those of the f pro®le, together with lattice parameters. For each of these ®tting strategies, several options are always active: Statistical weights. These can be used or not in the LSF. (Default: on.) Pro®le asymmetry. Diffraction peaks can be modelled by split-pV functions, considering left and right HWHM (respectively for lowand high-angle peak side). (Default: off.) Convolution with IRF (see Appendix A). This can be switched on or off. (Default: off.) Parametrization of HWHM and . (Default: on.) When this options is on, it is possible to model the IRF, by means of the parametrization in use (see Appendix A), provided that the pattern of a suitable pro®le standard material is available. Number of phases. (Default: 1.) Truncation: 2 range of ®tting for each pro®le, in terms of number of HWHMs. (Default: 100.) Crystal systems: cubic (1), hexagonal (2), tetragonal (3), orthorhombic (4), monoclinic (5) and triclinic (6) can be selected for each phase present. Edit/view parameters. Each ®tting parameter [parm(x)] can be viewed and edited. In addition, it can be set or ®xed during LSF, or it can be bound to another parameter [parm(y)] according to the relation parm(x) = a + b parm(y), where a and b are speci®ed by the user. Among the ®tting parameters, it is also possible to re®ne (i) the ratio between spectral components intensity (e.g. K1/K2, default value 2) and (ii) the distance [(2)] between peaks of spectral components. For the K doublet, we can write (2) = 2 tan / = k tan . The value of k can be ®xed or re®ned by LSF (default value Ê and 1.544497 A Ê for K1 and K2, respec0.2900, using 1.540598 A tively). These two parameters should be optimized by modelling a pattern of a pro®le standard, so they should be considered as part of the IRF. This feature is particularly useful when a secondary graphite crystal analyser is used. Two systematic errors are also considered. In particular, it is possible to re®ne a constant 2 shift (2o) and the sample displacement from the goniometer axis (h). Finally, the program calculates integral breadths, in the direct (2) space ( ) and in the reciprocal space ( *), interplanar distances (d), their inverse (d*), and the integrated intensity of each modelled pro®le. Integral breadths, when the IRF is active, refer to the f pro®le. At the end of each cycle (group of n iterations in the LSF routine), the standard uncertainty (s.u.) is calculated for each free ®tting parameter, by a suitable matrix inversion routine (Young, 1993). The quality of the modelling is expressed by the usual statistical quality indices: Rwp, Rexp and goodness of ®t (GoF) (McCusker et al., 1999): J. Appl. Cryst. (2000). 33, 184±189
Rwp
nP i
wi yi
obs ÿ yi
calc2
P i
o1=2 wi y2i
obs ;
1a
h i1=2 P Rexp
N ÿ P wi y2i
obs ;
1b
GoF Rwp =Rexp ;
1c
i
where yi(obs) and yi(calc) are the observed and calculated intensities, respectively, wi is the weight, N the total number of data points, and P the number of free ®tting parameters used in the LSF.
3. Line-profile analysis (LPA) The program provides pro®le parameters of the modelled pV functions. As illustrated in Appendix A, if a parametric representation of the instrumental broadening component is given, the parameters re®ned by LSF are directly usable for LPA, as they refer to the f pro®le, i.e. to the pro®le due to the physical effects produced by the sample. In particular, MarqX provides an output ®le to prepare the Williamson±Hall (WH) plot (b* versus d*) and the average size± strain (SS) plot [( */d*)2 versus */(d*)2] (Langford, 1992). Moreover, pro®le parameters are used to calculate the Fourier coef®cients (AL) of each modelled peak, corrected for the instrumental broadening, which are saved in a speci®c output ®le. Additional output is provided for the preparation of the Warren±Averbach plot (WA) [ln(AL) versus (d*)2] to separate size and strain components according to the WA method (Warren, 1969). The user can therefore plot size Fourier coef®cients (AsL ) and microstrain (h"2i1/2), as obtained from the WA plot. Errors are given for all the results, and are obtained by error propagation, starting from the s.u.'s of the pro®le ®tting parameters.
4. Examples of application The following examples show the application of MarqX to three typical cases of study. For briefness, we illustrate the use of WPPF3 only, which is probably the most suitable ®tting strategy in materials science studies. The modelling according to the other modalities does not present further dif®culties for the user, and can be performed when required. The ®rst example is a lattice parameter study: the sample was a monoclinic zirconia powder of low purity (>95%, Carlo Erba) that was mixed with 20 wt% standard silicon (NBS SRM 640b). Fig. 1 shows the graphical result of MarqX, including recorded data (dot),
Figure 1
Graphical output of MarqX for the zirconia/silicon sample. The result of the modelling (line) is reported together with the experimental data (dot) and residual (line). Standard Si peaks are indicated, together with Miller indices.
Dong and Scardi
MarqX
185
computer programs Table 1
Results of whole-powder-pattern ®tting for the monoclinic zirconia±silicon sample.
Lattice parameters Ê) a (A Ê) b (A Ê) c (A ( ) Errors 20 ( ) h (mm) Modelling indices Rwp Rexp GoF
Re®ned value
Standard uncertainty, s.u.
5.3193 5.2022 5.1511 99.218
0.0005 0.0007 0.0004 0.005
ÿ0.013 60
0.005 26
14.98% 12.12% 1.23
modelling data (line) and residual data (difference between experimental and modelled data). The input data, together with the experimental pattern (intensity data in ASCII format), were the crystal system and Miller indices of the observed re¯ections of the two phases, and parameters of the IRF (see Appendix A). The number of pro®les in the modelling was 43 for zirconia and three for standard silicon. Convergence, after a few preliminary iterations to adjust the starting intensity, the HWHM and the mixing factor to reasonable values, was obtained after less than ten LSF iterations, with all ®tting parameters free in the last iteration. The lattice Ê (Yoder-Short, 1993)], parameter of silicon was ®xed [a0 = 5.430969 A in order to re®ne the value of the two systematic error parameters, together with the lattice parameters of monoclinic zirconia. The results are reported in Table 1. It is interesting to observe that the s.u.'s of the lattice parameters obtained from the present data set are much higher than the accuracy on the known value of the lattice parameter of silicon. In other words, random errors limit the s.u.'s to values one order of magnitude larger than the attainable accuracy; in most practical cases, however, such a precision is by far suf®cient. We can use pro®le data, corrected for the instrumental components, to test the presence of size±strain effects, and to estimate an average domain size value. Fig. 2 shows WH and SS plots for the monoclinic zirconia phase of Fig. 1: errors were used as weights in the linear regression, so data points with large error bars did not contribute signi®cantly and were omitted (integral breadth data with s.u.'s bigger than 100%, mostly from very weak peaks, below 1% relative intensity). From the slope and intercept in WH and SS plots, respectively, we can see that strain effects are negligibly small; an average domain size Ê can be obtained from the inverse of the slope in the SS of 450 (50) A plot. The value was averaged over different crystallographic directions, which in principle need not to be equivalent. However, from the limited data scatter in both the WH and the SS plot, anisotropic size effects seem not to be important, and scattering domains can probably be regarded as equiaxial. In the second example, we considered a thin ®lm of Te, Zn, Cu brass phase deposited on a glass substrate with a SnO2 buffer layer (Antonucci, 1999). No internal standard was available in this case, and cassiterite could not be used as a reference because of possible residual strain and compositional effects related to the preparation of the multilayer system. A face-centred cubic (f.c.c.) phase was used to model the brass ®lm, Ê [from the JCPDS card of with a starting lattice parameter of 6.10 A zinc telluride (#15±746)], whereas tin oxide was modelled by employing the usual tetragonal cell of cassiterite. Fig. 3 shows the result of LSF, with an indication of the re¯ections from the brass thin ®lm. As expected, the re®ned value of the lattice parameter for the
186
Dong and Scardi
MarqX
Figure 2
Results of LPA for the monoclinic zirconia phase of Fig. 1: (a) WH plot; (b) SS plot.
Ê ; Rwp = 11.18%, Rexp = 19.02%, GoF = 0.59] brass phase [6.1048 (5) A falls between the value of zinc telluride and that of copper telluride Ê ; JCPDS card #7±106). In this case, the lack of an internal (6.11 A standard does not allow us to consider the result as an absolute value of the lattice parameter, because the s.u. only concerns the effect of random errors. However, this result was considered on a relative basis, by comparing lattice parameters in a series of thin ®lms with different stoichiometry, deposited under the same conditions and same substrates, in order to study the alloying process (Antonucci, 1999). It is worth noting that a good modelling and a proper evaluation of s.u.'s could be performed without considering the effects of chemical composition and preferred orientation, which
Figure 3
WPPF for a two-layer sample, made of Te, Cu, Zn brass on glass substrate, with buffer layer of SnO2 cassiterite. Miller indices refer to the brass-phase thin ®lm.
J. Appl. Cryst. (2000). 33, 184±189
computer programs
Figure 4
Modelling result for a powder sample made of a mixture of tetragonal zirconia and standard silicon. Asterisks mark the positions of Si re¯ections.
would unnecessarily complicate an analogous determination by the Rietveld method. In this case, as in the previous example concerning the zirconia±silicon mixture, the present approach is clearly to be preferred as far as the only structural information of interest concerns lattice parameters. In the third example, we considered a mixture of 20% standard silicon (NBS SRM 640b) and a highly dispersed powder of ceriastabilized zirconia, prepared by heat treatment (1173 K, 1 h) of a sol± gel sample (Scardi & Di Maggio, 1999). Fig. 4 shows the graphical output of MarqX: the analysis considered 25 re¯ections for tetragonal zirconia and eight for cubic silicon, to model an X-ray diffraction pattern collected in the 2 range 22±110 . The main interest in this case, besides lattice parameters of the tetragonal zirconia phase [a = 3.6291 (3), c = 5.2242 (7), Rwp = 12.78%, Rexp = 7.08%, GoF = 1.80], was in the domain size and microstrain. WH and SS plots in Fig. 5 indicate the presence of both size and strain effects: in particular, from slope and intercept in the SS plot we can calculate, respectively, Ê and a an average (volume-weighted) domain size of 180 (10) A microstrain of 0.0024 (3). According to this method, we obtain average values, the meaning of which has been diffusely discussed in the literature (Langford, 1992). A more detailed understanding of the size±strain features of this sample can be achieved by a LPA along different crystallographic directions. In the WH plot, we can notice the different trend (even if the error bars are not small) with respect to different families of crystallographic planes [e.g. (011)/(022)/(033), (110)/(220), (002)/(004), (012)/(024)]. MarqX provides a speci®c output for the WA analysis, which can be conducted along different user-selected crystallographic directions. As an example, Fig. 6(a) shows the WA plot (for selected values of Fourier length, L) for the three observed re¯ections along [0hh]: the data can be reasonably well modelled by a linear relation, even if the error bars of data points from the (033) re¯ection are quite big, and therefore the weight in the linear regression is small as compared with the two lower-angle peaks. From the slope and intercept of lines in this plot, following the WA method, we can calculate the size Fourier coef®cients and microstrain (Warren, 1969). As shown in Fig. 6(b), by plotting AsL as a function of L, we can calculate a surfaceweighted average domain size (from the inverse of the slope at L = 0): Ê . It is worth noting that this average domain size hDiS = 110 (10) A cannot be compared with that from WH or SS plots that give a volume-weighted value. According to the WA method, however, the information can be further extended: we can draw the microstrain plot (Fig. 6c) and, from the second derivative of AsL [p(L)], the volume-weighted size distributions [p(L)*L] shown in Fig. 6(d). From this distribution, it is J. Appl. Cryst. (2000). 33, 184±189
Figure 5
Results of LPA for the tetragonal zirconia in the sample of Fig. 4. (a) WH plot (with indication of relative Miller indices); (b) SS plot.
possible to calculate the volume-weighted mean crystallite size along Ê. [0hh]: hDiV = 170 (15) A Since we have considered a speci®c crystallographic direction in the WA analysis, the results, both domain size and microstrain, need not coincide with those given by the SS plot. However, we can see that the volume-weighted mean size values given by WA along [0hh] and by SS are very close, and the average microstrain given by the SS plot corresponds to the microstrain value around L ' hDiS in Fig. 6(c). As discussed previously, the analysis could be further extended to include other crystallographic directions (Scardi & Maggio, 1999). The whole procedure is quite easy using MarqX and follows the same path described so far, in order to complete the information on size± strain effects given by LPA. As a ®nal comment, it is important to remember that the pro®le modelling and derived results are certainly conditioned by the use of a given analytical description for the diffraction line pro®le (pV functions in the present case). Strictly speaking, MarqX should be used only when diffraction pro®les are Voigtian, i.e. when they can be properly modelled by Voigt curves [it is well known that pV functions are close approximations to Voigt curves (Langford, 1992)]. For instance, mixing parameters approaching the extremes of the variability range [from 0 (Gaussian limit) to 1 (Lorentzian limit)] may provide a clue as to the inadequacy of pro®le modelling, and nonrandom residuals should also be considered carefully, if reliable LPA results are to be obtained. In spite of this limitation, inherent to pro®le modelling with analytical functions, it has been demonstrated that MarqX can be a valuable and ¯exible tool in the X-ray diffraction analysis of polycrystalline materials. Dong and Scardi
MarqX
187
computer programs
Figure 6
(a) Warren±Averbach plot for the (0hh) re¯ections of tetragonal zirconia. (b) Size Fourier coef®cients as a function of Fourier length. The arrow marks the graphical calculation of hDiS. (c) Microstrain and (d) volume-weighted domain size distributions derived from the WA plot.
5. Conclusions MarqX is a new program for the modelling of powder diffraction data, mostly addressing materials science problems where latticeparameter determination and line-pro®le analysis are required. The base algorithm was conceived to work as an unconstrained pro®le ®tting (Pattern decomposition) or a constrained modelling of the whole powder pattern (Pawley method), by which peak positions or lattice parameters, respectively, can be re®ned by least squares. The speci®c design of the line-pro®le analysis functions is particularly attractive as it provides a detailed size±strain analysis with little effort and irrespective of the crystal symmetry and the number of re¯ections. In addition, Williamson±Hall and Warren±Averbach analyses are carried out considering error propagation (based on the standard uncertainties given by the least-squares ®tting routine). This feature is particularly important for the simultaneous treatment of the information from intense as well as weak and noisy peaks with the proper weight, and for the provision of a reasonable estimation of the standard uncertainties of size±strain parameters.
APPENDIX A Convolutive approach One of the features of MarqX is the convolutive approach, which is based on the known relation between the instrumental pro®le
188
Dong and Scardi
MarqX
component (g) and the pro®le broadening due to domain size and lattice defects ( f ) (Klug & Alexander, 1974): h
x f
x ÿ y g
y;
2
where h(x) is the experimentally observed pro®le. We assume that h, f and g can be properly modelled by pV functions, i.e. pro®les are Voigtian. The g pro®le can be obtained by means of a suitable standard material [KCl in the present case (Leoni et al., 1998)], from which the instrumental resolution function (IRF) can be modelled (LoueÈr & Langford, 1988; Langford, 1992). In particular, MarqX employs the following two expressions for a parametric description of the IRF:
2 HWHM2 U tan2 V tan W a b;
3
where U, V, W, a and b are re®nable parameters. Since the analytical pro®les are pV functions, the integral breadth can be obtained as pV HWHM
1 ÿ
=ln 21=2 :
4
The knowledge of HWHM, and [from equation (3) for the g pro®le, and from the LSF for the f pro®le] permits the calculation of the Voigt parameter ' = 2 HWHM/ (Langford, 1992). The corresponding Lorentz and Gauss components of the integral breadth ( gL, f L and gG, f G, respectively) can then be calculated by means of the formulae given by Ahtee et al. (1984). J. Appl. Cryst. (2000). 33, 184±189
computer programs re®nement of the pV parameters of the f pro®le, which can then be used in the following LPA, together with the relative standard uncertainty given by the LSF. The present work was partly funded by PF-MSTAII `Special Materials for Advanced Technologies'. The author wishes to thank Drs P. Moretti and M. Leoni for useful suggestions during the preparation of the software.
References
Figure 7
Instrument resolution function for the examples shown in the present work, obtained by a KCl line-pro®le standard powder. (a) HWHM2 versus tan (Caglioti plot); (b) 1 ÿ (Gaussian fraction) versus 2.
In this way, Lorentz and Gauss components for the h pro®le are given by hL gL fL ; hG
2gG 2fG 1=2 ;
5
from which and HWHM for the h pro®le can be calculated by means of the Ahtee et al. (1984) formulae. Therefore, once the parameters in equation (3) are known from the analysis of a suitable pro®le standard material (see Fig. 7 for the IRF used in the present work), the convolutive approach permits a direct
J. Appl. Cryst. (2000). 33, 184±189
Ahtee, M., Unonius, L., Nurmela, M. & Suortti, P. (1984). J. Appl. Cryst. 17, 352. Antonucci, P. L. (1999). Unpublished results. Audebrand, N. & LoueÈr, D. (1998). J. Phys. IV Fr. 8, 109. Caglioti, G., Paoletti, A. & Ricci, F. P. (1958). Nucl. Instrum. 3, 223±234. Garbow, B. S., Hillstrom, K. E. & More, J. J. (1996). MINPACK Project. Argonne National Laboratory, November 1996 (http://www.netlib.Org/ minpack). Klug, H. P. & Alexander, L. E. (1974). X-ray Diffraction Procedures for Polycrystalline and Amorphous Materials, 2nd ed. New York: Wiley. Langford, J. I. (1992). Accuracy in Powder Diffraction II, NIST Special Publication 846, edited by E. Prince & J. K. Stalick, pp. 110±126. Washington: USG Printing Of®ce. Langford, J. I. & LoueÈr, D. (1996). Rep. Prog. Phys. 59, 131±234. Langford, J. I., LoueÈr, D., Sonneveld, E. J. & Visser, J. W. (1986). Powder Diffr. 1, 211±221. Leoni, M., Scardi, P. & Langford, J. I. (1998). Powder Diffr. 13, 210±215. LoueÈr, D. & Langford, J. I. (1988). J. Appl. Cryst. 21, 430±437. McCusker, L. B., Von Dreele, R. B., Cox, D. E., LoueÈr, D. & Scardi, P. (1999). J. Appl. Cryst. 32, 36±50. Pawley, G. S. (1981). J. Appl. Cryst. 14, 357±361. Rietveld, H. M. (1969). J. Appl. Cryst. 2, 65±71. Scardi, P. (1999). Defect and Microstructure Analysis by Diffraction, edited by R. L. Snyder, J. Fiala & H.-J. Bunge. IUCr/Oxford University Press. In the press. Scardi, P. & Di Maggio, R. (1999). Unpublished results. Snyder, R. L. (1993). The Rietveld Method, edited by R. A. Young, pp. 101± 144. Oxford University Press. Toraya, H. (1993). The Rietveld Method, edited by R. A. Young, pp. 254±275. Oxford University Press. Warren, B. E. (1969). X-ray Diffraction. Reading, MA: Addison-Wesley. Warren, B. E. & Averbach, B. L. (1950). J. Appl. Phys. 21, 595±599. Warren, B. E. & Averbach, B. L. (1952). J. Appl. Phys. 23, 497±502. Wertheim, G. K., Butler, M. A., West, K. W. & Buchanan, D. N. E. (1974). Rev. Sci. Instrum. 45, 1369±1371. Yoder-Short, Y. (1993). J. Appl. Cryst. 26, 272±276. Young, R. A. (1993). Editor. The Rietveld Method. Oxford University Press.
Dong and Scardi
MarqX
189