We report the first example of magnetic pair distribution function (mPDF) data obtained through the use of neutron polarization analysis. Using the antiferromagnetic semiconductor MnTe as a test case, we present high-quality mPDF data collected on the HYSPEC instrument at the Spallation Neutron Source using longitudinal polarization analysis to isolate the magnetic scattering cross section. Clean mPDF patterns are obtained for MnTe in both the magnetically ordered state and the correlated paramagnet state, where only short-range magnetic order is present. We also demonstrate significant improvement in the quality of high-resolution mPDF data through the application of *ad hoc* corrections that require only minimal human input, minimizing potential sources of error in the data processing procedure. We briefly discuss the current limitations and future outlook of mPDF analysis using polarized neutrons. Overall, this work provides a useful benchmark for mPDF analysis using polarized neutrons and provides an encouraging picture of the potential for routine collection of high-quality mPDF data.

## I. INTRODUCTION

Magnetic pair distribution function (mPDF) analysis of neutron total scattering data has recently emerged as a valuable tool for investigating local magnetic correlations in magnetic materials.^{1,2} In analogy to the more familiar atomic pair distribution function (PDF) method,^{3} the mPDF is obtained by Fourier transforming the total magnetic scattering, which refers to the scattering arising both from long-range magnetic correlations (resulting in magnetic Bragg peaks) and from short-range magnetic correlations (resulting in diffuse magnetic scattering). This yields the real-space, pairwise magnetic correlation function. The mPDF technique is most useful for the study of short-range magnetic correlations such as those in a correlated paramagnet or a quantum disordered magnet, for which the real-space mPDF can be easier to interpret and model than the corresponding diffuse scattering pattern in reciprocal space. On the other hand, conventional magnetic Bragg diffraction analysis will typically remain the preferred choice for the determination of long-range ordered magnetic crystalline states. Since the introduction of the mPDF technique in 2014, it has been applied to numerous systems with short-range magnetic correlations ranging from quantum magnets to functional magnetic materials.^{4–14}

For an isotropic powder sample of a typical magnetic material possessing localized spins that belong to a single magnetic species, the mPDF is given by^{1,7}

The first equation defines the experimental mPDF, while the second equation shows how to calculate the mPDF for a given magnetic structure. Here, $Q$ is the magnitude of the scattering vector, $Qmin$ is the minimum measured scattering vector (assumed to exclude the small-angle scattering regime), $(d\sigma /d\Omega )mag$ is the magnetic differential scattering cross section, $r$ is real-space distance, $r0=\mu 04\pi e2me$ is the classical electron radius, $\gamma =1.913$ is the neutron magnetic moment in units of nuclear magnetons, $S$ is the spin quantum number in units of $\u210f$, $f(Q)$ is the magnetic form factor, $Ns$ is the number of spins in the system, $i$ and $j$ label individual spins $Si$ and $Sj$ separated by the distance $rij$, $Aij=\u27e8SiySjy\u27e9$, $Bij=2\u27e8SixSjx\u27e9\u2212\u27e8SiySjy\u27e9$, $\Theta $ is the Heaviside step function, $m$ is the average magnetic moment in Bohr magnetons (which is zero for anything with no net magnetization, such as antiferromagnets), and $\rho 0$ is the number of spins per unit volume. A local coordinate system is used for each spin pair to compute $Aij$ and $Bij$, given by $x^=rj\u2212ri|rj\u2212ri|$ and $y^=Si\u2212x^(Si\u22c5x^)|Si\u2212x^(Si\u22c5x^)|$. The generalization to magnetic materials with multiple types of magnetic atoms and/or nonzero orbital contributions to the magnetic moment is straightforward and given elsewhere.^{1} Generally speaking, a positive (negative) peak at a given distance corresponds to the net parallel (antiparallel) orientation between spins separated by that distance, lending an intuitive interpretation to mPDF data. We note that in Eq. (1), the subtraction of unity from the term in parentheses amounts to the removal of the self-scattering contribution to the magnetic scattering cross section, which is desirable because the self-scattering contains no information about the correlations between distinct magnetic moments. Equation (1) is fully equivalent to the corresponding integral expression used in the definition of the atomic PDF.

