Efficient data extraction from neutron time-of-flight spin-echo raw data

Methods for efficient data extraction for neutron spin-echo spectroscopy with multipixel area detectors and – at a pulsed neutron source – multiple time-of-flight wavelength bins are presented.

1. Derivation of the NSE signal in Gaussian approximation  in the main text.
We start by considering the main spin-precession coding variables, the field integrals in the first and second spectrometer arm J 1 and J 2 respectively.
where B is the magnetic field (induction) along the neutron path parametrized by the path length variable l. For simplicity we assume that the π-flipper, which reverses the effective precession sense, coincides with the sample.
The neutron velocities in both arms are v 1 and v 2 , their difference corresponds to the energy transfer to the neutron by the scattering process at the sample. The and taking into account the action of the π-flipper the final precession angle is Application of high resolution spin-echo implies that the velocity difference ∆v due to a typical energy transfer ∆E =hω is very small, with v 1 = v = h/(m n λ) and v 2 = v + ∆v h/(m n λ) + λω/2π then inserting the resulting precession angle into the (ideal) analyzer transmission function T = 1 ± cos(±Ψ)/2 yields the probability of this neutron to arrive at the detector: since ω is small the second term in the argument of the cosine in Eq. 4 can be replaced by its Taylor expansion and to get the average over the probabilities of energy transfers we integrate over the spectral part of the scattering function: (5) where I Det denotes the detector intensity for an ensemble on neutrons still with unique, sharp value of the initial velocity, c.f. wavelength λ.
For the next step we utilize the fact that S(Q, ω) S(Q, −ω) in the typical realm of NSE experiments (i.e.hω << k B T ), the cosine addition theorem and S(Q) = S(Q, ω)dω: since the NSE spectrometer is operated such that the precession paths are very close to symmetry we have J 1 J 2 = J and the further steps are expressed now in terms of J the nominal field integral and the field integral asymmetry ∆J = J 2 − J 1 , at ideal (full) symmetry ∆J = 0.

