Skip to main content
Journal of Research of the National Institute of Standards and Technology logoLink to Journal of Research of the National Institute of Standards and Technology
. 2015 Oct 21;120:223–251. doi: 10.6028/jres.120.014

An Implementation of the Fundamental Parameters Approach for Analysis of X-ray Powder Diffraction Line Profiles

Marcus H Mendenhall 1, Katharine Mullen 2, James P Cline 1
PMCID: PMC4730677  PMID: 26958448

Abstract

This work presents an open implementation of the Fundamental Parameters Approach (FPA) models for analysis of X-ray powder diffraction line profiles. The original literature describing these models was examined and code was developed to allow for their use within a Python based least squares refinement algorithm. The NIST interest in the FPA method is specific to its ability to account for the optical aberrations of the powder diffraction experiment allowing for an accurate assessment of lattice parameter values. Lattice parameters are one of the primary certified measurands of NIST Standard Reference Materials (SRMs) for powder diffraction. Lattice parameter values obtained from analysis of data from SRMs 640e and 660c using both the NIST FPA Python code and the proprietary, commercial code Topas, that constitutes the only other actively supported, complete implementation of FPA models within a least-squares data analysis environment, agreed to within 2 fm. This level of agreement demonstrates that both the NIST code and Topas constitute an accurate implementation of published FPA models.

Keywords: Fundamental Parameters Approach, powder diffraction, Python, Standard Reference Material, X-ray line profile

1. Introduction

Measured X-ray powder diffraction line profiles are affected by the geometry of the diffractometer, the shape of the X-ray emission spectrum and the physical characteristics of the sample as shown diagrammatically in Fig. 1. Certain aberrations embodied in the geometric instrument profile are highly asymmetric and will displace the observed position of profile maxima; therefore, these maxima are not indicative of the true lattice spacing. Furthermore, the level and direction of the displacement can vary dramatically as a function of diffraction angle. High-accuracy determination of the crystallite lattice spacing from measured line profiles requires accounting for such effects in the model for line profile shape. The Fundamental Parameters Approach (FPA) for the description of X-ray line profiles is a convolution-based line profile modeling method that describes the measured line profiles as the convolution of peak profiles representing the emission spectrum with a number of aberration functions, each representing a certain aspect of the instrument configuration or sample microstructure that affects the measured peak position and/or shape. The parameters of FPA models are entirely interpretable in terms of the physical characteristics of the underlying experimental set-up. Non-physical parameters obtained in an FPA analysis can be used as a “feedback loop” in discerning difficulties with regards to the experimental setup [1].

Fig. 1.

Fig. 1

Generation of a line profile via convolutions in the FPA.

The FPA is the primary means by which X-ray line profiles are analyzed in the development of National Institute of Standards and Technology (NIST) Standard Reference Materials (SRMs) for powder diffraction. The SI traceability of the lattice parameter measurement is established through the characterization of the Cu Kα emission spectrum as provided by Hölzer [2]. The FPA models used for powder diffraction patterns were developed initially by Wilson [3], and in essentially modern form by Cheary and Coelho [46]. Later additions included new models and corrections [7, 8]. One of the first publicly available codes to offer the FPA capability was Xfit, followed by Koalariet [9, 10]. Shortly after these two public domain codes ceased to be supported, the commercial product, Bruker Topas [11]1, was released, continuing with the same FPA formalism that had been established with the previous codes. With the use of Topas for SRM certification, commencing with SRMs 660a [12] and 640c [13], numerous self-consistency studies were performed that indicated the FPA models within Topas were operating in accordance to expectations [8]. However, Topas is a proprietary code; a quantitative means to verify that its operation was in adherence with published FPA models was the development of an independent code written directly from the examination of said FPA models.

In this work, we present a robust set of numerical methods by which computations required for the FPA can be carried out. An implementation of the algorithms that are described, written in the Python [14] programming language, the NIST Fundamental Parameters Approach Python code (FPAPC), is provided as supplementary material2. We make no attempt to repeat any of the theory or background presented in [4, 5, 8]; the focus is on clear and efficient implementation and verification. We introduce one new FPA model, for the defocusing across the face of a silicon-strip position-sensitive detector (Si PSD) in Sec. 2.5.7. All of the convolutions are carried out via multiplication in Fourier space, per the convolution theorem (see Appendix A, Sec. 5). As such, the emission spectrum and all of the aberrations are directly computed in Fourier space. The exceptions are the axial divergence and the flat-specimen models; these are computed in real space and then transformed into Fourier space. However, this approach leads to the periodicity implicit in Fourier methods that distorts the function calculations at the boundaries; we therefore describe in Sec. 2.6 a method to correct said periodicity errors. The organization and combination of parameters in this work, especially with respect to line shape and crystal size, is entirely for computational expediency, and does not reflect any physical relationship between these quantities.

2. Components of the Fundamental Parameters Model

2.1 Definitions and Notation

  • Ls the length of the sample in the axial direction (perpendicular to the diffraction plane)

  • Lx the length of the X-ray source in the axial direction

  • Lr the length of the receiver slit in the axial direction

  • R the radius of the diffractometer, with the assumption of a symmetrical system

  • 2θ the detector angle (twice the diffraction angle)

  • Ω the specimen angle

  • β the angle of a ray of X-rays off the equatorial plane (in the axial direction)

  • W the full width, in 2θ space, of the window over which a peak is being computed

  • 2θ0 the center of the computation window

  • N2θ the number of bins in the computation window

  • ε[i] the ith element of array ε, with ε[0] being the first element

  • ε[i] the ith element from the end of array ε, so ε[i] is the last element

  • ε[i:j] the elements of an array ε with indices between i and j−1 (inclusive), so it has length ji

  • ε+x an operation between an array and a scalar operates element-by-element on the array with the scalar

  • ε+x an operation between two arrays is done element-by-element

  • f(ε) a function applied to an array is an array of the same length with the function applied to each element

  • # in pseudo-code sections, everything after this on a line is a comment

  • scaling we will present all equations below in a manner that is mostly compatible with the usage established by Topas. Lorentzian widths and Gaussian widths are expressed as the full-width at half-maximum (FWHM) of the peak shape. However, all lengths are uniformly scaled; any consistent unit of length can be used, but all lengths must be the same units. The reference code we provide takes all angles in degrees, and converts them internally to radians.

2.2 Initialization of Parameters

To start a calculation, we assume that the result will be a peak shape, uniformly gridded in 2θ space, centered at 2θ0, with N2θ points (which will typically be even and either a power of two or, for modern Fast Fourier Transforms (FFT) packages, products of powers of 2, 3, 5, and 7, typically), and with full width W. To match the standard of typical Fourier transform package implementations, using a common convention for transforms of purely real data sets, we will carry only the coefficients corresponding to non-negative angular frequencies. We will assume the length of the ω array is N2θ/2 +1, in which the highest frequency cosine component is put at the end, rather than folded back into the zero-frequency bin as is the result of fuu, complex FFTs. The ω array is initialized, then, to

ω[j]=j2πW

where W is in radians.

2.3 Source Spectrum and Crystal Size

We handle the convolutions due to the emission spectrum and due to the crystal size parameters first, and together, because it is numerically efficient to do so. We initialize the Fourier transform buffer F˜ that will be multiplied with all the other convolutions with the sum of the transforms of the emission spectrum broadened by the peak size. These two are kept together because they each have Lorentzian and Gaussian components that are easily combined. It is important to note that these crystallite size contributions have nothing to do with the actual emission spectrum; the grouping is purely historical and convenient.

For an emission spectrum which is a set of nλ lines, indexed by k, each with Lorentzian FWHM lk, Gaussian FWHM gk, intensity Ik, and wavelength λk, and a Gaussian crystal size component SG and a Lorentzian crystal size component SL, and a reference wavelength λ0 which is typically that of the strongest line in the spectrum, we define:

hk=lktanθ0λk+λk(π2SL)cosθ0sk2=(2gktanθ0λk)2+(λkSGcosθ0)2ak=ωhkσk2=sk28log2bk=ω2σk22δk=ω(2arcsinλksinθ0λ02θ0). (1)