One of the biggest experimental challenges for obtaining high-quality mPDF data is accurately measuring the magnetic scattering to a sufficiently large momentum transfer and separating it from the (typically, much larger) nuclear scattering. For a typical experiment using unpolarized neutrons, this can be done either by fitting a structural model to the nuclear Bragg peaks and subtracting them out to leave just the magnetic scattering, or by subtracting a reference measurement taken at a temperature where no coherent magnetic scattering is present (e.g., at high temperature well above a magnetic transition) from a diffraction pattern collected at a lower temperature with nonzero magnetic scattering. If the atomic structure is identical at both temperatures, then the difference between the scattering patterns gives the magnetic scattering. However, both of these strategies can result in significant artifacts due to the imperfect modeling of the nuclear Bragg peaks (or nuclear diffuse scattering if short-range structural correlations exist) or imperfect temperature subtraction, where even simple thermal expansion causes shifts in the nuclear Bragg peak positions that can be difficult to treat accurately. Another source of error in this strategy is the over-subtraction of magnetic scattering which could still be present in the form of incoherent paramagnetic scattering that follows a form factor decay as a function of $Q$.

An alternative approach is to make no attempt to separate the magnetic scattering from the nuclear scattering and instead simply generate the PDF from the combined diffraction signal following standard protocols. The atomic and magnetic structures can then be modeled together in real space.^{2} However, this only works if the total scattering data are suitable for conventional PDF analysis, meaning that this approach is typically suitable only for data collected on dedicated PDF diffractometers with access to large values of momentum transfer (typically, more than 20 Å$\u22121$). Even then, the mPDF signal can often be one or more orders of magnitude smaller than the nuclear PDF signal, making it difficult to detect above the noise. Furthermore, this approach treats magnetic scattering the same as nuclear scattering in the PDF data processing protocol, meaning that no attempt is made to normalize the magnetic scattering by the squared magnetic form factor, as should normally be done according to Eq. (1). This has the effect of twice convoluting $Gmag(r)$ with the Fourier transform of the magnetic form factor, broadening the mPDF by approximately $2$ times the real-space width of the electronic wavefunction giving rise to the magnetic moment. This “non-deconvoluted mPDF” (previously called the “unnormalized mPDF”^{2}) takes the form^{2}

where $C1=Ns2\pi (\gamma r02)223\u27e8gJ(J+1)\u27e92$ and $C2=\u2212Ns2\pi (\gamma r02)223\u27e8g2J(J+1)\u27e9$ are constants, $\u2217$ represents the convolution operation, and $S(r)=F{fm(Q)}\u2217F{fm(Q)}$ (where $F$ denotes the Fourier transform). The second term on the right of Eq. (4), which arises from the self-scattering contribution to the magnetic differential scattering cross section, results in a peak at low $r$ (below approximately 1 Å). The strategy of co-modeling the atomic and magnetic PDF data in the real space requires working with this lower-resolution, non-deconvoluted mPDF signal. To keep the distinction clear, we will refer to $dmag(r)$ as the non-deconvoluted mPDF and $Gmag(r)$ as the proper mPDF, deconvoluted mPDF, or just the mPDF.

Another challenge exists even in cases where the magnetic scattering has been cleanly separated from the nuclear scattering: accurately normalizing the magnetic scattering by the squared magnetic form factor prior to performing the Fourier transform. Because the squared magnetic form factor for most magnetic ions approaches zero between 5 and 8 Å$\u22121$, any noise or leftover nuclear scattering in this range will be greatly amplified during the normalization step, inevitably leading to high-frequency artifacts in the mPDF data. Often, these artifacts are sufficiently severe that it is preferable just to skip the normalization step altogether and settle for the non-deconvoluted mPDF;^{2} however, this comes with the cost of significantly reduced real-space resolution, so it is also not ideal.

Many useful mPDF studies have been carried out in spite of these experimental challenges. Nevertheless, the technique will have a greater impact if the data quality improves. Here, we report two developments in mPDF data collection and processing that help address the dual challenges of accurately isolating the magnetic scattering and reliably mitigating the artifacts introduced during the magnetic form factor normalization step. The first is using longitudinal polarization analysis with a polarized neutron beam to separate the magnetic, nuclear, and nuclear spin-incoherent cross sections directly,^{15} with no need for temperature subtraction or modeling of nuclear Bragg peaks. The second is using a polynomial function to perform *ad hoc* data corrections that minimize the real-space artifacts resulting from the form factor normalization.^{16,17} These are both well-established methods, but they are applied here to mPDF analysis for the first time. In the following, we briefly describe longitudinal polarization analysis and the procedure for performing the *ad hoc* data corrections, and then provide examples of their application to mPDF data on the antiferromagnetic semiconductor manganese telluride (MnTe). Code for performing the data corrections is freely available as part of the diffpy.mpdf python package^{18} and in the supplementary material of this article. These developments represent significant progress toward the routine collection of high-resolution mPDF data on a variety of magnetic materials of fundamental and technological interest.

