Enhanced position resolution for ZnS:Ag/6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$^6$$\end{document}LiF wavelength shifting fibre thermal neutron detectors

The high neutron intensity, improvements in neutron delivery and increasingly more complex experiments at neutron scattering facilities, i.e. J-PARC, SNS, ISIS, CSNS and ESS, which is presently under construction, drive the development of neutron scattering instruments and their associated detectors. High position resolution is one of the most demanding detector requirements and is particularly relevant of neutron reflectometry applications. Scintillator detectors using ZnS:Ag/6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$^6$$\end{document}LiF coupled to wavelength shifting fibre (WLSF) are currently employed in several neutron scattering facilities, including J-PARC, SNS, ISIS and CSNS. For WLSF-based scintillation detectors, the position reconstruction is routinely achieved by determining the combination of fibres that absorb scintillation light. The use of position reconstruction algorithms, analysing light spread in the system, leads to an increase in the position resolution. The optimisation of a centre of gravity interpolation method for linear position-sensitive detectors has been developed, and a factor 2 improvement in position sensitivity has been achieved. The investigation of the light spread over the fibres and the detector performance in correlation with the reconstructed position resolution are discussed.


Introduction
The enhanced intensity at pulsed-neutron facilities like the Spallation Neutron Source [1] (Oak Ridge National Laboratory, TN, USA), the Japan Spallation Source [2] (Tokaimura, Japan), the ISIS Neutron and Muon Source [3] (Didcot, UK), the China Spallation Neutron Source [4] (Dongguan, China) and foreseen at the European Spallation Source-ESS [5-7]) (Lund, Sweden), which is presently under construction, has driven the development of and the search for new detector technologies that can meet the increasing performance demands. High spatial resolution, high counting rate capability and low gamma sensitivity (< 10 −6 ) are, among others, crucial characteristics that make an impact in science investigations using neutron scattering techniques.
In the past few years, gas-based, solid-state-based and scintillator-based detector technologies have been developed to cope with these requirements. Gas detectors with solid converter layers, typically 10 B, 6 Li and Gd, have been investigated for a wide variety of a e-mail: giacomo.mauri@stfc.ac.uk (corresponding author) position reconstruction, the accuracy of position determination is, at best, the same as the fibre pitch. In the past few years, several algorithms have been developed at SNS [38,39] and at J-PARC [23,34,40]. In one case the position resolution reached down to ≈ 100 µm resolution for a neutron imaging application using specifically made 100-µm-diameter fibres and a fibre optic taper which serves as an image magnifier [41], hence increasing the spatial resolution. In another case, a median point calculation has been investigated to obtain a spatial resolution less than the fibre pitch [42], reaching 2 mm resolution for a 2-dimensional detector for a single-crystal diffractometer.
In this work, a centre of gravity (CoG) method with a nonlinear binning calculation developed for linear WLSF scintillation detectors for neutron reflectometry application is presented. This approach leads to submillimetre spatial resolution, beyond the detector fibre pitch. Alternatively, the interpolation method could be used to reduce the number of fibres and therefore enable significant cost savings. Moreover, the proposed solution is 3-4 times better than the 3 He-based detectors currently used for neutron reflectometry applications [36,37]. The CoG algorithm will be presented, together with the investigation of the light spread and the correlation between the two.
More subtle effects on the detector could be avoided with the proposed CoG algorithm and the overall detector performance improved. For instance, a better detector linearity is of crucial importance for reflectometry investigation, especially at large Q-values where a low signal-to-background ratio is expected. A worsening in uniformity is a typical consequence for these types of calculations, the effects of which will be addressed in this work.
The algorithm has been implemented on a field programmable gate array (FPGA) for realtime position reconstruction. Results of both the post-processing analysis and the real-time calculation are discussed.