Then the transform buffer F˜ is initialized via:

F˜=k=1nλIkexp[ak+bkiδk]. (2)

Care must be exercised with respect to the sign on the complex term in the exponential. Some Fourier transform packages define this differently. It is suggested that if a code is written, the order of the lines in the spectrum be verified. If the spectrum is backwards in the diffraction pattern, this sign should be switched.

2.4 Axial Divergence

The axial divergence model of Cheary and Coelho [5] (referred to as the “full” axial divergence model in Topas) is effective for the computation of this complicated function for a wide variety of situations. However, it is very intricate, involving many tests for various boundary conditions, and if implemented without attention to numerical issues can be computationally expensive. We present an implementation that is functionally equivalent, but has many of the boundary conditions clarified, and which is less subject to numerical issues than a literal implementation would be. In particular, we handle the 1/x divergences so that the function can be evaluated more coarsely without loss of smoothness.

For the purposes of a practical implementation of this model, we need to be able to calculate I2(β, ε) per Sec. 4.2 of [5] and then, ultimately, the full intensity profile including the effects of Soller slits via integration of their equation 27. The remainder of this section will present this in detail, concentrating on a clean algorithmic implementation, with all theoretical details being referred back to [5, 8].

The first step of the calculation is to set up some parameters that will be needed (with locations in [5] where appropriate):

β1=LsLx2R(after eq.15) (3)
β2=Ls+Lx2R(after eq.15,correcting error in original) (4)
ε0β22tan2θ(after eq.26) (5)
εA=cot2θ2R2(a constant we will need). (6)

Then, following eqs. 15a, b, c, d of [5], we compute the parameters Z0+ and Z0 conditionally on β:

Z0+={Lx2+βR(1+sec2θ)β2<β<+β1Ls2+βRsec2θ+β1<β<+β2Z0={Ls2+βRsec2θβ2<β<β1Lx2+βR(1+sec2θ)β1<β<+β2. (7)

Then, from eqs. 18a, b of [5] (with corrections to 18b),

ε1+=ε0εA(Lr2Z0+)2ε1=ε0εA(Lr2Z0)2(note correction from original)ε2+=ε0εA(Lr2Z0)2ε2=ε0εA(Lr2Z0+)2(note correction from original) (8)

but noting the following reordering if 2θ > 90°: the ε+ values get swapped with the corresponding ε values, i.e. ε1+ε1 and ε2+ε2.

The problem is then divided into two major domains, each with three minor ones. This is most easily done following Table 1 of [5]. This has been amended to include omitted reflections for formulas when 2θ > 90°. We present this in two formats: a pseudocode block in algorithm 1, and Table 1.

Table 1.

Selection of computation boundaries and β ranges

Condition 1 and Condition 2
rβ ↓ \ε εa εb εc εd
Lr>Z0+Z0 Z0+Lr2 and Z0Lr2
1 ε1+ ε2+ ε1 ε2
(Z0+>Lr2andZ0<Lr2) or Z0+>Lr2andZ0<Lr2
2 ε2+ ε1+ ε1 ε2
any other range of Z0
3 ε2+ ε1+ ε1 ε2
Lr<Z0+Z0 Z0+Lr2 and Z0Lr2
1 ε1 ε2+ ε1+ ε2
(Z0+>Lr2andLr2<Z0<Lr2) or (Lr2<Z0+<Lr2andZ0<Lr2)
2 ε2+ ε1 ε1+ ε2
any other range of Z0
3 ε2+ ε1 ε1+ ε2

Algorithm 1.

Selection of computation boundaries and β ranges

if Lr>Z0+Z0: # wide receiver slit
 if Z0+Lr2 and Z0Lr2:
  # parabola apexes entirely within slit
  rr = 1; εa=ε1+; εb=ε2+; εc=ε1; εd=ε2
 seel if (Z0+>Lr2andZ0<Lr2)or (Z0+>Lr2andZ0<Lr2):
  # one apex outside of slit
  rr = 2; εa=ε2+; εb=ε1+; εc=ε1; εd=ε2
 else:
  # both apexes outside of slit
  rr = 3; εa=ε2+; εb=ε1+; εc=ε1; εd=ε2
else: # narrow receiver slit
 if Z0+Lr2andZ0Lr2:
  # parabola apexes hanging off both ends of slit
  rr = 1; εa=ε1; εb=ε2+; εc=ε1+; εd=ε2
 else if (Z0+>Lr2andLr2<Z0<Lr2) or (Lr2<Z0+<Lr2andZ0<Lr2) :
  # one apex of beam within slit
  rr = 2; εa=ε2+; εb=ε1; εc=ε1+; εd=ε2
 else:
  rr = 3; εa=ε2+; εb=ε1; εc=ε1+; εd=ε2

2.4.1 Computing Components of Axial Divergence Shape for Fixed β

Using the parameters from algorithm 1 or Table 1, we need to set up the equations from Table 1 of [5] for F1, F2, F3, and F4. These will be used exactly as defined in the original work, with rβ defining the β range to select the equations.

However, this is the component of the computation where the most critical numerical issues must be addressed. First, we assume that the angle offset ε is defined on a uniform grid centered at 0 and running from −w to w where w is the half-width of a window on which the axial divergence function in being computed. It will be treated as an array ε and stored as an array of n elements. All of the F functions compute pieces of a function y0+k/|εε0|. This computation may well include the endpoint where ε = ε0, where this function diverges. Also, due to the discrete binning of ε, it may include a point at which the argument (without the absolute value) is in fact negative, but should be truncated to 0. Further, due to the discrete binning, the sum of all of the sampled values of the function may not add up to the integral of the function over the bounds, resulting in inaccuracies in the total X-ray peak intensity, especially in the case of sampling on a relatively coarse grid for computational speed. Finally, again due to discrete sampling, the first moment (centroid) of the distribution may not be exactly correct. This is particularly critical, since shifts in this result in inaccuracy of peak positions. Such shifts can be reduced by using finer computational grids, but this approach is very inefficient. Therefore, we adjust the result so that, in all cases, it has the exact centroid one would expect in the continuum limit.

All of these issues can be addressed with a single ‘helper’ function F0 which will be used to construct F1,2,3,4 in a unified manner. This is presented in the next section.

2.4.2 Helper Function F0

This function will take as formal arguments

  • ε, the grid of angle offsets on which the results are computed

  • buffer accum with the same number of elements as ε, and each bin will correspond to the line profile at the corresponding angle offset

  • ε0, the position of the singularity

  • εinner, the boundary closest to ε0

  • εouter, the boundary further from ε0

  • k, the scale factor

  • y0, the offset from zero

The helper function will sum values of the y0+k/|εε0| into accum bins corresponding to ε between εinner and εouter, and assure all the numerical issues are dealt with. It correctly integrates up to the singularity, and also assures that the area and centroid of the returned function are accurate, in spite of the sampling of a continuous function onto a discrete grid. It will return the bin indices corresponding to the lowest bin and (highest bin)+1 it actually modified, so that other parts of the computation can work efficiently only on the non-zero parts of accum. Because of the intricacy of this function, and the need to describe it algorithmically, the details of it are in the Python implementation of the FPA provided as ancillary materials with this paper. The function ’axial_helper’ in the python code is the implementation of F0.

2.4.3 Computing Complete Axial Divergence for Fixed β

With the assistance of the function in 2.4.2, the bookkeeping in Table 1 of [5] is straightforward to implement. The procedure for doing this is shown as pseudo-code in 2.4.4. When this process is complete, one has in hand the arrays representing the functions I2+ and I2 for a given β and 2θ0.

2.4.4 Carrying Out Table 1 Computation for I2

We define the various functions needed for Table 1 in terms of the helper F0. Note that F0 modifies the dst argument in place, and returns the lower and upper bounds of the part of the array which is modified.

F1(dst,εout,εin,εa,εb)F0(2θ2θ0,dst,εin,εout,ε0,|ε0εb||ε0εa|,0)F2(dst,εout,εin,εa)F0(2θ2θ0,dst,εin,εout,ε0,+|ε0εa|,1)F3(dst,εout,εin,εa)F0(2θ2θ0,dst,εin,εout,ε0,+|ε0εa|,+1)F4(dst,εout,εin,εa)F0(2θ2θ0,dst,εin,εout,ε0,|ε0εa|,+1) (9)

or, equivalently:

F1(dst,εout,εin,εa,εb)F0(2θ,dst,εin+2θ0,εout+2θ0,ε0+2θ0,|ε0εb||ε0εa|,0)F2(dst,εout,εin,εa)F0(2θ,dst,εin+2θ0,εout+2θ0,ε0+2θ0,+|ε0εa|,1)F3(dst,εout,εin,εa)F0(2θ,dst,εin+2θ0,εout+2θ0,ε0+2θ0,+|ε0εa|,+1)F4(dst,εout,εin,εa)F0(2θ,dst,εin+2θ0,εout+2θ0,ε0+2θ0,|ε0εa|,+1). (10)

Then, we create arrays for I2+ and I2 which will be the accumulators as defined in caption of Table 1 of [5]. Also, we create an empty list which will accumulate index bounds. The semantics of this list will be that the + = operator concatenates the elements returned by the function onto the end. The algorithm is shown in algorithm 2.

2.4.5 Computing I3 by Integrating I2

The previous two sections have presented the most complex part of the computation of the axial divergence peak shape. This section presents an implementation of Sec. 5 of [5], the computation of I3(ε, β) and the integral of it over all allowed β to get the total line shape. First, we create functions representing the transmission of Soller slits of angular full-width βmax for the incident Soller slit and angular full-width γmax for the receiving Soller slit. These are from equation 24a, b of [5], slightly rewritten:

Si(β)=max(0,1|2β/βmax|) (11)
Sd(γ)=max(0,1|2γ/γmax|). (12)

Algorithm 3 shows how to carry out the integral over β.

Algorithm 2.

Computation of I2

I2+=array of zeros of same length asε
I2=array of zeros of same length asε
indices=[] # empty list
if rβ is 1:
indices+= F1 ( I2+, εa, ε0, εa, εb)
indices+= F2 ( I2+, εb, εa, εb)
indices+= F1 ( I2, εc, ε0, εc, εd)
indices+= F2 ( I2, εd, εc, εd)
if rβ is 2:
indices+= F2 ( I2+, εa, ε0, εa)
indices+= F3 ( I2, εb, ε0, εa)
indices+= F1 ( I2, εc, εb, εc, εd)
indices+= F2 ( I2, εd, εc, εd)
if rβ is 3:
indices+= F4 ( I2, εb, εa, εa)
indices+= F1 ( I2, εc, εb, εc, εd)
indices+= F2 ( I2, εd, εc, εd)
idxmin = min(indices)
idxmax = max(indices)
returns I2+, I2, idxmin, and idxmax

2.4.6 Applying the Axial Divergence Convolution

To apply this convolution, which has been generated in real space, it must be transformed to Fourier space:

g(ω)=real_fft(I3). (13)

Because of the way the peak is centered, this transform has an alternating sign of −1 across its values. All odd-numbered bins of g(ω) will be multiplied by −1. Then, F˜ will be multiplied by g(ω).

Algorithm 3.

Integration over β to get I3

I3=array of zeros of same length asε
βlim = min(β2, βmax/2) # β2 from equation 4
# nsteps is the number of integration steps.
# values of 5–20 are usually sufficient.
for j between 0 and nsteps: # code below from equation 26a, b of [5]
β = βlim × j/nsteps
I2+, I2, i0, i1 computed according to section 2.4.4
γ0 = β/|cos 2θ|
dε=ε0ε[i0:i1]#ε is the 2θ2θ0 grid, from equation 5
dε=dε×2tan(2θ0)
dε[0]=max(0,dε[0])
dε[1]=max(0,dε[1]) # see note on array indexing in 2.1
dγ=dε
γ+=γ0+dγ
γ=γ0dγ
 if j is 0 or j is last step: # trapezoidal rule endpoints
  weight = 1
 else:
  weight = 2
I3[i0:i1]=I3[i0:i1]+(I2+[i0:i1]×Sd(γ+)+I2[i0:i1]×Sd(γ)×Si[β])×weight
I3=I3×2R2|tan2θ0|
return I3 which is the full axial divergence function

2.5 Instrumental Effects (Other than Axial Divergence)

2.5.1 Sample Offset and Zero Angle

The correction for the sample surface not lying in the equatorial plane of the diffractometer can be combined with the shift due to the zero angle error. If the sample is offset by z0, and the zero angle offset is 2θz, the correction is

δz=2z0cosθR+2θz (14)

and the convolver is:

g(ω)=exp(iωδz) (15)

and F˜ is multiplied by g(ω)

2.5.2 Source Width and Tube Tails

The correction for the broad shoulders on the spatial distribution of emission for fine-focus X-ray tubes can be computed according to [7] and Sec. 4.1 of [8]. Define wm as the width of the central peak, wl as the distance to the low-angle side of the shoulder, wh as the distance to the high-angle side, and It as the intensity of the tails, then,

εt=wrwlRεm=wmRδt=wr+wlRAr=Itwr+wlwm (16)

and the convolution is

g(ω)=sinc(εmω2π)+Atsinc(εtω2π)exp(iωδt) (17)

and F˜ will be multiplied by this g(ω).

2.5.3 Receiver Slit Equatorial Height

A receiver slit of full height hr creates a rectangular convolution of angular full width hr/R (where R is the diffractometer radius). From 42, the Fourier space representation is:

g(ω)=sinchrω2πR (18)

which will be multiplied into F˜.

2.5.4 Flat Specimen/Equatorial Divergence Slit Size

From eqs. 9 and 10 of [8], the correction for the flat specimen error is

εM=α22cotθ0 (19)

where α is the equatorial divergence angle of the X-ray beam. Then, the convolution function is

JFS(ε)=12εMεwhereεM<ε<0 (20)

This is of the same form as F0, used in the axial divergence calculation (see Sec. 2.4.2), so we will use that function. Note that this is a computation in real space. This is shown in algorithm 4.

Algorithm 4.

Computing the flat-specimen error

JFS=array of zeros of same length as2θgrid
F0 (
ε0 = 2θ0, accum=JFS, εinner = 2θ0, εouter = − εM
ε=2θ, k=1/(2εM), y0 = 0
)
g(ω)=real_fft(JFS) # transform real-space function to Fourier

Because of the way the peak is centered, this transform has an alternating sign of −1 across its values. All odd-numbered bins of g(ω) will be multiplied by −1. Then, F˜ will be multiplied by g(ω).

2.5.5 Specimen Transparency

From equation 12 of [8], with a correction to δ, the convolution due to the finite interaction depth in the target is:

Jμ(ε)=expεδδ(1expεminδ)whereεmin<ε<0εmin=2Tcosθ0Rδ=sin2θ02μR (21)

where μ is the absorption coefficient of the sample, measured in units consistent with R, so if R is in mm, μ would be in mm−1, and T is the sample thickness in the same units as R. From 48, the Fourier transform of this expression is:

g(ω)=1δ1exp(εmin(iω+(1/δ)))iω+(1/δ). (22)

Then, F˜ will be multiplied by g(ω).

2.5.6 Defocusing (Ω ≠ θ)

If the specimen angle Ω is offset from θ, a defocusing correction appears, per equation 15 of [8]. It is a rectangular convolution of angular full width

δDR=α(1sin(2θΩ)sinΩ) (23)

where α is the equatorial divergence angle. For small θ − Ω, this also reduces to:

δDRα(2θ2Ω)cotθ. (24)

From 42, the Fourier space representation is:

g(ω)=sincδDRω2π (25)

which will be multiplied into F˜.

2.5.7 Silicon Position Sensitive Detector (Si PSD)

A Si PSD, which has a finite window width, suffers defocusing due to two effects. The first is the effect discussed above, due to the sample angle Ω being different from the diffraction angle θ, resulting in a violation of the expected parafocusing optics. The second effect is due to the flat face of the detector itself; active pixels are not located on the radius defined by the diffractometer configuration. Unlike corrections for older PSDs [15], which include parallax due to the long absorption length in a gas-filled detector, we assume the detector is planar and has no effective depth.

The exact expression for a ray starting at the source at an angle α from the center ray, being diffracted by an angle 2θ, and striking the detector face which is centered at 2θ + ε, is a ray which intersects the detector face at a position y:

y=12Rcos(2αΩε)2sin(α)sin(αΩ+2θ)cos(εΩ)sin(αΩ)cos(αε). (26)

This can be expanded as a series in ε and α, which is:

y=Rε+αR((1sin(2θΩ)sinΩ)+ε2(112sin(2θΩ)sinΩ))+O(ε3)+O(α2). (27)

The first term is just the expected offset of the peak on the detector face, and is not an aberration. The second term contains two components, the first of which is exactly that of 23. The second component depends on ε2. In the limit that θ → Ω, it reduces to simply ε2/2. Thus,

δpsdyRα(1sin(2θΩ)sinΩ)+αε22 (28)

or, using the simplification of 24,

δpsd2αεcotθ+αε22. (29)

Now, we need to consider the relative magnitudes of these two terms. For a detector which is 1 cm in length, and 20 cm from the sample, ε = 0.05, so ε2 = 0.0025, and the quadratic is much smaller than the linear one for almost all θ. At high angles, where cotθ suppresses the first term, the aberration is still typically very small, since α may be of order 1° and αε2/2 = 0.00125° which is a very small contribution to the width for a high-angle peak. We present below an exact solution to the case in which the ε2 is ignored. In the case it is needed, the integral below needs to be carried out numerically.

If the detector window being analyzed extends from distance y1 to distance y2 above the centerline, and is centered so that θ0 = Ω,

g(ω)=y1/Ry2/Rsincδpsdω2πd2θ (30)

where δpsd comes from 29. Note that the defocusing correction of Sec. 2.5.6 is symmetrical in 2θ, so it is only necessary to integrate over one side of the detector.

The integral can be carried out analytically using the approximation of 24, resulting in an expression involving the sine integral function Si(x), where

Si(x)=0xsinuudu (31)
g(ω)=y1/Ry2/Rsinc(α(2θ)cotθ0)ω2πd2θg(ω)=2αcotθ0ω(Siαy2cotθ0ω2RSiαy1cotθ0ω2R). (32)

Note that evaluation of this function involves a 0/0 where ω = 0. However, the limit can easily be taken analytically. The zero bin of g(ω) should be set to (y2y1)/R, which is just the angular length of the exposed detector face. Also note that the subtracted term in 32 vanishes if y1 = 0.

For a symmetrical detector, y1 = 0. However, some data analyses may split the data from the detector into a pattern using the central pixels of the detector to get a high-resolution result, and then use the remaining pixels to create another pattern which has lower angular resolution, but takes advantage of the counting statistics available over the full detector aperture. In this case, the ‘central’ pattern would use y1 = 0 and y2 = Whr where Whr is the half-height of the region to be sampled for high-resolution data. The ‘outer’ pattern would use y1 = Whr and y2 = Wdet where Wdet is the half-height of the full detector aperture. Such a split would permit nearly optimal use of the characteristics of the PSD, with high resolution and high active area.

The form of 32 gives direct guidance as to where the cutoff Whr should be made. For small arguments, Si(ax)/axa2 x3/18 = x(1− a2x2/18). Thus, if y1 = 0,

g(ω)y2R(1118(αy2cotθ0ω2R)2). (33)

If the second term is small, the convolver does not roll off at high frequencies. By examining the other terms in the Fourier transform F˜ one can find a frequency ωmax at which other terms dominate and have rolled off most of the response. Then, if

Whr<˜62Rαcotθ0ωmax (34)

the Si PSD will not significantly broaden the overall response of the system as a result of this window selection. A more advanced approach would be to adjust this window width as a function of position in 2θ, so that as the peaks are dispersion-broadened at high angle, one would automatically use a wider window to collect more counts with no loss of resolution.

As with all the other corrections, F˜ will be multiplied by the resulting g(ω).

Aside on real-space solution

If one is working in real space, rather than Fourier space, the integral of a top-hat function over widths δDR of 24 can be carried out analytically to get the convolution function. As before, assuming the window extends from y1 to y2,, the result is:

f(2θ2θ0)f(ε)={0|ε|<y1αcotθ0RlogR|ε|y2αcotθ0y1αcotθ0R<|ε|<y2αcotθ0R0|ε|>y2αcotθ0R. (35)

This expression includes a weak singularity at ε = 0 (if y1 = 0, which is the most likely case), which can be handled in much the same manner as the 1/x singularity which was handled by the helper function in Sec. 2.4.2. Instead of integrating 1/x2x, one integrates the log to get

0εlogRεy2αcotθ0dε=ε(1logRεy2αcotθ0). (36)

This can then have the forward difference computed, as in Sec. 2.4.2, to get the appropriate singularity-free binned function. A full code example is not provided, since it is essentially identical to the helper code.

2.6 Conversion of Transform Results to 2θ Space

In the previous sections, we have enumerated many convolutions that get accumulated multiplicatively into F˜. Any other aberrations which are to be included can be done so in a similar manner. When everything is included, one needs to un-transform F˜ into real space to get F(2θ2θ0), the nearly-final aberration function. We have been assuming the user has a Fourier transform library which provides a pair of properly-matched transform functions. real_fft(x) takes a real array x of length N and transforms it into the positive ω components of the Fourier transform, a complex array of length N/2 + 1. We apply its inverse, to get

F(2θ2θ0)=inverse_real_fft(F˜) (37)

which takes N/2 + 1 complex numbers and converts them back to N real elements.

The one drawback to working in Fourier space is that all functions have built-in an implied periodicity of the length over which they are sampled. For many functions, this is not an issue, since they go quickly to zero near their boundaries, and so no wrap-around occurs. Unfortunately for the situation here, the aberration functions have extremely long Lorentzian tails, due to the contributions from the hk from 1. These tails always wrap around, which results in their inaccurate computation unless one spends much extra computational effort by computing the function over a very large interval in 2θ space.

This problem has been addressed previously in a paper on the computation of Voigt functions by Fourier transform methods [16]. In short, the periodicity is equivalent to having computed the transform of an infinitely repeating comb of the line shape. Since the long tail is almost perfectly Lorentzian, one can subtract the infinite sum of Lorentzians from the computed aberration, which corrects the tail. This can be done in closed form. From equation 7 of [16], the sum is:

ε(2θμ)=sinh2παΔΔ(cosh2παΔcos2π(2θμ)Δ)(απ)1(2θμ)2+α2 (38)

where Δ is the full width of the 2θ window, μ is the computed centroid of the peak, and α is the half-width of the widest component of the Lorentzian. This function is normalized to unit area. Then, the corrected shape is:

Fc(2θ2θ0)=F(2θ2θ0)Aε(2θμ) (39)

where A is the area of F(2θ). This makes a very good correction of the tails, assuming that the peak is not so asymmetrical that it has quite different amplitudes at the boundaries of the 2θ window. An example of the correction is shown in Fig. 2.

Fig. 2.

Fig. 2

Correction due to periodic Fourier transform, shown at low angle where the peak is very asymmetrical, and at mid-angle where it is nearly symmetrical. Note that for the left-hand case, the 2θ window is barely wide enough, so the peak tails are still very asymmetrical.

3. Numerical Comparisons

The data in Secs. 3.1 and 3.2 are provided to allow one to compare implementations of the NIST FPAPC to the results from Topas. Section 3.3, with comparisons to data, is provided as general validation of the FPA for some important test cases. While the FPAPC is not a Rietveld code, in that it does not utilize a full structural mode, it can utilize space group symmetry (of various SRM materials) to constrain peak positions to a single lattice parameter, equivalent to a Pawley fit.

3.1 Simplified Source Spectrum, Variable Soller Slits

This section presents numerical and graphical comparisons of the output of FPAPC with that of Topas. The setup we are comparing is that of a diffractometer with the parameters shown in Table 2, using the point detector with the “full” model for axial divergence. These examples have the source spectrum artificially restricted, to make the effect of axial divergence and Soller slits more evident.

Table 2.

Topas model parameters

Parameter Value Parameter Value
Zero error −0.026° Displacement −0.011 mm
Rp, Rs 217.5 mm Rec. slit width 75 µm
Fil. length 15 mm Samp. length 15 mm
Rec. slit length 5 Sample absorption 137.4 cm−1
CSL 3134 nm CSG 379 nm
Lattice spacing 4.15695 Å
Source Spectrum
intensity (la) wavelength (Å) (lo) Lor. width (mÅ) (lh) Gauss. width (mÅ) (lg)
1 1.540591 0 0.4323

We compute synthetic peak patterns for material with the characteristics of SRM 660c LaB6. Each data set is computed with different Soller slit settings, ranging from 2.5° full-width to 10.6° full-width. Tables 3, 4 and 5 show the detailed errors, and Figs. 3, 4, and 5 show the peak shapes for the 2.5°, 5.3°, and 10.6° cases, respectively.

Table 3.

2.5° full width Soller slits

(h,k,l) tp top (°) py top (°) Δ1 (m°) tp ζ (m°) py ζ (m°) Δ2 (m°) tp IB (m°) py IB (m°) % err
(0, 0, 1) 21.3224 21.3226 −0.12 −4.9 −5.1 0.23 47 46 0.78
(0, 1, 1) 30.3499 30.3500 −0.12 −2.3 −2.4 0.18 43 44 −0.42
(1, 1, 1) 37.4072 37.4074 −0.17 −1.3 −1.5 0.14 44 43 0.44
(0, 0, 2) 43.4723 43.4723 −0.01 −1.0 −1.0 0.01 42 44 −1.49
(0, 1, 2) 48.9233 48.9237 −0.32 −0.6 −0.8 0.18 45 45 0.07
(1, 1, 2) 53.9551 53.9551 0.03 −0.7 −0.6 −0.12 45 45 −0.01
(0, 2, 2) 63.1849 63.1850 −0.08 −0.5 −0.4 −0.12 47 48 −1.02
(0, 0, 3) 67.5141 67.5143 −0.29 −0.2 −0.3 0.13 49 49 −0.07
(0, 1, 3) 71.7118 71.7122 −0.34 0.1 −0.2 0.31 51 51 0.20
(1, 1, 3) 75.8111 75.8110 0.16 −0.5 −0.2 −0.34 52 52 0.01
(2, 2, 2) 79.8366 79.8369 −0.28 −0.1 −0.3 0.20 53 54 −1.33
(0, 2, 3) 83.8126 83.8125 0.07 −0.2 −0.1 −0.07 55 57 −0.97
(1, 2, 3) 87.7589 87.7590 −0.05 −0.2 −0.2 0.02 58 59 −0.83
(0, 0, 4) 95.6387 95.6387 −0.07 0.1 −0.1 0.17 62 64 −1.11
(0, 1, 4) 99.6100 99.6099 0.09 0.1 −0.1 0.12 66 67 −0.71
(1, 1, 4) 103.6287 103.6289 −0.18 0.1 0.0 0.09 70 70 −0.10
(1, 3, 3) 107.7175 107.7175 0.05 −0.1 −0.1 −0.01 73 74 −1.01
(0, 2, 4) 111.9019 111.9020 −0.07 −0.0 −0.0 −0.03 79 79 0.13
(1, 2, 4) 116.2138 116.2136 0.20 −0.2 0.1 −0.26 82 84 −0.92
(2, 3, 3) 120.6918 120.6919 −0.05 0.1 0.1 −0.03 89 90 −0.92
(2, 2, 4) 130.3790 130.3791 −0.10 0.1 0.0 0.10 106 108 −0.96
(0, 0, 5) 135.7712 135.7715 −0.28 0.2 −0.0 0.19 121 121 0.16
(1, 3, 4) 141.7472 141.7474 −0.15 0.3 0.2 0.12 140 140 0.14
(3, 3, 3) 148.6525 148.6527 −0.23 0.2 0.1 0.11 168 171 −0.99

Table 4.

5.3° full width Soller slits

(h,k,l) tp top (°) py top (°) Δ1 (m°) tp ζ (m°) py ζ (m°) Δ2 (m°) tp IB (m°) py IB (m°) % err
(0, 0, 1) 21.3179 21.3175 0.41 −38.8 −39.9 1.04 79 81 −1.02
(0, 1, 1) 30.3451 30.3448 0.24 −23.8 −24.6 0.72 69 71 −1.69
(1, 1, 1) 37.4020 37.4022 −0.20 −17.1 −18.1 1.01 65 66 −0.18
(0, 0, 2) 43.4674 43.4671 0.27 −13.5 −13.9 0.37 62 63 −0.94
(0, 1, 2) 48.9182 48.9184 −0.19 −10.6 −11.2 0.63 62 62 −0.15
(1, 1, 2) 53.9500 53.9501 −0.14 −8.9 −9.3 0.40 61 61 −0.24
(0, 2, 2) 63.1801 63.1802 −0.03 −6.3 −6.4 0.16 59 61 −1.13
(0, 0, 3) 67.5098 67.5097 0.14 −5.4 −5.4 −0.02 61 61 −0.13
(0, 1, 3) 71.7077 71.7079 −0.21 −4.4 −4.6 0.24 61 62 −0.32
(1, 1, 3) 75.8064 75.8066 −0.19 −3.5 −3.8 0.31 62 62 −0.38
(2, 2, 2) 79.8324 79.8325 −0.13 −2.8 −3.0 0.26 63 64 −1.08
(0, 2, 3) 83.8090 83.8088 0.13 −2.7 −2.5 −0.19 63 65 −1.74
(1, 2, 3) 87.7552 87.7552 0.03 −1.9 −2.0 0.09 64 67 −1.57
(0, 0, 4) 95.6358 95.6355 0.23 −1.2 −1.3 0.06 69 70 −1.10
(0, 1, 4) 99.6073 99.6070 0.36 −0.9 −0.9 −0.01 71 73 −1.18
(1, 1, 4) 103.6264 103.6264 0.01 −0.5 −0.7 0.13 75 76 −0.30
(1, 3, 3) 107.7156 107.7153 0.24 −0.5 −0.5 0.03 77 79 −1.09
(0, 2, 4) 111.9004 111.9002 0.23 −0.1 −0.2 0.02 83 83 −0.03
(1, 2, 4) 116.2127 116.2125 0.20 −0.1 −0.0 −0.06 87 88 −0.82
(2, 3, 3) 120.6916 120.6915 0.08 0.1 0.1 −0.03 92 94 −1.23
(2, 2, 4) 130.3804 130.3801 0.25 0.2 0.4 −0.24 110 112 −0.96
(0, 0, 5) 135.7737 135.7731 0.57 0.2 0.5 −0.27 125 125 0.09
(1, 3, 4) 141.7508 141.7504 0.38 0.6 0.8 −0.18 144 144 −0.01
(3, 3, 3) 148.6577 148.6577 −0.05 0.9 0.8 0.11 173 176 −0.88

Table 5.

10.6° full width Soller slits

(h,k,l) tp top (°) py top (°) Δ1 (m°) tp ζ (m°) py ζ (m°) Δ2 (m°) tp IB (m°) py IB (m°) % err
(0, 0, 1) 21.3160 21.3157 0.25 −88.4 −89.9 1.57 114 118 −1.76
(0, 1, 1) 30.3429 30.3423 0.59 −57.2 −58.2 0.93 96 101 −2.72
(1, 1, 1) 37.3998 37.3998 0.09 −43.3 −44.2 0.89 90 92 −0.73
(0, 0, 2) 43.4640 43.4638 0.21 −34.1 −34.9 0.73 84 88 −2.51
(0, 1, 2) 48.9154 48.9150 0.40 −28.7 −29.0 0.27 82 85 −1.43
(1, 1, 2) 53.9465 53.9465 0.07 −24.0 −24.6 0.60 80 82 −1.29
(0, 2, 2) 63.1762 63.1763 −0.08 −17.6 −18.0 0.44 76 78 −1.76
(0, 0, 3) 67.5059 67.5057 0.17 −15.4 −15.6 0.20 76 78 −0.81
(0, 1, 3) 71.7038 71.7038 −0.02 −13.2 −13.6 0.32 76 77 −0.58
(1, 1, 3) 75.8026 75.8028 −0.22 −11.4 −11.7 0.31 77 77 0.31
(2, 2, 2) 79.8290 79.8287 0.23 −10.2 −10.1 −0.05 74 77 −1.65
(0, 2, 3) 83.8049 83.8050 −0.09 −8.6 −8.8 0.14 75 78 −1.83
(1, 2, 3) 87.7512 87.7516 −0.44 −7.1 −7.4 0.31 76 78 −1.17
(0, 0, 4) 95.6317 95.6312 0.52 −5.0 −5.1 0.18 78 81 −1.47
(0, 1, 4) 99.6038 99.6030 0.74 −4.5 −4.2 −0.21 80 82 −1.36
(1, 1, 4) 103.6229 103.6222 0.70 −3.5 −3.4 −0.18 83 84 −0.40
(1, 3, 3) 107.7121 107.7115 0.65 −2.9 −2.6 −0.28 84 86 −1.23
(0, 2, 4) 111.8971 111.8966 0.44 −2.1 −2.0 −0.09 90 90 −0.01
(1, 2, 4) 116.2095 116.2091 0.39 −1.5 −1.5 −0.05 92 94 −0.96
(2, 3, 3) 120.6887 120.6882 0.49 −1.0 −0.8 −0.21 97 99 −1.21
(2, 2, 4) 130.3782 130.3779 0.32 −0.1 −0.0 −0.10 113 115 −0.90
(0, 0, 5) 135.7720 135.7715 0.49 0.1 0.5 −0.31 128 128 0.04
(1, 3, 4) 141.7499 141.7497 0.12 0.8 0.7 0.12 147 147 0.02
(3, 3, 3) 148.6580 148.6579 0.07 1.1 1.0 0.11 175 179 −0.87

Fig. 3.

Fig. 3

Line shapes with 2.5° Soller slits. Red, dotted curve is Topas. Black curve is this work.

Fig. 4.

Fig. 4

Line shapes with 5.3° Soller slits. Red, dotted curve is Topas. Black curve is this work.

Fig. 5.

Fig. 5

Line shapes with 10.6° Soller slits. Red, dotted curve is Topas. Black curve is this work.

Column Descriptions

  • (h,k,l) the reflection for this peak

  • tp top the angle of the highest point in the peak from Topas

  • py top same for the python implementation of this algorithm

  • Δ1 (tp top)-(py top)

  • tp ζ the distance between the centroid and the top, a measure of asymmetry

  • py ζ same for the python implementation of this algorithm

  • Δ2 (tp ζ)-(py ζ)

  • tp IB integral breadth of the peak from Topas

  • py IB same for the python implementation of this algorithm

  • % err fractional error in the IB

3.2 Realistic Source Spectrum and Parameters

We now compute a sample with a more realistic, full spectrum as determined from fits to data from the NIST Johansson incident beam monochromator, as described in [1]. All parameters shown in Table 6 were fit by Topas and FPAPC. Table 7 shows the detailed errors, and Fig. 6 shows the peak shapes.

Table 6.

Topas full Rietveld model parameters

Parameter Value Parameter Value
Zero Error −0.0268° Displacement −0.016 mm
Rp, Rs 217.5 mm Rec. slit width 75 µm
Fil. Length 8 mm Samp. Length 15 mm
Rec. slit length 12 Sample Absorption 126.8 cm−1
CSL 3027 nm CSG 488 nm
Lattice spacing 4.156925692 Å Equat. Diverg. 1.096°
Source Spectrum
intensity (la) wavelength (Å) (lo) Lor. width (mÅ) (lh) Gauss. width (mÅ) (lg)
1 1.540591 0 0.4323
0.7504 1.540591 0 1.6718
0.0418 1.540591 0 3.9651
0.1861 1.541064 0 0.4565

Table 7.

Comparison of pattern with full Rietveld fit from Topas

(h,k,l) tp top (°) py top (°) Δ1 (m°) tp ζ (m°) py ζ (m°) Δ2 (m°) tp IB (m°) py IB (m°) % err
(0, 0, 1) 21.3078 21.3085 −0.72 −8.0 −8.1 0.03 78 76 1.22
(0, 1, 1) 30.3409 30.3410 −0.14 −4.5 −4.2 −0.27 61 62 −0.48
(1, 1, 1) 37.4001 37.4006 −0.53 −2.7 −2.9 0.17 62 59 1.75
(0, 0, 2) 43.4665 43.4671 −0.57 −2.0 −2.2 0.22 59 60 −0.17
(0, 1, 2) 48.9187 48.9191 −0.33 −1.8 −1.9 0.03 62 61 0.74
(1, 1, 2) 53.9511 53.9513 −0.16 −1.8 −1.6 −0.14 63 62 0.67
(0, 2, 2) 63.1822 63.1820 0.15 −1.7 −1.4 −0.30 66 67 −0.31
(0, 0, 3) 67.5121 67.5121 0.00 −1.6 −1.3 −0.32 70 69 0.64
(0, 1, 3) 71.7100 71.7105 −0.43 −1.2 −1.2 −0.05 73 72 0.40
(1, 1, 3) 75.8092 75.8094 −0.16 −1.3 −1.1 −0.24 76 75 0.69
(2, 2, 2) 79.8353 79.8355 −0.21 −1.2 −0.9 −0.26 78 78 −0.05
(0, 2, 3) 83.8110 83.8116 −0.57 −0.6 −0.7 0.13 81 81 −0.30
(1, 2, 3) 87.7580 87.7581 −0.05 −0.9 −0.6 −0.29 84 85 −0.57
(0, 0, 4) 95.6384 95.6382 0.24 −0.6 −0.2 −0.44 92 93 −0.47
(0, 1, 4) 99.6099 99.6096 0.32 −0.4 0.1 −0.50 97 98 −0.20
(1, 1, 4) 103.6283 103.6286 −0.24 0.4 0.4 0.01 105 103 0.66
(1, 3, 3) 107.7175 107.7176 −0.17 0.4 0.7 −0.29 108 109 −0.46
(0, 2, 4) 111.9024 111.9021 0.26 0.5 1.0 −0.50 117 116 0.48
(1, 2, 4) 116.2141 116.2143 −0.16 0.9 1.2 −0.27 123 124 −0.33
(2, 3, 3) 120.6926 120.6929 −0.34 1.5 1.6 −0.08 131 133 −0.76
(2, 2, 4) 130.3809 130.3808 0.12 2.2 2.6 −0.43 157 160 −0.70
(0, 0, 5) 135.7736 135.7739 −0.29 3.0 3.1 −0.18 177 179 −0.82
(1, 3, 4) 141.7506 141.7510 −0.34 3.7 3.9 −0.24 205 208 −0.78
(3, 3, 3) 148.6569 148.6572 −0.27 5.0 5.3 −0.29 255 254 0.20

Fig. 6.

Fig. 6

Line shapes with full Rietveld. Red, dotted curve is Topas. Black curve is this work.

3.3 Comparison to Measurements

The most critical metric for comparison of the two programs is that of refined lattice parameter. SRMs 640e [17] and 660c [18] were certified in March, 2015 using data from the instrument described in [1]. The certification procedure involved the collection of twenty high-quality (24 hour scans) data sets for each of the two SRMs. These were analyzed independently using Topas with a Pawley analysis. With the NIST FPAPC, the twenty data sets were analyzed with a single, global refinement: specimen specific parameters, such as specimen displacement, were refined independently while instrument specific parameters, common across all data sets, were refined as single parameters. In Fig. 7 we show a typical fit to the data. Close correspondence between the instrument specific parameters obtained from Topas and those from FPAPC was observed. Additional testing indicated the residual error terms were not increased significantly by the variation of the instrument specific terms within the “window” of refined values obtained with the two codes. Instrument parameters, common to all data sets were then fixed at values that largely constituted the average values obtained with the two codes. This being done, the average of the lattice parameters values obtained from the average of the 20 independent Topas analyses, for both SRMs 640e and 660c, agreed with the corresponding global FPAPC values to within 2 fm.

Fig. 7.

Fig. 7

Example fit, and peak position errors for SRMs 640e and 660c.

Testing of the FPA model itself can be performed with an analysis of the variation in lattice parameter with reflection position in 2θ as reported previously [19]. This is a very sensitive test of the success of the FPA model as all the reflections in a pattern should give the same lattice parameter. Lattice parameter is the only property that is absolutely conserved across the entire pattern while profile asymmetry can vary dramatically in both degree and direction with 2θ. Again we used SRMs 640e and 660c for this purpose. In Fig. 7 we show the comparison of the peak positions from a globally refined lattice parameter, determined with FPAPC, with peak positions when refined independently. For a wide range of angles, from roughly 40° to 140° in 2θ, the corrections provided by the FPA are very good. There is, however, a clear, systematic tendency at low and high angles, where the peaks are most asymmetric, for the result to be biased. This is not understood, and is a matter of intense focus by the authors at this time. It is worth noting that the information of highest quality about the lattice parameter of the material comes from the peaks in the 50°–120° 2θ range, where contribution of aberrations are minimal and the angle is high enough that the contribution of a small angular error to the lattice parameter is minimized.

SRM 1979 is being certified for the measurement of crystallite size from an analysis of profile broadening. It was prepared by decomposing zinc oxalate in a large-scale, NIST-built vacuum furnace using a heating schedule derived from the procedures outlined in [20, 21]. The ZnO was then annealed in air to obtain two powders, one with an approximate crystallite size of 15 nm and a second one of 60 nm. In Fig. 8, we show a result of applying FPAPC code, extended to carry out the Scardi and Leoni model for log-normal crystallite size distributions [22] and the stacking fault density model of Warren [23]. This demonstrates that the algorithms described above can be extended to include complex models for material microstructure, many of which have natural representations in Fourier space. The breadth of the peaks in diffraction patterns from these ZnO materials varies widely due to the both crystallite size and the hkl specific stacking-faults.

Fig. 8.

Fig. 8

Full-pattern FPAPC fit to patterns from SRM1979-type ZnO 15 nm and 60 nm particles.

4. Discussion

The Fundamental Parameters Approach to X-ray powder diffraction line profile analysis has played a central role in NIST powder diffraction SRM development since its inception with the aforementioned work of Cheary, Coelho and Cline (and collaborators on various SRM projects). We have demonstrated that the refined lattice parameter values obtained with our independently written NIST FPAPC and those of the commercial code Topas, that NIST has used since the year 2000 for SRM certification, agree to within 2 fm. This observation would confirm that both the NIST FPAPC and Topas are preforming in accordance to published FPA models. This conclusion is further supported by the data presented in Secs. 3.1 and 3.2 that illustrate that the form of the FPA profiles from the two programs are essentially identical. The equivalence of results between the NIST open implementation of FPA models and those from Topas enhances the transparency of the analyses performed in the certification of NIST SRMs for powder diffraction.

Acknowledgments

Alan Coelho provided valuable discussion regarding the implementation of the “full” axial divergence model. The authors would also like to thank Michael P. Mendenhall and Kevin M. Warren for assistance in cross checking the reference Python code with the paper for consistency.

Biography

About the authors: Marcus Mendenhall joined the NIST staff in 2014, after 30 years on the faculty at Vanderbilt University. He has worked primarily on ionizing radiation effects in materials and computational techniques for data analysis and modeling. Katharine Mullen joined NIST as a postdoctoral researcher in the Statistical Engineering Division, and was a staff member in the Ceramics Division, 2009–2012. Her research interests include computational physics, optimization and computational statistics. Jim Cline began his career at NIST as an NRC Postdoctoral Fellow in 1986 and has worked in X-ray diffraction metrology from the onset. His primary contribution includes the suite of NIST SRMs by which the worldwide X-ray wavelength diffraction community calibrates its equipment and measurements. The National Institute of Standards and Technology is an agency of the U.S. Department of Commerce.

5. Appendix A. Convolutions in Fourier Space

A computational technique, such as the FPA, which depends heavily on convolutions often can be represented very efficiently in Fourier space via the Convolution Theorem. That is, if a convolution is written as:

f(x)g(x)f(xx)g(x)dx (40)

and if we use f˜ to represent the Fourier transform of f, then

fg˜=f˜g˜ (41)

which is to say that a convolution reduces to multiplication of Fourier transforms. If one is working with functions on a discrete grid, computing the convolution directly from 40 may be an efficient technique if the number of non-zero elements in g is much less than the number of elements of f. The time to carry out a convolution directly scales as nfng where the n are the length of the sets. However, using FFT only costs a time proportional to n log n, so if log n is of the order of the length of ng or less, it may be advantageous to work in Fourier space. Since it is often the case that log nng, and the penalty in the other case is fairly minimal, we choose to do all our convolution work in Fourier space. As such, we will derive analytic forms for the Fourier transform of most of the functions we need, and avoid transforming real-space functions into Fourier space to carry out the convolutions. This is not a major factor in the present paper. We compute the Axial Divergence function in real space, because it is much more easily represented there than in Fourier space, and then take the FFT of it to perform the convolution. All the other convolutions could be equivalently computed and carried out in real space.

Some important cases of analytic forms of transforms we use are presented in this section.

5.1 Top-Hat Function

If f (x) = 1/w for −w/2 < x < w/2 (a unit-area top hat), then

f˜(ω)=sin(wω/2)wω/2sinc(wω2π) (42)

where the sinc function is defined as (in some implementations)

sincx=sinπxπx.

One should check if using sinc since another standard omits the π. It is useful to use instead of directly computing the ratio, since the ratio produces a 0/0 at the origin, and the sinc function correctly takes the limit.

5.2 Gaussian Function

If f (x) is the unit-area Gaussian as follows:

f(x)=12πσexp(x22σ2) (43)

then its Fourier transform is:

f˜(ω)=exp(x2σ22). (44)

Also worth noting is that in X-ray diffraction, a Gaussian is often specified by its FWHM. σ is related to the FWHM s as

σ2=s28log2. (45)

5.3 Lorentzian Function

If f (x) is the unit-area Lorentzian with FWHM Γ, as follows:

f(x)=(Γ2π)1x2+(Γ/2)2 (46)

then its Fourier transform is:

f˜(ω)=exp(|Γω/2|). (47)

5.4 One-Sided Exponential Tail

If f (x) =δ exp(δx) for x0 < x < 0 (with x0 < 0) and zero elsewhere, then the Fourier transform of the function is

f˜(ω)=1δ1exp(x0(iω+1/δ))iω+1/δ. (48)

Note that we present this in not-quite-normalized form. If x0 → −∞, it has unit area. We will use this in the case of finite sample thickness, in which case it should not be normalized to unit area, but just as shown here.

5.5 Translation of a Function

The Fourier transform of f (x + a) for any f is:

f(x+a)˜=f˜(ω)exp(iωa). (49)

6. Appendix B. Mapping of Important Variables from Sample Python Code to Paper, and Other Code Notes

Code available at http://dx.doi.org/10.6028/jres.120.014.c

6.1 Names

Python name name in paper and explanation

axial_helper F0()

_fxbuf no name in paper, a scratch buffer saved for memory efficiency

searchsorted() a function which takes an ordered array and a list of values, and returns the bin index from the array for the number exactly matching each of the values, or returns the index of the bin to the right if the value falls between to bins.

6.2 Python Array Indexing

The most complex part of an efficient implementation of the FPA is the assignment of data to specific bins in a discretized representation of a computed diffraction profile. This is the reason for the complexity of F0. Because every computer language has its own conventions for how to index an array, and this is central to this work, we include here short notes about the Python language array indexing, to assist in translation to other languages. Thus, Python arrays:

  • are indexed in a zero-based manner; x[0] is the first element of an array

  • permit negative indexing to index from the last element; x[−1] is the last element of an array

  • can have a sub-array taken from them by indexing x[1:5]; this means the four elements of the array x[1], x[2], x[3], and x[4]. The length of a slice is the difference between the ending and starting indices. This is a feature of python indexing which can cause confusion, but is quite handy. This rule also implies that x[1: −1] indexes everything except the first and last elements of the array.

  • can have every second (e.g.) element, starting from 1 and ending before 9, indexed as x[1:9:2]; this extracts x[1], x[3], x[5], and x[7]. Note that x[9] is excluded since the upper end is never included. Thus, to negate all the odd-numbered elements of an array, x[1::2]*= −1. Note that empty index slots mean all possible, so this includes (potentially) the last element of the array. This is used extensively to re-phase Fourier transforms so that the zero position of the inverse transform is in the center of an array, rather than at the left edge, with negative positions wrapped to the right edge.

6.3 General Notes

The code, as provided in the supplementary material, is quite a bit more complex than a stripped-down reference implementation normally would be. This is due to the fact this version includes quite a bit of capability related to caching results which are likely to be re-used in the process of least-squares fitting of peaks. It is advised that the reader wishing to understand the underlying theory pay primary attention to the contents of the “conv_xxx” functions, which contain the machinery used to generate the convolutions, and to the various functions beginning with “axial_” which handle the real-space parts of the axial divergence integral.

Footnotes

1

Certain commercial equipment, instruments, or materials are identified in this paper in order to specify the experimental procedure adequately. Such identification is not intended to imply recommendation or endorsement by the U.S. government, nor is it intended to imply that the materials or equipment identified are necessarily the best available for the purpose.

2

The Fundamental Parameters Approach Python Code (FPAPC) is provided by NIST as a public service. The FPAPC is provided for research purposes only and is not to be used for commercial purposes. Use of the FPAPC is subject to the terms and conditions which accompany the FPAPC itself.

Contributor Information

Marcus H. Mendenhall, Email: marcus.mendenhall@nist.gov.

Katharine Mullen, Email: katharine.mullen@statistics.UCLA.edu.

James P. Cline, Email: james.cline@nist.gov.

7. References

  • 1.Cline James P, Mendenhall Marcus H, Black David, Windover Donald, Henins Albert. The optics and alignment of the divergent beam laboratory X-ray powder diffraction and its calibration using NIST Standard Reference Materials. J Res NIST. 2015 Sep;120:173–222. doi: 10.6028/jres.120.013. http://dx.doi.org/10.6028/jres.120.013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Hölzer G, Fritsch M, Deutsch M, Härtwig J, Förster E. Kα1,2 and Kβ1,3 x-ray emission lines of the 3d transition metals. Phys Rev A. 1997 Dec;56(6):4554–4568. doi: 10.1103/PhysRevA.56.4554. [DOI] [Google Scholar]
  • 3.Wilson AJC. Mathematical Theory of X-ray Powder Diffractometry. Gordon & Breach; New York, NY, USA: 1963. [Google Scholar]
  • 4.Cheary RW, Coelho A. A fundamental parameters approach to X-ray line-profile fitting. J Appl Cryst. 1992;25(2):109–121. doi: 10.1107/S0021889891010804. [DOI] [Google Scholar]
  • 5.Cheary RW, Coelho AA. Axial divergence in a conventional X-ray powder diffractometer. I. theoretical foundations. J Appl Cryst. 1998;31(6):851–861. doi: 10.1107/S0021889898006876. [DOI] [Google Scholar]
  • 6.Cheary RW, Coelho AA. Axial divergence in a conventional X-ray powder diffractometer. II. realization and evaluation in a fundamental-parameter profile fitting procedure. J Appl Cryst. 1998;31(6):862–868. doi: 10.1107/S0021889898006888. [DOI] [Google Scholar]
  • 7.Bergmann J, Kleeberg R, Haase A, Breidenstein B. In: Böttger AJ, Delhez R, Mittemeijer EJ, editors. Advanced fundamental parameters model for improved profile analysis; Proceedings of the Fifth European Conference on Residual Stresses; Zürich Uetikon, Switzerland; Trans Tech; 2000. pp. 303–308. http://dx.doi.org/10.4028/www.scientific.net/msf.347-349.303. [Google Scholar]
  • 8.Cheary RW, Coelho AA, Cline JP. Fundamental parameters line profile fitting in laboratory diffractometers. J Res NIST. 2004;105:1–25. doi: 10.6028/jres.109.002. http://dx.doi.org/10.6028/jres.109.002. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Cheary RW, Coelho AA. Peak fitting using xfit-koalariet. URL http://www.ccp14.ac.uk/tutorial/xfit-95/xfit.htm.
  • 10.Cheary RW, Coelho AA. Programs XFIT and FOURYA deposited in CCP14 Powder Diffraction Library. Engineering and Physical Sciences Research Council, Daresbury Laboratory; 1996. [Google Scholar]
  • 11.Bruker AXS Topas v4.2, a component of DIFFRAC.SUITE. 2014 URL https://www.bruker.com/products/x-ray-diffraction-and-elemental-analysis/x-ray-diffraction/xrd-software/overview/topas.html.
  • 12.NIST . Standard Reference Material 660a: Lanthanum hexaboride powder line position and line shape standard for powder diffraction SRM certificate. NIST, U.S. Department of Commerce; Gaithersburg, MD, USA: Sep 13, 2000. URL https://www-s.nist.gov/srmors/view_detail.cfm?srm=660a. [Google Scholar]
  • 13.NIST . Standard Reference Material 640c: Line position and line shape standard for powder diffraction (silicon powder) SRM certificate. NIST, U.S. Department of Commerce; Gaithersburg, MD, USA: Sep 13, 2000. URL https://www-s.nist.gov/srmors/view_detail.cfm?srm=640c. [Google Scholar]
  • 14.Python web site. 2015 URL http://www.python.org.
  • 15.Cheary RW, Coelho A. Synthesizing and fitting linear position-sensitive detector step-scanned line profiles. J Appl Cryst. 1994;27(5):673–681. doi: 10.1107/S0021889893014165. [DOI] [Google Scholar]
  • 16.Mendenhall Marcus H. Fast computation of Voigt functions via Fourier transforms. J Quant Spect & Rad Trans. 2007 Jul;105(3):519–524. doi: 10.1016/j.jqsrt.2006.11.014. [DOI] [Google Scholar]
  • 17.NIST . Standard Reference Material 640e: Line position and line shape standard for powder diffraction (silicon powder) SRM certificate. NIST, U.S. Department of Commerce; Gaithersburg, MD, USA: Mar 10, 2015. URL https://www-s.nist.gov/srmors/view_detail.cfm?srm=640e. [Google Scholar]
  • 18.NIST . Standard Reference Material 660c: Line position and line shape standard for powder diffraction (lanthanum hexaboride powder) SRM certificate. NIST, U.S. Department of Commerce; Gaithersburg, MD, USA: Mar 10, 2015. URL https://www-s.nist.gov/srmors/view_detail.cfm?srm=660c. [Google Scholar]
  • 19.Black David R, Windover Donald, Henins Albert, Filliben James, Cline James P. Certification of standard reference material 660b. Pow Diff J. 2011;26(Special Issue 02):155–158. 6. doi: 10.1154/1.3591064. [DOI] [Google Scholar]
  • 20.Louër D, Auffrédic JP, Langford JI, Ciosmak D, Niepce JC. A precise determination of the shape, size and distribution of size of crystallites in zinc oxide by X-ray line-broadening analysis. J Appl Cryst. 1983;16(2):183–191. doi: 10.1107/S0021889883010237. [DOI] [Google Scholar]
  • 21.Auffrédic Jean-Paul, Boultif Ali, Langford J Ian, Louër Daniel. Early stages of crystallite growth of ZnO obtained from an oxalate precursor. J Am Cer Soc. 1995;78(2):323–328. doi: 10.1111/j.1151-2916.1995.tb08803.x. [DOI] [Google Scholar]
  • 22.Scardi Paolo, Leoni Matteo. Diffraction line profiles from polydisperse crystalline systems. Acta Cryst A. 2001;57(5):604–613. doi: 10.1107/S0108767301008881. [DOI] [PubMed] [Google Scholar]
  • 23.Warren BE. X-ray diffraction. Addison-Wesley; Reading, MA, USA: 1969. [Google Scholar]

Articles from Journal of Research of the National Institute of Standards and Technology are provided here courtesy of National Institute of Standards and Technology

RESOURCES