## II. LONGITUDINAL POLARIZATION ANALYSIS

The method of *XYZ* longitudinal polarization analysis of neutron scattering data collected with large solid-angle detector banks (also called 6-pt polarization analysis or 10-pt polarization analysis in its more general form including out-of-plane scattering) allows unambiguous separation of nuclear, magnetic, and nuclear spin-incoherent scattering cross sections. This is accomplished by measuring the spin-flip and non-spin-flip cross sections for various directions of polarization of the incident neutron beam; detailed descriptions of the technique are found elsewhere.^{15,19,20} A small handful of neutron diffractometers and spectrometers have the capability to perform longitudinal polarization analysis, such as D7 at the Institut Laue Langevin,^{19} DNS at FRM-II in Munich,^{21} and HYSPEC at the Spallation Neutron Source (SNS) and Oak Ridge National Laboratory (ORNL).^{22} The former two instruments can access a maximum momentum transfer of $\u223c4.0$ and 4.84 Å$\u22121$, respectively, while HYSPEC can reach just over 6 Å$\u22121$ for certain choices of incident energy and detector positions. Given the importance of maximizing the range of accessible momentum transfer for the Fourier transform, HYSPEC is currently the instrument with polarization analysis that is most suitable for mPDF analysis.

## III. *AD HOC* DATA CORRECTIONS

In any attempt to isolate the magnetic scattering intensity, normalize it by the squared magnetic form factor, and perform the Fourier transform to generate the experimental mPDF, errors will inevitably be introduced due to imperfect time-independent instrumental background corrections, interference from nuclear and nuclear spin incoherent scattering, inaccuracies in the measured or approximated magnetic form factor, statistical noise, etc. Because typical squared magnetic form factors approach zero between 5 and 8 Å$\u22121$, any errors present in this range of the data become particularly magnified if included in the Fourier transform, introducing nonphysical artifacts into the mPDF. These challenges are similar to those encountered when generating x-ray PDF data, where the x-ray scattering atomic form factor plays an analogous role as the magnetic form factor. The traditional approach in x-ray PDF analysis has been to apply corrections for each source of error manually,^{3} but this can be an onerous task and is itself prone to errors,^{16} particularly for researchers new to the technique. As has been discussed in detail for x-ray PDF,^{16,17} *ad hoc* corrections using a polynomial correction function can largely mitigate the errors with minimal human input. This *ad hoc* approach is also highly automatable, allowing for rapid throughput PDF data processing using tools such as PDFgetX3.^{17} Here, we have implemented the PDFgetX3 algorithm in a custom-built python program and applied it to magnetic scattering data to obtain high-resolution mPDF data with no manual corrections necessary. The python code has been made available as part of the diffpy.mpdf package^{18} and as a standalone program in the supplementary material.

One technical note merits discussion here. As explained in Ref. 17, the polynomial correction function results in nonphysical contributions to the real-space PDF for $r$ values less than $rpoly=\pi n/Qmaxinst$, where $n$ is the degree of the polynomial and $Qmaxinst$ is the maximum value of $Q$ to which the correction polynomial is fit. As long as $rpoly$ is shorter than the nearest-neighbor distance, then the artifacts resulting from the *ad hoc* corrections will be restricted to the $r$-region below the first peak in the PDF data. In practice, an appropriate value of $rpoly$ is selected (typically, below 1 Å for x-ray PDF data), and a weighted average of the PDFs obtained using the nearest integer values of $n$ corresponding to the selected $rpoly$ value is generated. For synchrotron x-ray PDF experiments with $Qmaxinst$ values of 25 Å$\u22121$ or greater, typical values for $n$ range from 7 to 9. When applied to mPDF, $Qmaxinst$ will often be much smaller, anywhere from 5 to 8 Å$\u22121$, so $n$ should likewise be smaller to keep $rpoly$ acceptably short. For HYSPEC, where the largest accessible value for $Qmaxinst$ is about 6 Å$\u22121$, typical values of $n$ are 3 and 4, resulting in $rpoly$ values of 1.57 and 2.09 Å, respectively. Although these values would be too large for typical atomic PDF data, they are acceptable for typical magnetic structures, where the nearest-neighbor distance between magnetic atoms is unlikely to be as short as 2.09 Å.