Detector concepts and description
WLSF ZnS:Ag/ 6 LiF scintillation detectors can be employed for various neutron scattering instruments, exploiting the high design flexibility of this technology. ZnS:Ag/ 6 LiF is an inorganic scintillator material, consisting of particles of lithium-6-fluoride ( 6 LiF) and zinc sulphide phosphor (ZnS) with silver (Ag) activators compactly dispersed in a binder. The process from neutron interaction to signal generation goes through several steps. The neutron conversion mechanism in the 6 Li produces charged particles, 3 1 H and α, as follows: The interaction between the charged particles and the scintillator material (ZnS:Ag) emits broad spectrum luminescence centred on 450 nm (blue light). These photons are subsequently absorbed by WLS fibres and re-emitted at longer wavelengths. The light propagates through the fibres to the photomultiplier tubes (PMTs) where the incident light photons are converted into electrons. These photo-electrons are then amplified, and the generated charge is collected as an event pulse. Each of the mechanisms is not 100% efficient, and therefore, the optimisation of the detector components and the coupling between them is of crucial importance in realising high detector performance. A possible solution to increase neutron absorption efficiency is to employ two scintillator sheets: one at the front and the other at the back of the fibres. The thickness of the scintillator also affects the efficiency of the detector [43,44].
Two similar detectors designed for reflectometry applications have been used to develop and explore the effectiveness of position reconstruction algorithms in WLSF detectors. Both detectors employ two ZnS:Ag/ 6 LiF scintillator sheets, 2:1 ZnS:Ag to 6 LiF ratio, with different thicknesses. The thickness of the front sheet is 0.25 mm, whereas the back sheet is 0.45 mm thick. The thinner scintillator is used to optimise detection efficiency for long-wavelength neutrons, accessible on ISIS Target Station 2.
The scintillator sheets are backed onto highly reflective specular reflectors to improve light collection. The light spread is affected by several factors, such as the fibre pitch, the diameter of the fibres, the distance between the fibres and the scintillator sheets and the reflectivity of the scintillator material. The air gap between the scintillator sheets and the fibres is minimised, nominal spacing of less than 100 µm, so that the effect on light spread is negligible.
Kuraray Y-11 fibres with 300 ppm dye concentration and a diameter of 0.5 mm are used for the fibre array. The fibre pitch is about 0.55 mm. In order to achieve a high spatial resolution, both the diameter of WLSF and the fibre pitch should be kept low. However, a smaller diameter fibre can, in general, accept less light from the scintillator resulting in a lower light collection. Thin optical dividers can be placed in between the fibres to prevent light being absorbed in adjacent fibres. Small pixels due to the diameter of the fibres and fibre pitch can significantly increase the cost of detectors, especially in the case of large coverage area detectors. In order to keep high performance and cost effectiveness, a fibre coding method [22] and Hamamatsu H14220A channel multi-anode PMT with green extended photocathode [32] are adopted.
The arrangement of these detector components and a sketch of the light spread through the fibre is depicted in Fig. 1a. In Fig. 1b, the WLSF coupling to the 64-channel multi-anode PMT is shown. An array of fibres is bundled horizontally, such that the left end of each fibre are joined to one of the PMT channels L ∈ [1,32], while the right end of each fibre is coupled to one of the channels R ∈ [33,64] of the PMT. The fibres are uniquely determined by the pair of PMT channels connected to the two ends {L , R}, i.e. two dots of the same colour in Fig. 1b identify one specific fibre.
The fibre coding method implemented here minimises misplacements utilising a single 64-channel multi-anode PMT. For a generic number of fibres ( f ), the channels L and R have an average multiplicity (μ = 2· f Ch PMT ), where 2 · f is the total number of fibre ends joined to the PMT and Ch PMT is the number of PMT channels. To reduce costs, multiple fibre ends can be joined to a single PMT channel, provided that the {L , R} pairs are unique.
An example of the fibre coding method is shown in Table 1. This particular code, defined as χ, is used on the DELFT detector. In order to ensure the uniqueness of the code, the ends of two adjacent fibres are coupled to the same PMT channel, whereas the other ends of the fibres are joined to two different PMT channels. At fibre 64, all PMT channels have been used once, so the code is iterated until the {L , R} pair for the last fibre, 200 in Table 1, is identified. Note that heavily fibre coding methods, i.e. many fibres in one pixel, can affect the counting rate capability of the detector, which is otherwise inherently limited by the long decay time component of the scintillation mechanism.
Photographs of the two detectors are shown in Fig. 2. The photograph in Fig. 2a is the side view of the first module designed for the INTER reflectometer at ISIS, and the device shown in Fig. 2b will be installed at the ROG neutron reflectometer at the Reactor Institute Delft (RID) [45].

Electronics and signal processing
The charge collected by the PMT is converted to a digital pulse by way of a comparator and then processed by an FPGA discriminator board. The position of the event is determined by the combination of the highest intensities of the PMT channels, based on the fibre code. Single photon pulse processing is applied in order to discriminate between neutron and gamma events. Scintillation events occurring as a result of gamma interactions in the scintillator have lifetimes on the order of tens to hundreds of nanoseconds. In contrast, neutron events last on the order of tens to hundreds of microseconds due to the long lifetime afterglow of the scintillator. A three-stage integrator and single differentiator are used to convert single photon density into a digitised analogue signal. A more detailed description can be found in previous works [30]. The signal processing results in an effective photon density profile (photons per unit time) which allows neutrons and gammas to be easily discriminated by applying a threshold or lower level discriminator (LLD). Two sets of FPGA firmware have been developed and implemented. The first, used rigorously in the past [32], outputs the maximum photon density for each neutron event for post-processing and in parallel outputs time-of-flight and standard neutron position infor-mation. The second performs on-board position interpolation and outputs time-of-flight and neutron position information calculated by interpolation.

Experimental set-ups
The measurements reported in the paper have been taken on various beam lines at ISIS and with an americium-beryllium, 241 Am/Be, neutron source at the ISIS neutron detector test facility.

241 Am/Be neutron source
The 241 Am/Be source in the ISIS neutron detector test facility has an activity of 370 GBq. The source is surrounded by a room temperature water moderator and shielded with borated wax and lead. The effective mean wavelength of moderated neutrons from the 241 Am/Be source is 1.2 Å (56.8 meV), with a flux of approximately 100 n/s/cm 2 . The source and its surroundings also generate a significant gamma field with energies ranging from 59 keV from the 241 Am decay, to 4.4 MeV from the decay of the excited state of 12 C after alpha capture by Be.

