Instrumental resolution as a function of scattering angle and wavelength as exemplified for the POWGEN instrument

A fundamental description of the instrument resolution file is elaborated for the angular- and wavelength-dispersive cases of Rietveld refinement, exemplified for the POWGEN instrument. It is shown how to refine the necessary profile function parameters from a dataset measured on a diamond reference sample. The analysis is performed in a two-dimensional refinement space based on the convenient variables d and d ⊥.


Introduction
Since its invention in the late 1960s the Rietveld method (Rietveld, 1969) has been widely used for the investigation of structural and -using neutron powder diffraction -even magnetic properties of powdered polycrystalline samples. One of the prerequisites for the analytical description of total integrated intensities by a least-squares fit of the full diffraction profile is the appropriate description of the individual peak shapes. When the Rietveld method was first introduced mainly Gaussian distributions were considered, but over time more and more complex peak shapes have been added to the pool of usable peak profiles, culminating in highly sophisticated peak shape functions such as pseudo-Voigt with back-toback-exponentials (Von Dreele et al., 1982) as used at modern time-of-flight (TOF) diffractometers.
When trying to properly describe the peak shape, it immediately becomes apparent that a plethora of different ISSN 1600-5767 effects are contributing. These can be divided into instrumental effects arising from the neutron source as well as the layout of the instrument -causing a change in instrumental resolution with the scattering variables -and the intrinsically more interesting sample effects (e.g. crystal structure, particle size, micro-strain or texture effects). In general, a so-called instrumental resolution file (IRF) is provided to the user of a modern TOF instrument, comprising the basic parameters for a description of the source/instrument contribution to the measured peak shapes. These parameters should remain fixed during the refinement procedure such that deviations from the observed peak shape have to be addressed by additional sample-dependent terms.
Modern powder diffractometers with large area detectors at advanced neutron spallation sources typically operate in TOF mode, initially resulting in angular-and energy-dispersive datasets. The current approach at existing TOF instruments is to reduce, transform and integrate the accumulated data to the well known one-dimensional diffraction patterns (Schä fer et al., 1992; http://www.mantidproject.org) that can be routinely treated using standard Rietveld refinement packages (Bruker, 2005;Toby & Von Dreele, 2013;Larson & Von Dreele, 1994;Lutterotti et al., 1999;Rodriguez-Carvajal, 1993;Petříček et al., 2014). This procedure has the advantage of providing readily refinable diffraction datasets that are relatively small in size and thus allow for quick calculation times. A significant amount of the originally available information is lost, however, and cannot be exploited. Furthermore, regions of varying resolution are integrated for single reflections, which can ultimately lead to a complex variation of the peak shape in a single diffraction pattern.
It would therefore be highly favorable to avoid these datatreatment steps and use the neutron diffraction data in its original two-dimensional (i.e. intensity as a function of 2 and TOF/) form. Up to now, only very few scientific publications could be found that are at least related to this important topic (Schä fer et al., 1992;Wang et al., 2004).
In order to improve the data analysis capabilities for powder diffraction, we have recently devised (Jacobs et al., 2015) an alternative approach using the diffraction data in their pristine form and implementing a two-dimensional description of the peak shape variation. In this study we build upon the foundations laid out in the quoted paper and not only refine but also advance our approach. This is achieved by closely examining the dataset of a standard diamond sample measured at the POWGEN instrument, which serves as one suitable reference for the instrument resolution function (Huq et al., 2010). POWGEN is a medium-to high-resolution instrument featuring a large area detector designed and built to optimally match the angular resolution Á cot to the almost constant relative time resolution Át=t (Huq et al., 2010), resulting in an almost constant Ád/d within the total frame of a measurement. Thus, at first glance, the POWGEN instrument might not seem to be the best choice for such an investigation, but we will show that even for an instrument optimized for constant resolution one may gain a significant benefit in the characterization of the instrumental resolution by the multi-dimensional approach, mainly because, in addition to the width, the shape also changes with 2 and . Additionally, most other time-of-flight powder diffractometers have less homogeneous resolution functions: see for example the instruments WISH, POLARIS, HRPD at ISIS and Super-HRPD at JPARC. Currently, the valid approaches in data analysis are more or less workarounds, which either ignore most of the data and focus on the region of interest (e.g. backscattering for high resolution) or group data according to different detector banks for a multi-pattern Rietveld refinement process. The ability to deal with varying resolution functions also allows for a simpler and more cost-effective detector design, as seen for future instruments such as POWTEX (Conrad et al., 2008;Houben et al., 2012) and DREAM (Schweika et al., 2016). In general, all these instruments will hugely benefit from the two-dimensional approach.
The ultimate goal will thus be to illustrate the necessary steps for a full parameterization of the instrumental resolution function and, on this basis, provide an IRF for the angular-and wavelength-dispersive case.

Neutron powder diffraction data
A standard diamond sample (see Table 1 for crystallographic data) was measured on the POWGEN instrument (SNS, Oak Ridge National Laboratory) for 6.5 h at room temperature using the instrument setup according to bank 1 ( Center = 0.533 Å ). This measurement was carried out by the instrument team of POWGEN and the data were kindly given to us by Ashfia Huq, lead scientist at POWGEN. The total number of neutron events in this measurement was approximately 150 million in a 2 range between 17.5 and 150 and a range between close to 0 and 1.101 Å . For correction and normalization purposes, measurements of a vanadium sample and the empty sample can were provided, with each dataset containing approximately 72 million and 3.7 million neutron events, respectively. The diamond, vanadium and background datasets were treated as reported previously (Jacobs et al., 2015). Owing to the high ratio between coherent and incoherent scattering cross sections of carbon (5.55:0.001 b; 1 b = 100 fm 2 ; Dianoux & Lander, 2003) only a small portion of the neutrons add to the background, while the majority of the detected neutrons contribute to the reflections. Hence, the signal-tonoise ratio in this dataset is (slightly) better than that in the CuNCN sample used in our previous study, which was also measured at POWGEN for approximately 7.5 h.  Table 1 Crystallographic data of diamond.

Parameterization of the instrument (instrumental resolution function)
For a full two-dimensional parameterization of the instrumental resolution function of POWGEN and, ultimately, to derive an instrumental resolution file, we used a high-neutroncount dataset measured on a standard diamond sample. This standard sample is normally used to derive the calibration file, for example the d offsets for each detector pixel. The accurate determination of d offsets necessitates a rather high overall neutron count, which also benefits the angular-and wavelength-dispersive refinement approach. As has already been pointed out (Jacobs et al., 2015) the first step towards a full parameterization of the instrumental resolution and thus a full description of the reflection shape variation consists of extracting the shape-defining parameters out of a measured dataset taken from a 'standard' sample. Thereby one assumes the final diffraction pattern -and to an even greater extent the profile shape of each reflection -to be almost free of sample effects. As has been shown before (Jacobs et al., 2015) the best approach to extract these parameters is to use slices of small data intervals Ád ? which are distributed around the orthonormal curve given by where is the wavelength and denotes the Bragg angle.
Here, we have chosen the (arbitrary) constant 2 K = 1 Å 2 , which defines specific and appropriate orthogonal coordinates d and d ?. . Three of these orthonormal curves together with the three-dimensional representation of the dataset are depicted in Fig. 1. The data points in the interval {d ? 2 R | 0.73 d ? 0.77 Å }, corresponding to the leftmost slice in Fig. 1, are plotted in Fig. 2 (upper part), together with three highlighted reflections (lower part). Typically, the peak profile for refining diffraction patterns obtained at the POWGEN instrument is approximated using a pseudo-Voigt function with back-toback exponentials (pV-b2b). The same notation was used to fit the reflections shown in the lower part of Fig. 2 (green dashed line). In addition, each peak was also fitted using a standard pseudo-Voigt (pV) function (red solid line). By comparing both fit results it becomes apparent that using the standard pV notation yields comparable results for the full width at halfmaximum (FWHM), while even simplifying the refinement owing to the absence of the rise-and-decay parameters of the back-to-back exponentials. The d value, in contrast, is  Three-dimensional plot of the neutron powder diffraction pattern of diamond. Opaque surfaces represent the intensity distribution along the orthonormal cuts at d ? = 0.75, 1.12 and 1.68 Å .

Figure 2
Orthogonal cut with data points in the range 0.73 < d ? < 0.77 Å (upper part). Comparison of the fits using either a pseudo-Voigt with back-to-back exponentials (red solid line) or a standard pseudo-Voigt function (green dashed line) for reflections 111 (3), 311 (2) and 642 (1). different for the two peak shapes; the pV function with backto-back exponentials usually shifts to lower d values as was already elaborated on by Von Dreele et al. (1982). For the determination of the peak width we can therefore safely resort to the use of a standard pseudo-Voigt peak profile such that only two parameters, the FWHM (denoted as H herein) and the Lorentzian mixing parameter (), must be extracted from a sufficiently large number of points in the diffraction pattern. The alternative description using the Thompson-Cox-Hastings (Thompson et al., 1987) notation (e.g. unique FWHM parameters for the Gaussian and Lorentzian components) in principle opens up a somewhat more physically meaningful handling of the profile in the one-dimensional case. This is because sample-related effects can be more strictly assigned to either the Gaussian or the Lorentzian part, depending on their own type of distribution. For the present study we will nevertheless resort to a parameterization of the complete FWHM as a function of the scattering angle and the wavelength.
When using d ? slices the analysis of the reflection shape is done by applying an individual FWHM but a common value to each reflection contained in a single d ? slice. Fitting of the pV function to the data points of a single reflection is done using the intensity I as a function of d spacing: where L(d À d hkl ) is the Lorentzian part given by and G(d À d hkl ) is the Gaussian part, In these equations S is a scaling factor, is the Lorentzian mixing parameter, H denotes the FWHM of the reflection hkl, d is the d value of each data point and d hkl is the central d value of the reflection around which the intensity is calculated.
This has the distinct advantage that no additional parameters are needed to convert time of flight to d spacing as is commonly needed for today's refinement programs.
When evaluating the results of the extracted H values for the datasets binned in 2 and , it becomes apparent that the bin size of either has an immediate impact. In Table 2 we provide a comparison of H values for reflections at d = 0.477, 1.076 and 2.059 Å using data points in a slice with {d ? 2 R | 0.73 d ? 0.77 Å } and different bin sizes. Apparently, the FWHM strongly depends on the chosen bin size and varies significantly with the slope of the Bragg curves for each reflection. Reflections at higher d values (steeper reflections; to the left) are highly influenced by too broad a binning in 2 (FWHM increases by $300%), while the binning of is only of minor importance. For lower d values (flat slope; horizontal to the right) the binning of has the highest impact (increase of $200% in FWHM), whereas the 2 binning has only a small influence. Reflections at medium d values are influenced by both bin sizes and show an increase of FWHM of $300%.  Table 2 Comparison of H values for selected reflections extracted from datasets obtained with different bin sizes for 2 and using data points in the interval 0.73 d ? < 0.77 Å .  the three reflections. Apart from the FWHM, it becomes obvious that with larger bin sizes the pV function is not an adequate description of the intensity distribution anymore, but the peak shapes become more and more 'top hat' like (see Fig. 3, right). If the binning is too coarse, the peak shape is clearly dominated by binning effects, which should be avoided. Additionally, the density of data points is smaller for larger bin values so that especially at low d spacing there are an insufficient number of data points describing each reflection. On this account the d ? range for selecting the data points for each binning method shown in Fig. 3 had to be individually adjusted for each reflection to give at least ten contributing data points per FWHM. Note that we will introduce a mechanism to ensure that this bin size requirement per FWHM is globally met for the entire pattern. For the moment, let us assume that the change of the FWHM is not affected by the bin sizes, i.e. the number of points/FWHM is sufficient. Fortunately, there is an alternative to the 2 and binning approach that allows an easier treatment of the resolution change. As was already laid out in our previous paper, it is better to use d and d ? as new coordinates which span an orthogonal coordinate system where all reflections are represented by straight lines (see Fig. 4), while the orthogonal cut of the reflection is a horizontal line. This can be done simply by using equation (1) and the Bragg equation to convert the 2 and values of each detected neutron event to d and d ? and binning all neutron events in this tailor-made coordinate system. Owing to the constant monitoring of the two independent variables, an easy transformation between the two coordinate systems is always possible, including during the refinement. Replacing in equation (1) by arcsinð=2dÞ and solving the equation for leads to the following equation: Herein ! is the Wright omega function (Wright, 1959;Corless & Jeffrey, 2002), which is defined in terms of the Lambert W function (Lambert, 1758;Corless et al., 1996). Accessing different coordinate systems during the refinement will allow for corrections as regards extinction, absorption and other effects (Sabine et al., 1988) on the intensity data in their natural dependency. Furthermore, this in principle also allows us to reuse or even combine existing parameterizations in 2 and/or with a d/d ? binning. For a first approach the binning in d can be done (as is usual) using a quasi-logarithmic binning scheme for POWGEN with bin boundaries calculated by  Two-dimensional (left) and quasi-two-dimensional (right) representation of the neutron powder diffraction data of diamond binned in d and d ? using bin sizes of Á = 0.0008 and Ád ? = 0.00872 Å .
number of data points per FWHM. Using this binning scheme, a homogeneous distribution of data points can be achieved, which yields between five and ten data points per FWHM for each reflection, as has been suggested by McCusker et al. (1999). The resulting FWHMs of this binning scheme are summarized in Table 4. Using the resolution-adapted binning scheme, the number of data points per FWHM is constant throughout, with no significant influence on the FWHM. Hence, it seems highly recommendable to use the resolutionadapted d and d ? binning scheme for analyzing angular-and wavelength-dispersive datasets. In the following we therefore concentrate on the dataset using 40 d ? slices and approximately ten data points per FWHM as this is an excellent compromise between computational effort, good counting statistics and reasonable data-point density. The one-dimensional approach is the limiting case for a single d ? bin. Once any influence on the peak profile stemming from the binning scheme can be excluded, one may derive an analytical description for the distribution of H values. Ideally, one should try to mirror the underlying physical principles contributing to the intensity distribution of the reflections. Typically, the resolution and thus the FWHM of each reflection is approximated using the following equation: Herein Á, Át and ÁL are the uncertainties in scattering angle, TOF and total flight path, respectively. denotes the scattering angle, t is the time of flight and L is the total flight path from the source to the detector. To derive meaningful values for all three contributions one needs to take a closer look at the instrument, sample and source properties. The angular resolution is given by the layout of the detector (Á Detector ), the divergence of the neutron beam (Á Divergence ), and the sample size and shape (Á Sample ): Since POWGEN's detectors are mainly arranged around an azimuthal angle of ' = 0, we are mainly concerned with the in-plane probability distribution of the neutrons scattered from the sample. The uncertainty in scattering angle caused by the detector is therefore given by the horizontal extent (= width) of each detector pixel (w Detec ) and the distance L 2 of the detector pixel from the sample ('secondary flight path'): w Detec of each detector pixel is the FWHM of a continuous uniform distribution with size equal to the horizontal extent of the detector pixel. For a detector pixel width of 5 mm the uniform distribution width is calculated to be w Detec = 3.39 mm. The same considerations can be applied for the contribution due to sample geometry and size. We only consider a horizontal cut through the otherwise cylindrical sample normally used for diffraction measurements. This leaves us with a circular cross section for which the FWHM of a Gaussian distribution is calculated as w Sample = 4.33 mm for a sample with a diameter of d = 6 mm.
The uncertainty caused by the divergence is mainly governed by the horizontal divergence. Monte Carlo simulations of the neutron guide system employing the program package VITESS (Wechsler et al., 2000;Lieutenant et al., 2014) suggest that the horizontal divergence of Á2 Divergence = 0.11 = 1.92 Â 10 À3 rad shows almost no dependence on the wavelength.
Finally, POWGEN's detector panels are arranged around the sample following an equi-angular spiral with where L 2 is the radial distance and 2 is the scattering angle in radians. L 2 A and L 2 B are arbitrary constants describing the size and the curvature of the spiral, respectively. In accordance with previous data (Huq et al., 2010), initial design values of L 2 A = 4.7 m and L 2 B = 0.1 rad À1 were chosen. A fit using equation (12) The time uncertainty and pulse duration is essentially determined by the characteristics of the poisoned decoupled moderator, and in a first approximation is proportional to the neutron wavelength. With an estimate of Át = 10 ms and a total time of flight of t = 16.05 ms for a flight path length of L = 63.5 m and for a wavelength of = 1.0 Å , one obtains The uncertainty in length ÁL with respect to the neutron guide, the sample and the detector has been calculated by VITESS simulations. By estimating the total flight path L as the mean traveling distance of 63.5 m and setting ÁL = 2 mm (FWHM), equation (12) becomes The final instrumental resolution emerges by inserting equations (13), (14) and (15) into equation (10). A summary of all parameters contributing to the calculation of H together with their initial values is given in Table 5. Additionally, in the left part of Fig. 5 the extracted H values are shown together with the hyper-surface of the analytical model. Even though none of the parameters deduced above were refined, there is already an excellent agreement of the FWHM values with an overall R 2 = 0.957. For refining the analytical function three parameters (u 1 , u 2 and u 3 ) as multipliers to the Á, Át and ÁL values can be used, but it is unsurprising that especially u 2 and u 3 exhibit a strong correlation as Át and ÁL have rather similar contributions to the instrumental resolution. It seems therefore convenient to just keep u 1 and rather add an additional resolution term Á add , which comprises all unknown additional contributions: Refining these two parameters yields u 1 = 0.886 (5) and Á add = 0.00135 (3), with an even better overall R 2 of 0.987. This parameterization has two main advantages: (1) The behavior of the FWHM for all reflections observed in the angular-and wavelength-dispersive diffraction pattern is based on well defined physical and geometrical properties of the instrument and the sample.
(2) With deviations from instrumental resolution, properties of the sample can be revealed. For example, micro-strain and/or size effects can be analyzed by an additional contribution to the FWHM.
To further stabilize the parameterization, all reflections in a single d ? slice were refined using the same value. The extracted values indicate an increase with larger d ? values, illustrating the different contributions of the resolution terms in different parts of the two-dimensional pattern. A linear fit approximation with the data shown in the right part of Fig   The last step is to apply the approach laid out in the preceding sections to the entire diffraction pattern -and thus perform a Rietveld refinement. As has already been pointed out (Jacobs et al., 2015), at the current stage all structural parts contributing to the intensity calculation are handled by supplying the h, k, l, M and F 2 values derived from the conventional (one-dimensional) Rietveld refinement using the FullProf program package (Rodriguez-Carvajal, 1997) to the fitting routines written in MATLAB (http://www.mathworks. com). The results of this refinement are summarized in Table 6 and shown in Fig. 6. As is evident from Fig. 6 the calculated pattern is in very good agreement with the experimental one, with an overall R 2 of 0.993 and a profile R value of R P = 9.99. Compared to the one-dimensional case, the R P value is slightly larger owing to the somewhat enhanced noise in the twodimensional pattern. The lattice parameter a derived from the two-dimensional refinement is slightly higher than that from the standard Rietveld refinement using FullProf. This is expected as in the two-dimensional case only a standard pseudo-Voigt function was used, whereas in the one-dimensional case the pV function with back-to-back exponentials was employed.
Given the results from the final refinement of the complete diffraction pattern, we may now compile a two-dimensional instrumental resolution file as is provided by all modern TOF instruments assuming that the measured sample, apart from its volume, has no influence on the peak profile. An example of such an IRF input for GSAS is presented in Fig. 7. The format shown is based on the most recent GSAS parameter file provided on the POWGEN home page for cycle 2014-B (PGHR_60-2014B.prm). Using a two-dimensional version of the pV function with back-to-back exponentials (profile function 7) some important keywords were changed. First, 'HTYPE' was changed from 'PNTR' to 'PN2R' to indicate a two-dimensional refinement of powder neutron data. Second, 'PRCF' for the profile function type was changed from 3 (onedimensional, pV-b2b) to 7 (two-dimensional, pV-b2b). Function 6 will use a two-dimensional pV function. Additional parameters are appended to the standard IRF using the  Table 6 Results of the two-dimensional pattern fitting using MATLAB for the experimental data of diamond (POWGEN) and comparison with the standard one-dimensional refinement using FullProf.

Figure 6
Measured (top), fitted (middle, R 2 = 0.993) and differential (bottom) diffraction patterns of diamond data from POWGEN with 40 d ? slices and Á Div = 10. The color bar denotes the intensity as a percentage of the largest intensity peak in the experimental diffraction pattern. Reflections have been drawn broader than they really are to enhance the overall clarity.

Figure 7
An example of an IRF for the POWGEN instrument, based on GSAS input format. Newly added parameters are shown in green. sections for PRCF17, PRCF18 and PRCF19. Those lines hold the parameters introduced above. Of course, this file is a rather simplified version of such an input file for the twodimensional approach as it is not yet available in any of the distributed software packages. It will thus have to be changed according to the needs of the respective refinement software.
From a more general perspective, we also mention that the d-d ? binning is perfectly suited for nonlinear multi-bank approaches, which have been used to analyze data from POLARIS and GEM (Williams et al., 1997;Hull et al., 1992), as each d ? slice can be regarded as a single pattern that can be fed into current refinement programs. Nevertheless, even in this case the parameters describing the peak profile of each slice have to be linked according to the two-dimensional approach laid out in this work. The limiting case of a single d ? bin is, in fact, the standard 'diffraction focusing' approach currently applied by almost every TOF instrument. We reiterate that by reducing the number of d ? slices the original information content as well as the pristine instrumental resolution is lost. As has been shown above, however, refining angular-and wavelength-dispersive data is possible without prior data reduction according to the two-dimensional approach presented here.

Conclusion and outlook
We have elaborated on the Rietveld refinement of angularand wavelength-dispersive datasets with special attention to the binning scheme, which has a huge impact on the reliability and interpretability of diffraction patterns. We chose a standard diamond sample obtained from the POWGEN instrument to determine a two-dimensional instrument resolution function using a fundamental description and values. We extended our approach of using the d-d ? coordinate system by also including the transformations back to 2/ or any other coordinates allowing us to most efficiently describe an instrumental or sample behavior. For the description of the profile function, i.e. the FWHM and shape parameterization, the d-d ? system is a good choice. This naturally follows from the definition of d ? , which is the solution of a differential equation requiring orthogonal cuts to be exactly perpendicular to all reflections. This is not the case in other possible coordinate systems like d, 2 or Q, 2. This finding allows a much easier data representation and binning procedure.
In particular, regarding the binning we have chosen a logarithmic binning in d spacing and a linear binning in d ? , and we compare it with the previously chosen 2 and binning. The advantage of the d-d ? coordinate system can be further exploited by using a resolution-derived and thus varying d and d ? binning to achieve an optimized data-point distribution with minimal sacrifice of information.
Although the future POWTEX instrument (which features a large detector coverage and cost-efficient detector design) as well as the DREAM instrument at the ESS will greatly benefit from the two-dimensional approach, we have demonstrated a major gain regarding the right description of the instrumental resolution even for the POWGEN instrument. This is espe-cially true as the instrumental contributions are now based on instrumental design parameters and sample geometry, reflecting real properties of the experimental setup. Additional contributions from the sample can now be addressed more efficiently and attributed to the different terms of the resolution function according to their origin type. In response to similar procedures at existing instruments, we have also derived an instrumental profile function for POWGEN which may be provided to the user in the form of an instrumental resolution file.
In addition, the new approach will give experienced TOF users the opportunity to check the data quality more thoroughly. Furthermore, we believe that the novel approach allows more freedom to utilize less complex detector arrangements. For example, the geometry chosen for the POWTEX instrument is cylindrical, with its axis in the beam direction, adapting to the Debye-Scherrer cones. However, the proposed approach should be of general interest for powder diffraction instruments at pulsed neutron sources.
With the introduction of two-dimensional profile functions and their specifications given in an instrumental resolution file, future work will aim at providing a better incorporation of sample effects (e.g. preferred orientation, absorption and so on). Finally, we aim to implement the multi-dimensional refinement procedure into common Rietveld program suites in order to offer all necessary data-treatment possibilities to the users. This new development is open for joint activities with program authors of existing user software, and we welcome current considerations towards an implementation into GSAS-II (Toby & Von Dreele, 2013). Finally, it is worth noting that for future users a benchmarking of the new methods has to be carried out on refined sample parameters like bond distances or atomic displacement parameters. In order to have a fair comparison, an implementation in a regular software package is what one should aim for.