## IV. APPLICATION TO MANGANESE TELLURIDE

We demonstrate the use of polarized neutrons and the *ad hoc* data correction procedure to generate mPDF data for the antiferromagnetic semiconductor MnTe. This material has a hexagonal crystal structure (space group $P63/mmc$) with a magnetic ordering temperature of $TN=307$ K, below which the Mn$2+$ spins order with parallel alignment within the *ab* planes and antiparallel alignment between neighboring *ab* planes, as has been established by previous neutron diffraction studies.^{23–25} Short-range antiferromagnetic correlations are known to survive well into the paramagnetic phase above $TN$, likely up to 900 K or higher.^{26} The short-range magnetism in MnTe was the subject of a recent mPDF study^{14} using data collected with unpolarized neutrons, together with three-dimensional 3D-$\Delta $mPDF^{27} data collected from a single crystal.

### A. Experimental details

A large powder sample of MnTe ($\u223c8$ g) was synthesized according to the procedure in Ref. 14, pressed into a pellet of diameter 6 mm, and loaded into an aluminum sample can. A closed cycle refrigerator was used to control the temperature. The incident neutron energy used for the experiment was $Ei=28$ meV, and the Fermi chopper was operated at a frequency of 60 Hz. This configuration provided an energy resolution at the elastic position of 5.7 meV full width at half maximum (FWHM). The data were integrated over energy transfers between $\u22125$ and 5 meV. The incident beam at HYSPEC is polarized by a vertically focusing array of magnetically saturated Heusler (Cu$2$MnAl) crystals. A Mezei flipper was used to reverse the polarization direction of the incident beam, and the polarization analysis of the scattered beam was accomplished with a 60$\xb0$-wide-angle multi-channel radial supermirror-polarizer array.^{22} Spin-flip (SF) and non-spin-flip (NSF) data were collected with the neutron polarization oriented vertically, $Pz$, for two different positions of the 60$\xb0$ detector bank to cover the $2\theta $ scattering range 3$\xb0$–112$\xb0$. In this configuration, the SF setting measures the magnetic scattering, and the NSF gives the combined nuclear and magnetic contributions. The nuclear spin-incoherent scattering contribution from MnTe is expected to be insignificant. A flipping ratio of 13 was determined by evaluating the scattering from nuclear Bragg peaks in SF and NSF configurations. Post-processing data corrections for the angle-dependent supermirror transmission and for the flipping ratio efficiency were carried out using the algorithms implemented in MANTID software, as discussed in Refs. 22 and 28. The magnetic scattering used in this study corresponds to the SF intensity corrected for the flipping ratio according to Eq. (2) in Ref. 22.

### B. Results

#### 1. Magnetic scattering

In Fig. 1, we display the magnetic scattering at 50 (a) and 330 K (b). Sharp antiferromagnetic Bragg peaks are present at 50 K. At 330 K, the magnetic scattering is diffuse but still quite structured, indicating the persistence of short-range correlations into the paramagnetic phase, as expected from earlier results. The nuclear scattering cross section at 50 K, obtained by subtracting the SF scattering from the NSF scattering, is shown in Fig. 1(c). A slight oversubtraction of the strong magnetic scattering is visible around 0.9 Å$\u22121$, but we see minimal interference effects elsewhere, so we conclude that the separation of the different cross sections is sufficiently accurate for our purposes.

#### 2. mPDF data and fits

Figure 2 shows key results from the *ad hoc* data correction process to produce the mPDF from the scattering data collected at 50 K. In panel (a), we display the magnetic scattering data and the squared magnetic form factor for Mn$2+$, scaled to match the scattering profile between 3 and 6 Å$\u22121$ as closely as possible. We used the analytical approximation of the form factor as reported in the *International Tables for Crystallography*.^{29} Panel (b) shows the uncorrected form of the reduced magnetic structure function $Fmag(Q)$ (not to be confused with the magnetic structure factor used in conventional magnetic diffraction analysis) given by