INTER, CRISP and EMMA beam lines
INTER is a high-flux, high-resolution neutron reflectometer [35] at ISIS, Target Station 2. Its moderator is optimised for long-wavelength neutrons with a flux increase of about an order of magnitude with respect to Target Station 1. The beam has a 2.3 • inclination below horizontal, and it is guided to a pair of choppers. The first chopper is a nimonic (T0) operating at 10 Hz that attenuates the unmoderated spectrum of neutrons characteristic of a pulsed source. The second chopper is a counter-rotating disk that defines the instrument bandwidth. The beam is delivered to the sample through a straight m = 3 guide, and a set of fine collimation slits controls the shape of the beam reaching the detector, which is about 3 m from the sample stage.
CRISP is an horizontal neutron reflectometer at ISIS, Target Station 1, which uses a broad band neutron time-of-flight (ToF) method for determining the wavelength. The instrument views the 25 K liquid hydrogen moderator giving an effective wavelength range of 0.5-6.5 Å at the source frequency of 50 Hz. The wavelength band extends up to 13 Å if operated at 25 Hz. The distance from the moderator to the sample is 10.25 m, and the sample to detector distance is 1.87 m. A detailed description of the CRISP reflectometer can be found in [46]. The incident beam is well collimated by both coarse and adjustable fine collimating slits to give a variable beam size and angular divergence, with typical dimensions of 40 mm wide (horizontal direction) and up to 10 mm in height (vertical direction). The flexibility in beam collimation can be exploited to investigate both the spatial resolution and the uniformity of the detector by adjusting the beam size at the detector.
Complementary measurements can be taken on the EMMA beam line at the ISIS facility. It is used to test beam line equipment including shielding materials, detectors, data acquisition electronics, instrument software and control. EMMA is on a room temperature water moderator with the peak flux occurring at 1 Å (81.8 meV). A set of slits and a positioning stage are used to scan the detector across the beam. The detector performance, i.e. spatial resolution and count rate capability, can be investigated.

Light spread
In the WLSF detectors described in Sect. 2.1, the photons generated from thermal neutron conversion in the scintillators are typically spread across multiple fibres. In these detectors, the event position is determined by summing the intensity of the unique channel pair {L , R} for each fibre as shown in Fig. 1.
Several factors contribute to the spatial distribution of photons, including photon scattering in the ZnS:Ag/ 6 LiF scintillator sheets, light reflection and propagation in the fibres and photon detection by the PMTs. Two of the main effects that influence position reconstruction are the fibre multiplicity in the multi-anode PMT channels, which depends on the fibre coding coupling method employed, and the optical cross-talk due to the light spread into adjacent channels typical of multi-anode PMTs.
The comparison between the two similar detectors provides insight into the effectiveness of the optical dividers. Moreover, the evaluation of the light spread gives useful information to optimise the CoG positioning algorithm. The spread over multiple fibres is, indeed, necessary to perform the calculation.
Measurements were taken on both detectors with neutrons from a moderated 241 Am/Be source in the ISIS neutron detector test facility. This set-up ensures a uniform distribution over the detector and a low neutron count rate (approximately 20 n/s/fibre). Due to the modularity of the detector, the analysis performed on one fibre is representative for the detector. Moreover, no saturation or ghosting artefacts occur at such a low count rate. The data were recorded using the event position firmware. The event position and maximum intensities on all PMT channels were stored.
The average intensity distribution of all events centred on one fibre (fibre 56) is shown in the top panel of Fig. 3a, b. The intensity distribution across the fibres is calculated by adding The intensity for each channel is reported. The right matrix shows the intensities corrected by the cross-talk calculation. The cross-talk is calculated as the average ratio of the red circled intensity, left matrix, with respect to the brightest channels. b Intensity distribution over PMT channels before (black) and after (red) applying the cross-talk correction. The insert shows the difference between the two; a cross-talk below ≈ 8% is calculated the intensities I (L) + I (R) based on the appropriate fibre code; the result is shown in Fig. 3c. The centre of the most intense peak correctly identifies the position of the neutron events, while the peak width represents the light spread over the fibres. The remaining peaks are artefacts obtained from the multiplicity of fibre ends coupled to the same PMT channel and optical cross-talk between PMT channels. Two corrections have been implemented to determine the effect of the light spread on detector performance: one takes into account the optical cross-talk due to the multi-anode PMT, and the other is used to disentangle the intensity repetitions introduced by fibre coding (multiplicity). The calculations are reported for the DELFT detector, but due to the similarity between the two detectors they can also be applied to the INTER detector.

Cross-talk correction
Multi-anode PMTs suffer from optical cross-talk, i.e. light spread onto channels adjacent to the channel with the highest recorded intensity. For an 8 × 8 array, it may extend up to 8 neighbouring channels. Assuming that the light hits only one channel, the cross-talk would ideally affect the 4 side-neighbouring channels, each with a similar probability, and the 4 corner neighbours with a smaller probability. Figure 4a left shows the multi-anode PMT with the intensities for each channel in the case of a neutron event. Due to the fibre coding, each unique pair of PMT channels identifies a single fibre. In the vertical direction, two neighbouring PMT channels refer to adjacent fibres on the detector. In this case, most of the detected intensity is given by the actual light spread over adjacent fibres and they cannot be taken into account when calculating the cross-talk. The adjacent horizontal channels are coupled to fibres well spaced from each other (more than 10 fibres), far enough so that the two intensities do not correspond to the same event. Optical cross-talk can be assumed to provide most of the signal on these channels. The percentage of cross-talk is calculated by averaging the ratio between the two brightest channels and their horizontal neighbouring channels, highlighted by red circles in Fig. 4a left. The cross-talk intensity is calculated by multiplying the brightest channel intensity by this cross-talk percentage, e.g. 554·0.08 ≈ 45; this quantity is then subtracted by the horizontal neighbouring channels, e.g. ≈ 59−45 = 14.
Note that the calculation based on this assumption is an upper limit of this effect. The crosstalk corrected intensity is depicted in Fig. 4a right. The comparison between the corrected (red) and initial (black) intensity per PMT channel is shown in Fig. 4b. The insert plot shows the ratio between the two. In this specific case, the amount of cross-talk is below 8% of the recorded signal.