Gaussian approximation for envelope shape and resolution
In a real spectrometer it is not possible to work with one exactly defined wavelength, in fact the main reason for the applicability of spin echo is the large possible width of the incoming neutron wavelength (velocity) band ensuring enough intensity. For the same reason it is necessary to accept a wide and divergent beam instead of a "single ray" and thus the exact value of the asymmetry parameter ∆J depends on the path within the beam.
In order to proceed with the analysis of the salient properties of a NSE signal in terms of analytic expressions we resort to Gaussian approximations for the incoming wavelength distribution this distribution is quite realistic for reactor based instruments with a wavelength selector even if it deviates slightly from the more triangular transmission function of a neutron velocity selector.
For the distribution of field integral differences within the beam we also use a Gaussian approximation Here a Gaussian shape can only be considered as a generic description coarsely approximating some distribution with width corresponding to Σ.
However, these Gaussian approximations allow to derive analytical expressions for the NSE signal.
With that the detector signal as function of the spectrometer control variables [J, δ, λ 0 ], i.e. field integral (proportional to the main solenoid current), asymmetry (proportional to the phase coil current) and wavelength (at TOF instruments a function of the neutron arrival time: Performing the integration over the field integral inhomogeneity distribution yields This yields the expression showing the salient features of the so-called resolution function R, where we introduced an additional factor η < 1, which accounts for non-idealities of the polarisation analysis. Note that at high resolution Σ ∝ J. The prefactor to ω in the second term of Eq. 11 corresponding to a cosine Fourier transform of the scattering function reveals the origin of the expression for the Fourier-time t.
1.1.1. Lambda integration The still missing integration over the wavelength distribution involves the implicit λ-dependence of the scattering function through its Q- we write t = bλ 3 and t 0 = bλ 3 0 , with that the expression in the cosine Fourier integral in Eq. 10 can be written as a Taylor expansion around λ 0 The λ integration then yields where we can identify the resolution R and the echo-shape E = E e (δ · · ·) × cos(δ · · ·) as parts of the prefactor to the intermediate scattering function. S(Q 0 ) denotes the wavelength averaged "static" scattering function. The factor A is a result of the wavelength dependence of the resolution function For practical purposes A 1, which can be verified by inserting typical values for the wavelength width parameter Λ = ∆λ FWHM /(4 √ ln 2), λ 0 = 1 nm, FWHM width 10% and the inhomogeneity parameter Σ = 2 × 10 −6 Tm yields A = 1.0015. The present analytical form and appearance of A can only be given in this simple form if the Gaussian approximations for w and W are assumed, for other shapes of w no analytic form could be found. Nevertheless, the Gaussian approximation exercise allows for the estimation of the magnitude of the effect and assures us that for the normal range of NSE parameters A is virtually 1. In the DrSpine implementation A = 1.
6 Finally, with the abbreviations g = γ n m n /h, ψ 2 = [(Σλ 0 ) 2 + (Λδ) 2 ](g/A) 2 and Φ = δλ 0 g/A 2 the next order of the λ can be written as For a 10% selector Λ 2 λ 2 0 is about 10 −3 but S 1 and S 2 contain derivatives of the scattering function that may become large. However, for polymer systems S(Q, t) is sufficiently smooth to result in negligible higher order contributions in Eq. 17. For intermediate function with sharper peaks these contributions can become larger.
Since at a TOF instrument (SNS) the effective width of the used λ-bins can be made very small these effects are suppressed even further compared to a selector instrument.

Echo shape envelope functions for selector instruments
Gaussian with a smoothing parameter δλ << ∆λ. 7

Combination rule derivation
The data combination rule given in Eq. 19 of the main paper may easily be derived.
The problem is basically that of combining two experimental results s 1 and s 2 , both with experimental errors δs 1 and δs 2 , such that the combined results has the lowest possible error. The optimisation pertains the prefactors α and 1 − α used for the linear combination s 12 = αs 1 + (1 − α)s 2 . In that case the squared error of the result is The resulting error immediately follows from inserting the minimum α into Eq. 21 which -after trivial algebraic rearrangements -equals Eq. 20 of the main paper. As indicated in the main paper the case for more than two terms in the combination immediately follows by iterating the latest combination step.
3. Explanations pertaining the example report report20670 707 stems from the evaluation of an experiment performed at the reactor instrument J-NSE in Garching. The name is derived from the run number of the leading (first) sample run and the following 707 is an automatic sequence number counting the created reports.
The first table summarizes all loaded raw-data files with the corresponding spectrometer settings etc.. Since this is a reactor experiment the wavelength frame λ 1 , n contains a single nominal wavelength, 8Å. Then the wavelength width is read from the selector parameters contained in each raw data file. The consistency of wavelength and wavelength band width can immediately be judged by the plots show e.g. in figure   1 of the report. The only parameters to fit each of these curves to the counts in the corresponding pixel (symbols) are: δ 0 , the location of the exact phase symmetry, the echo amplitude a and average level b.

Parameters
The data reduction in DrSpine can be controlled by a number of parameters pertaining pre-binning, post-histogramming and controls for acceptance/rejection of pixels.
Once optimized for one instrument (and possibly classes of experiments, e.g. low Q vs high Q, coherent vs incoherent) it will rarely be necessary to adjust them further.
This pertains the values listed in table 2 of the report. In order to expose all aspects of the evaluation they are explicitly set in lines 11 to 22 of the macro shown at the end of the report.
Besides those the detector pixel prebinning and, for TOF instruments, the prebinning of time channels can be specified. These are applied in the data reading step.
The user can also adjust some parameters pertaining the fitting of the echo, like for example the largest acceptable chi-square, the accepted tolerance or the smallest echo amplitude.
Next, the instruction match in the macro finds the corresponding data sets (reference, sample, background, etc.), and the fit command performs the actual echo signal fitting for all pixels and TOF bins. Starting with the best (central) pixels, the program determines the symmetry phase automatically for each pixel, which are then used in the subsequent steps. In case of small magnetic disturbances and sufficient echo signal in the sample data, the user has the option to apply a global phase offset to the sample data (shifting the reference phase table as a whole) by selecting the option fit sam offset. This phase offset comprises all data from the entire detector area.
At last the user may choose to personalize the number of binning in Q and in the Fourier time. The final histogramming serves to collect this information into a selected grid of (Q, t) boxes. There one may explore the trade-offs between the degree of division in either Q, t or both versus statistics, i.e errors of each data point. Due to the application of proper weighting in determining the best effective Q and t values for each histogram box, even coarse binning yields reliable Q, t tables. Histogramming boxes that remain empty after the collection phase are ignored when preparing the output tables. This feature is employed in the example (800 time bins) to make sure that each Fourier time setting of the experiment gets a unique time slot assigned.
For the continuous distribution of Fourier times encountered in an TOF-NSE (SNS) experiment one rather uses a t-binning into a few (typically 5· · ·30) time slots equally distributed on a log-scale over the interval covering a range from minimum to maximum time compatible with the extremes of field integral settings and wavelength frames used in the experiment. As is done in the present example report a standard list covering settings from a range of possible divisions is created, enabling a posteriori selection.
As already mentioned in the main text, the final report provides, besides the curves for the intermediate scattering function in a linear and in logarithmic plot, also the possibility of choosing among some basic fitting functions that allow to extract first information on, e.g., the diffusion coefficient. A text (ASCII) file containing the S(Q, τ ) points vs. τ data is automatically generated.