where $A$ is the scaling constant used in panel (a), replacing the coefficient on $[f(Q)]2$ shown in Eq. (1) that would be appropriate if the data were on an absolute scale. The “uc” in the subscript of the vertical axis label stands for “uncorrected.” Note that the increasing behavior of $Fmag(Q)$ at high $Q$ is non-physical, indicating an imperfect normalization by the squared magnetic form factor. Indeed, the correct form of $Fmag(Q)$ should oscillate around zero at high $Q$ since the correct normalization of the magnetic scattering in Eq. (5) puts it on the scale of unity. To correct this error, we used least-squares minimization to fit a polynomial to $Fmag,uc$, in accordance with the *ad hoc* approach used for x-ray PDF in PDFgetX3.^{17} Figure 2(b) shows the best-fit cubic polynomial as the orange curve [note that this is not the squared magnetic form factor, which is instead displayed in Fig. 2(a)]. With a polynomial of degree 3 and $Qmaxinst=6.0$ Å$\u22121$, the corresponding value of $rpoly$ is 1.57 Å, safely below the nearest-neighbor Mn–Mn distance of $\u223c3.37$ Å. Due to the relatively low degree of the polynomial, it effectively captures the slowly modulating, nonphysical behavior of $Fmag,uc$ without fitting to the physically meaningful features in the data, which have characteristically faster modulations in $Q$. This polynomial is sometimes referred to as a background function, which is accurate in the sense that it captures the slowly modulating errors in $Fmag,uc$ due to imperfect normalization by the squared magnetic form factor, but it should not be interpreted as an attempt to correct for the background scattering from the instrumental setup. We assume the instrumental background has already been removed. In panel (c), we display the corrected form of $Fmag(Q)$, labeled $Fmag,c$, resulting from subtracting the fitted polynomial. We note that $Fmag,c$ now oscillates around zero as $Q$ becomes large, as expected when all errors have been removed. Finally, panel (d) shows the resulting mPDF using $Qmax=5.5$ Å$\u22121$, $Qmaxinst=6.0$ Å$\u22121$, and $rpoly=1.57$ Å.

In Fig. 3, we display fits to the mPDF data at 50 K using the published magnetic structure of MnTe. We plot the non-deconvoluted mPDF data [given by Eq. (3)] and fit in panel (a) in blue symbols and a solid red curve, respectively. The fit agrees closely with the data and is free from the high-frequency noise that accompanies non-deconvoluted mPDF data obtained together with standard atomic PDF data, highlighting the advantage of using polarized neutrons. In Fig. 3(b), we plot the deconvoluted mPDF data and fit, where the greatly improved real-space resolution is immediately apparent. The fit successfully captures the most prominent features of the mPDF data, demonstrating the success of our approach. As fitting parameters, we included an arbitrary scale factor, a real-space damping term to account for the finite $Q$-space resolution of the data (known as $Qdamp$ in conventional PDF analysis), and an $r$-dependent real-space broadening term ($Qbroad$ for conventional PDF) to account for statistical noise in the scattering data.^{30} The fitted values of $Qdamp$ and $Qbroad$ were 0.037 and 1.68 Å$\u22121$, respectively. We note the presence of artifacts for $r\u22721.5$ Å (corresponding closely to $rpoly=1.57$ Å) and minor misfits throughout the full data range, but considering that this experimental mPDF curve was generated without any human intervention or fine-tuning (in contrast to earlier efforts^{2,31}), the overall level of agreement is highly encouraging. We further note that, ignoring any distortions or errors in the data, the mPDF pattern in the ordered state is equivalent to the mPDF that would be obtained if one were to perform a perfect nuclear and magnetic Rietveld refinement to an unpolarized neutron diffraction pattern over a sufficiently large $Q$-range and then apply the normalization and Fourier transform procedure to the magnetic part of the Rietveld fit.