Fibre multiplicity intensity correction
A correction for the effect of fibre multiplicity on the intensity of light recorded in an individual PMT channel is required in order to determine the real light spread over the fibres from a neutron event. The multiplicity of fibre ends coupled to the same channel is, on average, 6 per channel for the DELFT detector and up to 16 for the INTER module. In the case illustrated in Fig. 3, the neutron events are centred at fibre 56. The light from such events will only spread across the near neighbouring fibres. Light will be unable to spread as far as fibre 102, where artefact intensity peaks start to occur, as shown in Fig. 3c. A correction to the intensity distribution, i.e. the effective photon density, has been developed to account for the fibre coding of the detector.
Each fibre is denoted by F x , where x = 1, 2, . . . , n and n is the number of fibres in the detector. F x is identified by a unique pair of PMT channels F x = {L , R}, as described in Sect. 2.1. The corresponding intensity (I F x ) is defined as the sum (I L + I R ) where I L and I R are the intensities of the PMT channels coupled to the left and right fibre ends. For a given L with a multiplicity μ, a group of fibres with same I L and different I R is identified. The effective photon density of the fibres in this group will therefore have one term in common, e.g. for The effective photon density is incorrectly calculated since the intensity I 29 is summed for all (F x ) |μ fibres of the group, resulting, in the artefacts of Fig. 3c for the cited example. A correction (Eq. 2) has been developed based on the fibre code each I L is weighted by the probability of the corresponding I R and vice versa: The intensities corresponding to the fibres in a group with same L or with same R are calculated without repetition and become: ⎛ The correction is defined as fibre multiplicity correction (FMC), and a sketch of the calculation is illustrated in Fig. 5   Comparison between raw intensity distribution, black curve, and the distribution obtained by applying the intensity correction, red curve 60% of the sum of all I R i corresponding to L = 29, while I 29→61 is 31%. As expected, most of I 29 is shared between the fibres illuminated by the event. The intensities corresponding to the fibres away from the event are in total less than 10%. Figure 6 shows the comparison between the raw intensity distribution, black curve, and the distribution obtained by applying the FMC correction, red curve. Note that the reduction in intensity is a result of the calculation, since the intensity I L is divided into separate values according to the weight probability of the I R s. Moreover, the artefacts due to the fibre coding multiplicity have been removed as a result of the correction. The method is independent of the fibre code and it can be easily applied to other cases. The correction has also been performed on the INTER detector. The results and comparison between the two detectors are reported in Sect. 3.3.

Light spread in the DELFT and INTER detectors
The light spread is identified by the number of fibres which produce intensities in PMT channels above a certain threshold. This threshold is identified by the effective photon density  Comparison between raw data (blue circles) and data corrected with the cross-talk correction. b The intensity correction based on the multiplicity of the fibre coding is applied to both sets of data. c, d Light spread in the INTER detector for the average of all neutron events occurring in fibre 84. c Comparison between raw data (blue circles) and data corrected with the cross-talk correction. d The intensity correction is applied to both sets of data of a single photon, indicated in Fig. 7 with horizontal red lines. The light spread has a Lorentzian distribution. The fitted curves are shown in Fig. 7. The top panel, in Fig. 7a, b, shows the light spread for the DELFT detector, while the results for the INTER detector module are shown in Fig. 7c, d. Each plot depicts two distributions; the blue circles represent the intensity distribution calculated with the raw data, while the red squares identify the intensity distribution when the cross-talk correction is applied. The respective Lorentzian fits are shown by the solid and dashed black lines. The data corrected with the FMC, redistribution of the intensities in the PMT channels, are shown in Fig. 7b for the DELFT detector and (d) for the INTER detector. The fibre intensity distribution was averaged for all neutrons absorbed at one fibre.
The cross-talk correction does not significantly affect the light spread. The number of fibres with a signal above threshold with and without applying the calculation is the same for all cases. Cross-talk correction will therefore not be employed in the position reconstruction discussed in Sect. 4. The average cross-talk for the DELFT detector is around 8%, while it is about 2-3% for the INTER detector.
On average, the light spreads over ± 4-5 fibres from the brightest fibre in the DELFT detector, whereas for the INTER module it extends over ± 2 fibres, for the same single photon density threshold and without applying any correction. When both the cross-talk calculation and the intensity correction are performed the light spread is ± 3 fibres for the DELFT detector and ±1 fibre for the INTER detector. Implementing FPGA firmware with this calculation would require large amounts of logic and memory while slowing down the event position reconstruction and it is not currently implemented in the FPGA firmware. The difference in light spread between the two detectors is due to the use of optical dividers in the INTER detector and has a significant impact on the optimisation of position reconstruction algorithms. These effects are discussed in the following section.