In many cases, short-range magnetic correlations will give rise to the most physically interesting mPDF data. In that spirit, we plot in Fig. 4 the mPDF data and fits for MnTe at 330 K, somewhat above $TN=307$ K and in the “correlated paramagnet” regime where short-range correlations persist in the absence of long-range magnetic order. Once again, the non-deconvoluted and deconvoluted mPDF patterns are displayed in panels (a) and (b), respectively. Because the magnetic scattering is significantly weaker in the paramagnetic phase, the $Q$-range of usable scattering data for the Fourier transform was more limited, so the data shown were generated with $Qmax=4.5$ Å$\u22121$, together with $rpoly=3.0$ Å and $Qmaxinst=6.0$ Å$\u22121$. We also used a Fermi–Dirac modification function with a width of 1.0 Å$\u22121$ to generate the deconvoluted mPDF (see Sec. IV B 3 for details about the modification function). The non-deconvoluted fit in panel (a) is reasonably good, although truncation effects are apparent in the data. The deconvoluted mPDF data in Fig. 4(b) exhibit somewhat larger artifacts that the *ad hoc* corrections could not remedy, but the near-neighbor antiferromagnetic correlations are clearly evident in the data, e.g., as the alternating negative and positive peaks around 3.4 Å (nearest neighbor, antiparallel), 4.2 Å (second nearest neighbor, parallel), and 5.4 Å (third nearest neighbor, antiparallel). The mPDF fit captures the general features of the data. We attribute the reduced data quality in the correlated paramagnetic state to the more restricted $Q$-range and greater statistical noise in the scattering data compared to the data collected at 50 K. This underscores the need for high-statistics measurements over a sufficient $Q$-range to produce optimal high-resolution mPDF data.

Despite the more limited data quality, we find it encouraging that the fitted magnetic model produced from the properly deconvoluted mPDF data agrees well with the model produced by the fit to the non-deconvoluted data and to our earlier mPDF fits performed on a different instrument with unpolarized neutrons.^{14} In particular, the short-range correlations in MnTe were shown to be spatially anisotropic in our earlier study, with a longer correlation length along the crystallographic $c$ axis than within the hexagonal $ab$ plane. The present fits included two free parameters capturing this anisotropic effect in the magnetic model. The fit naturally converged to correlation lengths of 7.1(5) and 4.6(6) Å along $c$ and in the $ab$ plane, respectively, in good agreement to those reported in Ref. 14 at a similar temperature. The consistency of these results validates the earlier report and the use of polarized neutrons for obtaining useful mPDF data in a correlated paramagnet.

#### 3. Effect of modification functions

Finally, we discuss the effect of applying a $Q$-space modification function,^{32} also known as a window function, to $Fmag,c(Q)$ prior to the Fourier transform. In the context of atomic PDF analysis, various modification functions have been used to suppress the effect of statistical or systematic errors in the scattering data at high $Q$, reducing high-frequency ripples in the PDF (but with the cost of reduced real-space resolution and possible loss of physically meaningful information).^{32} A modification function $w(Q)$ operates simply through multiplication with the corrected form of $Fmag(Q)$, such that $w(Q)\xd7Fmag(Q)$ is the quantity to be Fourier transformed. We consider here three modification functions: the default step function

a modified Fermi–Dirac function

and the conventional Lorch function^{33}

We note that $ws$ is equivalent to applying no modification function at all since it is unity up until the hard cutoff of the Fourier transform at $Qmax$. These three modification functions are displayed in Fig. 5(a), together with the squared magnetic form factor for Mn$2+$ for reference. In all cases, we use $Qmax=5.5$ Å$\u22121$, and for $wFD$, we set $\Delta $ to 0.5 Å$\u22121$. The mPDF curves at 50 K generated with the application of each of these modification functions are given in Fig. 5(b). Both $wFD$ and $wL$ suppress high-frequency features in the mPDF relative to the default mPDF using $ws$. The effect is particularly pronounced for $wL$. However, we note that for the available $Q$-range of 5.5 Å$\u22121$ included in the Fourier transform, $wL$ results in significant suppression of $Fmag(Q)$ over nearly the entire range similar in scale to the squared magnetic form factor shown in Fig. 5(a). In effect, then, application of $wL$ undoes the normalization by the squared form factor, yielding a quantity that is similar in real-space resolution to the non-deconvoluted mPDF that we were originally hoping to improve upon. We, therefore, suggest that a Lorch window is of limited usefulness for producing deconvoluted mPDF patterns when the available $Q$-range does not significantly exceed the extent of the squared magnetic form factor. On the other hand, $wFD$ with a modestly chosen value of $\Delta $ may provide value by suppressing artifacts from high-$Q$ noise without sacrificing meaningful mPDF data due to excessive broadening.

Figure 5(c) shows the mPDF curves at 330 K obtained for each type of modification function, this time with $Qmax=4.5$Å$\u22121$ and $\Delta =1.0$ Å$\u22121$. The Lorch and Fermi–Dirac functions again result in greatly suppressed Fourier ripples, with the Fermi–Dirac function preserving somewhat more real-space resolution than the Lorch function.

In the mPDF fits presented in Sec. IV B 2, we found no need to use a modification function for the data collected at 50 K where the magnetic scattering is strong. However, given the weaker magnetic scattering at 330 K, we found it beneficial to apply a Fermi–Dirac modification function with a width of 1.0 Å$\u22121$. We chose this width because, after testing several different values, we found that 1.0 Å$\u22121$ offered a good balance between minimizing artifacts in the mPDF data and preserving the real-space resolution to a reasonable degree. Ideally, the calculated mPDF used for modeling the data should be convoluted with the Fourier transform of the modification function to account correctly for the change in real-space resolution caused by the modification function.

## V. DISCUSSION AND CONCLUSION

We have reported the first use of polarized neutrons to generate mPDF data and the first application of PDFgetX3-style *ad hoc* corrections to produce high-resolution, properly deconvoluted $Gmag(r)$ curves with minimal human input. Polarization analysis allowed us to isolate the magnetic scattering cross section and produce the resulting mPDF data with little to no interference from nuclear scattering. On HYSPEC, we achieved a $Qmax$ value of 5.5 Å$\u22121$ in the magnetically ordered state of MnTe. This was sufficient for an exceptionally clean non-deconvoluted mPDF curve and a high-quality proper mPDF curve produced with the help of the *ad hoc* corrections, demonstrating the promise of this method for producing mPDF data. In the paramagnetic state, we obtained good-quality non-deconvoluted and deconvoluted mPDF curves suitable for quantitative mPDF refinements that confirmed a prior result. However, the weaker magnetic scattering at 330 K necessitated a more limited $Q$-range and introduced significantly more noise and artifacts into the data. These issues could be ameliorated in large part simply by collecting more data to improve the statistics over a large enough range of momentum transfer (ideally up to 5.5 Å$\u22121$ or greater). Finally, our results suggest that if a modification function is to be used to reduce high-frequency noise in the mPDF data, a modified Fermi–Dirac function or similar is preferred over the traditional Lorch function.

Overall, the results reported here represent a significant step forward in the development of mPDF methodologies by highlighting the promise of polarized neutrons and modern data processing techniques to produce high-quality, high-resoultion mPDF data. We have provided a realistic view of both the capabilities and the limitations posed by current experimental resources when generating high-resolution mPDF data from weak and diffuse magnetic scattering. With major developments in neutron capabilities on the near horizon at the European Spallation Source, the Second Target Station (STS) of the Spallation Neutron Source, and elsewhere, instrumental limitations are expected to be less of a concern in the future. We mention particularly the planned STS instrument VERDI,^{34} for which the combination of high beam intensity, large $Q$ coverage, and polarization analysis should enable the routine collection of high-resolution mPDF data of excellent quality, which we expect to transform the landscape of mPDF studies in condensed matter and materials physics.

## SUPPLEMENTARY MATERIAL

See the supplementary material for the magnetic scattering cross section at 50 and 330 K, the nuclear scattering cross section at 50 and 330 K, python code for generating the mPDF with the *ad hoc* corrections, and an example python script showing how to use the code.

## ACKNOWLEDGMENTS

We thank Melissa Graves-Brook for assistance with the HYSPEC experiment. The work by B.A.F. and R.B. was supported by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences (DOE-BES) through Award No. DE-SC0021134. This study used resources at the Spallation Neutron Source (SNS), a DOE Office of Science User Facility operated by the Oak Ridge National Laboratory.

## AUTHOR DECLARATIONS

### Conflict of Interest

The authors have no conflicts to disclose.

### Author Contributions

**Benjamin A. Frandsen:** Conceptualization (lead); Formal analysis (lead); Funding acquisition (lead); Investigation (lead); Methodology (lead); Project administration (lead); Software (lead); Supervision (lead); Writing – original draft (lead); Writing – review & editing (lead). **Raju Baral:** Investigation (supporting); Methodology (supporting). **Barry Winn:** Data curation (equal). **V. Ovidiu Garlea:** Data curation (equal); Writing – review & editing (supporting).

## DATA AVAILABILITY

The data that support the findings of this study are available within the article and its supplementary material.

## REFERENCES

*International Tables for Crystallography, Volume C: Mathematical, Physical, and Chemical Tables*, edited by A. Wilson (Kluwer, Dordrecht, 1995).