Position Reconstruction Method
A possible solution to improve the spatial resolution of these detectors is the use of interpolation algorithms. The implementation of such methods is relatively straightforward due to the modular geometry of WLSF detectors. The algorithm discussed here takes advantage of signal processing based on single-photon counting and the light spread described in Sect. 3.
A centre of gravity algorithm (CoG) has been developed for these detectors. The position is calculated by weighting the sum of ± n neighbours of the most intense fibre. The number of fibres involved in the calculation can be optimised based on the light spread studied in the previous section. The reconstructed position is calculated event by event as: where I is the intensity recorded in each of the fibres and N = 2 · n + 1 is the total number of fibres F involved in the calculation.
The CoG method enables position resolution below the fibre pitch to be achieved, therefore improving the detector performance while maintaining simplicity of manufacture. The response of WLSF detectors is intrinsically nonlinear when an interpolation method is performed. The distribution of events, as calculated by the CoG, is therefore biased towards one of the fibres. This biasing is expected due to the nature of light collection in the detector. This behaviour is illustrated by the histogram of reconstructed event positions, shown in Fig. 8, under uniform neutron illumination from the 241 Am/Be source.
A Gaussian kernel function has been fitted to estimate the probability density function (PDF). The distribution sums the kernel functions for each data value, and the total smoothing of the curve is determined by the bandwidth defined as δ. δ gives an estimation of the spread of the probability from the data point to its neighbouring values. (b) Fig. 9 a Event distribution with interpolated position using the CoG algorithm recorded with the DELFT detector at the 241 Am/Be source. Linear binning is used for the black curve, while nonlinear binning is used for the red curve with δ = 0.2. The uniformity improves by more than 40% when using the nonlinear binning The nonlinear binning is calculated based on δ which defines the bin width around the fibres. Between fibres, the bin width becomes (1 − 2δ). The extent of the δ and (1 − 2δ) regions is indicated in Fig. 8. In order to achieve the most uniform distribution, a further optimisation is performed around the δ value of the kernel distribution. Note that this value changes with the light spread of the detector. Therefore, different values are obtained for the DELFT and the INTER detector, δ = 0.20 and δ = 0.18, respectively.
The CoG method together with the nonlinear binning algorithm has been implemented on a FPGA, which enables real-time position interpolation and outputs the newly calculated position. Results will be discussed in the next section.

Performance with the interpolation method
A series of measurements have been taken to investigate the effectiveness of the proposed CoG interpolation method. The detectors have been tested on various ISIS instruments, described in Sect. 2.2. Similar experimental set-ups have been adopted. Moreover, the measurements have been carried out both with the ISIS Data Acquisition Electronics (DAE) and with the two sets of FPGA firmware developed and implemented in-house by the ISIS Detector Group.

Accuracy of the CoG method
One of the detector characteristics which is mostly affected by position interpolation methods is detector uniformity. A non-uniformity of about 40% has been shown in previous work [38,42] when applying an interpolation calculation to WLSF detectors. In order to improve the uniformity of the interpolation method, a nonlinear binning has been implemented for use in conjunction with the CoG method described in Sect. 4. The width of the nonlinear bins is (2δ) and (1 − 2δ). The difference between the linear binning and nonlinear binning with δ = 0.2 is shown in Fig. 9, where the DELFT detector was exposed to the 241 Am/Be source. Note that the higher intensity recorded in the first and last fibres of the detector is an edge effect. These two fibres have neighbours only on one side; therefore, they absorb light from a larger area of the scintillator.
The uniformity of the interpolated events is shown in Fig. 9a using linear (black curve) and nonlinear (red curve) binning, with δ = 0.2. The uniformity variation is calculated as the probability density function from the mode of the counts. The most frequent value is centred at one, and the FWHM of the fit returns the uniformity variation of the distribution. In the case of the CoG calculation and linear binning, a variation of about ± 23% is achieved, in agreement with previously cited work [38,42]. As shown in Fig. 9b, the use of nonlinear binning improves the uniformity by more than 40%, resulting in a uniformity variation of ± 13%. Figure 10 summarises the results for both detectors, Fig. 10a depicts the uniformity for the DELFT detector and Fig. 10c for the INTER detector. It must be clarified that, during the build of both detectors, several fibres were coupled to the wrong multi-anode PMT channels; fibres 176, 177, 192 and 193 for the DELFT detector and fibres 109, 118, 178 and 179 for the INTER detector. This leads to imperfections in uniformity which are not dependent on the detector performance, but strictly related to the assembly of the two modules. These are prototype detectors being used to develop signal processing algorithms. In the production versions, such imperfections will not be present.
The comparison between the analysis of raw data and the data processed using the CoG algorithm is shown, with and without the intensity correction based on the multiplicity of the fibre coding. The distribution is depicted as counts in the bin, since the number of bins needed for the CoG method is double those used for the standard analysis. The FWHM of the probability density function quantifies the non-uniformity of the detector. The results are shown in Fig. 10b for the DELFT detector and 10 (d) for the INTER module. The uniformity variation is ± 11% and ± 12%, respectively, when the position reconstruction is not applied. For the DELFT detector, the non-uniformity is about ± 13% after applying the CoG algorithm with the optimised nonlinear binning method. Non-uniformity is improved by only ± 1% when the intensity correction is added to the calculation (blue curve). The uniformity variation calculated for the INTER detector when only the CoG algorithm is applied is about ± 19%.
The ± 19% uniformity variation for the INTER detector is due to the different fibre coding of the detector compared to the DELFT detector. As described in Sect. 2.1, the INTER detector has two different fibre coding regions. The reflected beam is centred in the χ region, while the high-density coded regions are used for background correction. These have a large fibre multiplicity per PMT channel (14 to 16 fibres per channel). This produces distinct steps in the intensity distribution at the edge of each group of fibres with the same multiplicity, i.e. every group of 14 fibres coupled to one multi-anode PMT channel. The CoG algorithm is a weighted sum; therefore, the interpolated position is centred on the last fibre of the group with the highest intensity at the step. The high intensity peaks, clearly visible in Fig. 10c (red curve), are artefacts of the calculation due to this effect. This can be partially corrected by applying the intensity correction based on the fibre code multiplicity (blue curve). The peaks are significantly reduced and the uniformity is somewhat improved, resulting in a variation of about ± 17%.
Further improvements can be achieved by tuning the CoG algorithm to the characteristics of each fibre code used. For the INTER detector, the interpolation method can be applied solely to the χ region of the detector. In this way, the requirement of high spatial resolution in the χ region is fulfilled without worsening the uniformity of the detector. Continuous developments are under way to further extend the capability of the method, while keeping simple calculations for implementation on the FPGA without affecting its performance.
A further comparison has been carried out by measuring the uniformity of the INTER detector on the INTER reflectometer with the ISIS Data Acquisition Electronics (DAE) system. A fine step (200 µm) position scan measurement was taken using a collimated beam. A total of 700 positions were recorded, and a compilation of the spectrum vs time-of-flight vs counts histogram is shown in Fig. 11a. The corresponding 1D histogram, integrated in ToF and normalised by the total counts in the detector, is depicted in Fig. 11b  ToF projection over the fibres normalised by the total counts in the detector. The uniformity variation is ± 9% without including the non-uniformity due to fibre coding errors uniformity of ± 9% has been measured, in agreement with the ± 12% result obtained from the measurements with the 241 Am/Be source shown in Fig. 10d, despite using two different data acquisition electronics. Scanning measurements across the detector using a collimated beam provide information on the position accuracy of the detector. Hence, the same set of measurements shown in Fig. 11 is used to investigate the position linearity of the INTER detector. A similar set of data were recorded with the DELFT detector on the CRISP instrument. These measurements were taken with a 125 µm step, i.e. about a quarter of the fibre pitch. The comparison between standard event positioning and CoG interpolated position is shown in Fig. 12 for both detectors. Note that Fig. 12b depicts the measured positions in the χ region of the INTER detector. However, the same results were obtained in the high-density coded regions.
The peak intensity of the beam profile identifies the incident beam position at the detector for each measurement. As expected, without applying the CoG interpolation method, the measured position increases every four steps for the DELFT detector, which corresponds to the fibre pitch. The analysis performed with the CoG method exhibits better accuracy in the positioning, which is a factor of two less than the fibre pitch. The residuals between the linear fit and the two position methods are shown on the right hand side of Fig. 12. The red graphs show the residuals for the CoG, and the black graphs show the residuals for the standard positioning. A similar result is obtained with the INTER detector as shown in Fig. 12b. The position linearity of both detectors is improved by about a factor 2, and it is less than the fibre pitch.

Position resolution
The spatial resolution of the detectors was evaluated by using a collimated beam and a thin slit (≈ 100 µm) placed in front of the active area of the detector. The thin opening in the slit is important to keep the divergence of the beam to less than one fibre pitch. Moreover, since the slit is at the front face of the detector, the beam divergence can be considered as having a negligible effect on the beam size and it is approximately defined by the slit opening. The DELFT detector was tested on EMMA, while the measurements taken with the INTER module were carried out at the INTER reflectometer. In both cases, the measurements were taken at two positions on each detector: one with the beam centred on a fibre and the other in between two adjacent fibres. Note that, due to the detector modularity, the results hold for any position on the detector and are independent of which fibres are exposed to the beam.
The data were recorded using the FPGA firmware based on single photon counting [32]. Post-processing analysis was performed by applying the interpolation method, described in Sect. 4. The results also provide a reference for the quality of the data recorded with the position interpolation implemented in the firmware of the FPGA. Figure 13 shows the results obtained with the DELFT detector, while the measurements taken with the INTER module are depicted in Fig. 14. The position resolution has been estimated for each measurement in three different ways. The calculation on raw data (No Pos Rec) is represented by the black curves. The results are shown in red when the CoG algorithm is applied to the raw data (C.o.G.). The blue curves show the CoG applied to the data corrected with the method (FMC) described in Sect. 3.2, and it is defined as C.o.G. with FMC in Figs. 13 and 14. The CoG calculation is performed together with the nonlinear binning described in Sect. 4. This identification holds for the subsequent figures in the paper.
The measurements were taken with the FPGA in event mode, where the FPGA is unable to store data at high incident neutron rates. Due to this throughput limitation and considering  The raw data are shown in black, the raw data treated with the CoG algorithm are depicted in red, while the data analysed with the correction method (FMC) described in Sect. 3.2 and CoG are shown in blue. The spatial resolution is improved by a factor ≈ 1.5 − 3 when the CoG algorithm is applied that the INTER flux was much higher than the one at EMMA, a 10 times reduction of counts in the peak was recorded for the measurements with the INTER detector. A background subtraction was applied for Fig. 14, since a high signal-to-background ratio (about 5%) was recorded, with respect to the DELFT detector data (below 1%). Despite this limitation, the purpose of the analysis is to show the difference between the event positioning with and without applying a position reconstruction algorithm. The absolute signal-to-background ratio is not relevant in this case, as the comparison between the two positioning methods is a relative quantity. The effect of the CoG algorithm on counting rate capability will be discussed later in Sect. 5.3. Panels (a) and (b) show the event distribution when the beam is centred on a single fibre and in between two fibres, respectively. The corresponding Gaussian fits for all three analyses are depicted in plots (c) and (d) and are normalised with respect to the maximum intensity of the peak.
The spatial resolution for WLSF detectors depends on both the diameter of the WLS fibres and the geometry of the detector, in particular on the fibre pitch. Both detectors described in the paper have a fibre pitch (p) between 0.5 mm and 0.6 mm. Typically, the spatial resolution is defined as the width of a fitting function at half maximum, that is the FWHM of the function. A Gaussian distribution has been used to fit the experimental data. The FWHM in Figs. 13 and 14 is expressed as a fraction of p (fibre pitch). Therefore, the spatial resolution in (mm) is given by S R = FWHM · p.
As expected, when the beam is centred on one fibre and the interpolation method is not applied, S R is approximately equal to the fibre pitch (FWHM =1. 19). Figures 13c and 14c show that the same result is obtained for both detectors despite the different experimental conditions. A clear improvement can be noticed when the CoG algorithm is applied (red vs. black curve). The FWHM improves by about a factor 2, with S R ≈ 380 ± 50 µm. The The raw data are shown in black, the raw data treated with the CoG algorithm are depicted in red, while the data analysed with the FMC described in Sect. 3.2 and the CoG are shown in blue. The spatial resolution is improved by a factor ≈ 2 − 3 when the CoG algorithm is applied thin slit in front of the detector ensures that the beam size is kept within the diameter of a fibre. Nevertheless, when the beam is positioned in between two fibres, the positioning of each event will have an equal probability of being assigned to one of the two fibres. In that case, the beam profile is indeed spread over two fibres, as shown in Figs. 13b and 14b, and the FWHM is more than 1.5 times larger than the case where the beam is centred on a single fibre. A FWHM = 1.8 has been calculated for the measurement performed with the DELFT detector (Fig. 13d) and a FWHM = 2.1 for the INTER module (Fig. 14d). A factor 3 improvement is achieved when applying the interpolation method, resulting in a FWHM ≈ 0.7 for both the DELFT and the INTER detectors. The spatial resolution calculated with the CoG is ≈ 380 µm for both detectors, and this is in agreement with the results obtained with the beam centred on one fibre.
The comparison between C.o.G. and C.o.G. with FMC provides information about the effectiveness of the intensity correction and whether it is beneficial to implement this correction for on-board signal processing. The difference in FWHM, for all configurations, can be considered negligible, as it is below 0.05 · p or below 30 µm. This result is in agreement with the outcome from the analysis of the light spread discussed in Sect. 3.3. Hence, the on-board implementation of this correction is not necessary for these detectors, thus further saving on FPGA resource and processing time.
FPGA firmware with online position reconstruction was implemented using the optimisations from post-processing discussed in Sects. 3 and 4. This firmware is able to output time-of-flight as well as position for both the reconstructed and standard positioning algorithms. Measurements were taken on EMMA with the DELFT detector under the same measurement conditions used to record data shown in Fig. 13, i.e. a 100 µm thin slit placed at the front face of the detector. Figure 15 shows the results from two sets of measurements;    Figure 15a, b is recorded using the standard positioning firmware, whereas Fig. 15c, d shows the data registered with the CoG algorithm integrated in the FPGA firmware. The corresponding Gaussian fits of the counts integrated in ToF, projected over the fibres, are shown in Fig. 15e, f. The counts are normalised to the maximum peak intensity. Good agreement between the post-processing analysis (Fig. 13) and the on-board CoG calculation (Fig. 15) is obtained. The FWHM for the measurement with the beam centred on a fibre is ≈ 1.2 when no position reconstruction is applied and ≈ 0.7 when CoG is used. The corresponding spatial resolution achieved using CoG position reconstruction is 390 ± 50 µm. Similarly to the results shown in Fig. 13, the measured beam profile without position reconstruction broadens to almost two fibres when the beam is centred in between two fibres. However, the spatial resolution achieved by applying the CoG calculation remains in the order of 390 µm, as shown in Fig. 15.
These results show that the spatial resolution is improved by about a factor 2 due to the CoG algorithm. The implemented signal processing with the online CoG calculation can Integrated Counts a.u.

CoG interpolation firmware
2mm Slit width 5mm Slit width 8mm Slit width 15mm Slit width (b) Fig. 16 Beam profile integrated over time-of-flight for various instrument slit openings: a using standard positioning firmware and b using firmware with the on-board CoG algorithm. No differences are shown between the two. Second-order polynomial curves represent the background. Spurious peaks appear in both cases as the rate increases beyond the local rate capability of the detector be integrated in the detector electronics, leading to better detector performance, without requiring further data processing. A spatial resolution below the fibre pitch is achieved and validity of the on-board FPGA implementation has been demonstrated.

Counting rate capability
Neutron reflectometry is particular demanding in terms of detector requirements. In a typical reflectometry measurement, a high-intensity beam is focussed onto a small area of the detector. Therefore, the detector must meet the requirements for both high spatial resolution and high counting rate capability. It has been shown that the improvement in spatial resolution, below 500 µm, can be achieved by applying the proposed CoG interpolation method at modest counting rates. The implementation of the CoG calculation integrated into an FPGA has been successfully demonstrated at modest counting rates as well. The performance of this interpolation method at high counting rates is discussed in this section. The effectiveness of the CoG method at high counting rates has been investigated by performing a series of measurements with increasing neutron flux. The tests were performed on the EMMA instrument with the DELFT detector using the two types of acquisition firmware. One returns standard neutron positioning, while the second performs on-board CoG interpolation and outputs the new calculated positions. Any effects of counting rate on the CoG positioning algorithm can be investigated by comparing the measurements using both systems.
The incident neutron flux was varied by changing the size of the upstream instrument slit along the length of the fibres. A slit, 1 mm in width, was placed in front of the detector, in order to reduce the background and limit the beam to a similar area of the detector for all measurements. The incident flux increases linearly as the instrument slit opening increases. The width of this slit was varied from 2 to 15 mm. The beam profile integrated over Time-of-Flight is shown in Fig. 16 for the different slit widths, (a) using the firmware with standard positioning and (b) with the on-board CoG interpolation firmware. The recorded shape of the beam was the same for both data acquisitions. The peak-to-background ratio was calculated for each measurement, and an average value of about 0.065% was obtained. The background level was found not to exceed 0.1% of the maximum peak intensity. The calculated background was approximated by second order polynomial curves as shown in Fig. 16a, b.
Artefact peaks appear as the rate increases, i.e. at wider slit opening. These effects, known as ghosting, are caused by the misplacement of neutron events due to the scintillation light from one neutron overlapping in time with afterglow of another neutron event at a different (b) Fig. 18 a Local measured peak rate along one fibre for no position reconstruction (red circles) and for the CoG positioning method (blue diamonds). The expected peak rate is shown for both cases. b FWHM in (mm) for each measurement is shown location on the detector. The three ghosting peaks in Fig. 16 correspond to fibres (42,58 and 153) that are connected to the same PMT channels as fibres 103 to 106, which are in the centre of the incident neutron beam. It should be noted that these ghosting artefacts only occur at very high rates when the detector is already dead timing. Figure 17 shows the 2D histogram of the detector in time-of-flight for a 15-mm-wide slit using the two firmwares. The incident rate on the detector was above the counting rate capability of the detector; therefore, the misplacement artefacts were expected. The purpose of this measurement was to investigate whether the CoG algorithm induces further spurious effects due to the position reconstruction. The comparison of Fig. 17a, b shows that the two firmwares have the same behaviour. The artefacts are positioned at the expected fibres (42, 58 and 153) for short ToF (< 0.01 s) when the incident rate is high. At longer ToF, the misplacement effects disappear since the rate decreases as the ToF increases.
The local measured peak rate, along one fibre of the detector, with respect to each slit opening is depicted in Fig. 18a for the standard positioning firmware (red circles) and for the on-board CoG interpolation firmware (blue diamonds). Solid lines are representative of the expected local peak count rate. The results agree with each other, and the linearity condition is satisfied up to ≈ 16 kcps, corresponding to a slit opening 4 mm. 16 kcps is around the limit for this kind of signal processing condition, as demonstrated in previous work [30].
A Gaussian fit was applied to each beam profile (Fig. 16), following the method described in Sect. 5.2. The calculated FWHM values are depicted in Fig. 18b for the standard positioning firmware (red circles) and for the on-board CoG interpolation firmware (blue diamonds). As shown in Sect. 5.2, a 40% improvement in spatial resolution can be achieved by using the CoG method. For this set of measurements, an inherent limitation to the CoG calculation is given by the beam size, which extends over at least 3 fibres. Further broadening effects are due to the afterglow at higher rate and the lack of parallelism of the slit to the fibres. Nevertheless, when the CoG interpolation method is used, a 20% improvement in FWHM is achieved for all slit openings.
It has been shown that the CoG calculation, implemented in the on-board data acquisition firmware, does not affect the performance of the detector in counting rate capability and that the width of the recorded beam profile is improved by at least 20%, even at high rates.

Conclusions
ZnS:Ag/ 6 LiF scintillation detectors have been employed at ISIS for more than two decades [33]. ISIS continues to develop ZnS:Ag/ 6 LiF WLSF scintillator detectors, exploiting the high flexibility, scalability, high performance and cost effectiveness of these detectors for different neutron scattering applications, including reflectometry, single crystal/powder diffraction and inelastic neutron spectroscopy.
Two detectors for neutron reflectometry, the DELFT and INTER detectors have been presented. Differences and similarities have been investigated. Several measurements have been shown, for both detectors at different ISIS instruments, EMMA, INTER, CRISP and with an 241 Am/Be source in the ISIS neutron detector test facility. Despite the detector design differences, a good agreement between the INTER and DELFT detectors is achieved.
Light spread in the detector was investigated, and two intensity corrections have been implemented for evaluating the fraction of light in a PMT channel from each fibre connected to that channel, taking into account the effects of the cross-talk and of the fibre code. The light spread was found to be ± 4 to 5 fibres without optical dividers. Using dividers between fibres resulted in a reduced light spread of ± 2 fibres. These results were used to optimise the position reconstruction algorithm.
In the case of WLSF scintillation detectors, position reconstruction has commonly been done by determining the combination of fibres that absorbed the highest amount of scintillation light. With this type of position reconstruction, the accuracy of position determination is at best the same as the fibre pitch. A centre of gravity method with nonlinear binning has been developed. It has been shown that this approach leads to a submillimetre spatial resolution (≈ 380 µm), which is circa 40% less than the fibre pitch of the detector.
The effect of the CoG method on detector characteristics has been discussed. Combining the CoG algorithm with nonlinear binning has been shown to lead to a factor 2 improvement in uniformity, circa ± 10% as compared to ± 20% for traditional approaches [38,42]. Position accuracy is also improved by a factor 2 when the CoG method is applied, due to position binning finer than the fibre pitch. The counting rate capability of the detector is not affected by the use of this algorithm. A local counting rate limitation of ≈ 16 kHz is achieved with both standard and CoG positioning. Moreover, applying the fibre intensity correction to the CoG algorithm makes little difference to the calculated position resolution or detector uniformity. This implies that the CoG algorithm is not heavily dependent on the fibre code and therefore can be used for a range of detectors with different fibre codes.
The method has been successfully implemented in an FPGA for on-board real-time calculation. The comparison between results from offline and on-board processing has been made and shows very good agreement between the two methods.
The proposed interpolation method can be applied to both linear and 2-dimensional position-sensitive detector designs, changing the CoG parameters according to the geometric properties of the detector. Further developments are under way to extend the capability of this method and to investigate the feasibility of programming an FPGA with more advanced interpolation methods. The promising results and the relatively simple implementation in an FPGA make the proposed CoG method suitable for a variety of applications. Neutron reflectometry can particularly benefit from the enhanced sub millimetre position resolution achieved with this method.