Performance of the Lancelot Beam Position Monitor at the Diamond Light Source

The Lancelot beam position and profile monitor records the scattered radiation off a thin, low-density foil, which passes through a pinhole perpendicular to the path of the beam and is detected by a Medipix3RX sensor. This arrangement does not expose the detector to the direct beam at synchrotrons and results in a negligible drop in flux downstream of the module. It allows for magnified images of the beam to be acquired in real time with high signal-to-noise ratios, enabling measurements of tiny displacements in the position of the centroid of approximately 1 μm. It also provides a means for independently measuring the photon energy of the incident monoenergetic photon beam. A constant frame rate of up to 245 Hz is achieved. The results of measurements with two Lancelot detectors installed in different environments at the Diamond Light Source are presented and their performance is discussed.


Introduction
Microfocused, monochromatic photon beams produced at synchrotrons grant the ability to probe and image material at the atomic scale. To be effective at these scales, the precise position of the beam must be relayed in real time to enable corrections to be applied as samples are scanned. It is essential for a Beam Position Monitor (BPM) placed upstream of the sample to be transparent in the energy range in use at synchrotrons and to yield high spatial resolutions.
There are several BPMs currently in use at synchrotrons. Quadrant BPMs [1] feature an array of four photodiodes placed around a metal foil that fluoresces upon contact with the beam. A number of different types of foil are required to cover the energy range in use at synchrotrons and these can lead to the introduction of anomalies at absorption edges, thus affecting spectroscopic measurements. Photoluminescence from excitation of gas atoms placed within a chamber in the path of the beam can be used to monitor its position [2] albeit with a relatively low spatial resolution. Blade BPMs [3] measure the current between electrodes in the beam's path to determine its position but suffer from limited range. Photodiodes with a small hole in their centres [4,5] to allow the beam to pass through uninterrupted have also been used. The aforementioned methods focus on determining the beam position rather than capturing its image and therefore small changes in beam shape can be falsely interpreted as beam motion.
The Lancelot beam position and profile monitor [6,7] places a thin foil of low-Z material in the path of the beam. This material causes a negligible drop in flux downstream of the monitor and does not introduce any absorption edges in the hard X-ray part of the spectrum. A small proportion of photons that scatter coherently pass through a pinhole or coded aperture perpendicular to the path of the beam. These photons are detected by a sensor, which does not have direct line-of-sight with the beam thus minimising radiation damage. The detected signal provides a real time, cross-sectional image of the beam, and can be magnified by increasing the distance between the pinhole and sensor relative to that between the scatter foil and pinhole.
The results of measurements from two Lancelot detectors operated at the I19 and I24 beamlines at the Diamond Light Source are discussed. The images from the modules are compared, and their effectiveness in measuring the intensity, position and energy of the beam are demonstrated.  Figure 1. Schematic of Lancelot beam position and profile monitor. Upon contact with the scatter foil held at an angle α with respect to the incident beam, a small proportion of photons interact, some of which are scattered such that they pass through a pinhole to a sensor. Beam displacements δ cause movement of the resultant image ∆ as shown. At a fixed α, the L/D ratio can be altered to change the magnification factor given by eqs. (2.1) and (2.2).

Principles of operation
Each tested Lancelot module consists of a 25 µm thick kapton scatter foil held at a fixed 30 • angle to the path of the beam. The typical beam energy at I24 of 12.8 keV leads to a drop in flux of ≈ 0.6% from interactions with the kapton foil. Approximately 1 12 of this drop is from Rayleigh scattered photons. A Medipix3RX sensor [8] consisting of 300 µm thick, monolithic silicon flip-chip bonded to a 256 × 256 array of pixels at a pitch of 55 µm collects the scattered photons that pass through the pinhole or coded aperture. The Medipix3RX silicon sensor array is operated in single pixel mode with a 6-bit counter depth. Previous tests on a Lancelot module with a Medipix3 sensor at the B16 beamline at Diamond Light Source are reported in [9].
The translation of movement in beam position to resulting sensor signal is illustrated in figure 1. Defining the plane of the sensor as x y , and δx and δz as the beam displacements in the xand z-directions respectively from the middle of the scatter foil, the following can be derived assuming the thickness of the pinhole sheet is negligible: where ∆x and ∆y are the displacements from the sensor's centre, L and D are the respective distances from the pinhole to the sensor and scatter foil, and α is the angle of the kapton foil with respect to the beam. The third term in eq. (2.2) is a correction for the variation in distance between the beam's footprint and the pinhole, and can be neglected for small displacements in z compared to D. Ignoring this term, if α = 30 • then the magnification of beam displacements along the z-axis is a factor of √ 3 greater than those along the x-axis.
The Lancelot module at I19 is operated in air and uses a coded aperture in the form of a cross. The cross is formed from two bisecting slits, each of breadth 100 µm and length 3 mm. With reference to figure 1, the distances D and L are fixed at 4.5 mm and 11.55 mm respectively. The I19 system consists of a small chamber which contains the scatter foil, pinhole and sensor that can be evacuated if required to reduce air scattering. Attached to this chamber is a second box that contains the sensor control and readout system. Active cooling is provided by a Peltier Thermoelectric cooler fastened to this second box, which is used as a heatsink. Two 25 µm thick kapton windows lie either side of the scatter foil to allow for passage of the beam. Detector control and readout is performed over the beamline ethernet network through a RJ45 interface. Although the module can be repositioned along the x-axis, this must be done manually.
At the I24 beamline, the Lancelot module is operated in vacuum and consists of a kapton foil fastened with a retaining ring to an aluminium tube of outer diameter 40 mm and thickness 3.8 mm. The tube houses the Medipix3RX sensor array and a 100 µm diamater pinhole. The position of the pinhole sheet cannot be altered, and hence the distance D in figure 1 is fixed at 5 mm. The Medipix3RX sensor is held in place by screws fed through three vertical, countersunk slits at 120 • angles around the tube's circumference. Therefore, the distance L can be varied to alter the magnification of the beam image according to eqs. (2.1) and (2.2). The Medipix3RX sensor is connected to its electronics, which are housed in air within an aluminium enclosure, by a double-sided flexible printed circuit board plugged into a vacuum-tight D-sub feedthrough. As with the I19 Lancelot, detector control and readout is conducted through a RJ45 interface over the beamline ethernet network. The tube is encased within a stainless steal bellows and motors are attached to enable remote movement of the module in the xand z-directions.

Beam profile & position
Magnification of the beam image is demonstrated with the I24 Lancelot module over two runs where the distance L in figure 1 is increased. Figure 2 shows examples of typical images of the beam recorded during these runs. The images are displayed in terms of pixel counts to illustrate how they look on real time displays. Although the beam appears to be circular, displacements in the z-axis are of greater magnification than those in the x-axis as explained above. Therefore, the beam's shape is that of an ellipse with semi-minor axis along the z-direction. As the scatter foil is not infinitely thin, incident photons can scatter at any point in their path as they traverse the kapton sheet, thus altering the distance D and distorting the image. Although increasing the magnification improves the spatial resolution of the image, the intensity of photons per unit area reaching the sensor drops, thus requiring a longer exposure time. Additionally, the sensor's solid angle is reduced, limiting the spatial range.
As the module at I24 can be repositioned remotely in the xz-plane, pixel resolutions are determined independently of eqs. (2.1) and (2.2). This is done by moving the module with respect to the beam in 20 µm steps within an area 100 × 100 µm 2 around the midpoint of the sensor. At each position, 100 images are acquired. For each image, the mean counts along the x -and y -axes are calculated to yield the profiles shown in figure 2. The means of Gaussian functions fit to these profiles provide the x -y position of the centroid for each image. The mean of these yields a position in terms of pixels for each measurement. The pixel resolutions can  The system records a pinhole image of a projection of the incident beam on the tilted scatter foil and as such is a deformed cross-sectional intensity distribution of the beam. As displacements in the z-position are magnified by a factor √ 3 greater than those along the x-axis, the images are distorted and the actual shape of the beam is an ellipse with semi-minor axis along the z-direction. Additionally, the scatter foil is finitely thin, altering the distance between the point of interaction and the pinhole, providing some distortion of the projected image. Bottom: profiles of images along the x-axis with fitted Gaussian functions. The peak to the right of the Gaussian functions is from a noisy pixel and pixel number has been converted to displacement from the centre of the scatter foil with resolutions given in the main text. then be determined from the mean distances between each measured point in an effort to remove uncertainties in movement of the motors. Resolutions in the respective xand z-directions of 7.06 ± 0.10 µm/pixel and 3.66 ± 0.36 µm/pixel are found during the first run, yielding spatial ranges of 1.8 mm and 0.9 mm along the xand z-axes respectively. These decrease to 3.12 ± 0.02 µm/pixel and 1.59 ± 0.15 µm/pixel when the distance L, and hence magnification, is increased, giving spatial ranges along the respective xand z-axes of 0.8 mm and 0.2 mm.
The relatively large error in pixel resolution along the z-axis is from the large variation in distances measured between the y -profiles. The error in the mean y -position is found to increase close to the beam spot origin, or in other words the point on the scatter foil at which the beam had been focused for extended periods of time during regular operation. This would indicate that the kapton has suffered some radiation damage altering the scattering angle α. A possible solution is to replace the scatter foil with a more radiation-hard material such as CVD diamond.
Although the kapton scatter foil has suffered from beam damage, the Lancelot module at I24 is still able to record displacements of 1 µm in the position of the centroid. Images are acquired with exposure times of 10 ms at a rate of approximately 83 Hz and Gaussian functions are fit to the x -and y -profiles as described above to obtain the centroid positions in figure 3. Transforming  the data into the frequency domain, clear peaks are witnessed at around 21 Hz in both the x -and y -positions. Variation in position at this frequency has been witnessed before at the I24 beamline from monitoring at the sample position with a scintillator. Although the source of this modulation is unknown, the Lancelot detector serves as an excellent diagnostics tool allowing operators to investigate the variation in real time with minimal disruption to other experiments. The peaks at 21 Hz are also seen in data collected at an exposure time of 1 ms at a rate of approximately 245 Hz. Reducing the exposure time to 100 µs and 10 µs yielded no improvement in the rate of acquisition. It is likely that the acquisition rate is limited by the cost of sending a 256 × 256 array of counts to reconstruct the image over the network. The Lancelot system includes the ability to calculate the x -and y -profiles on the FPGA, reducing the amount of information sent to a 2 × 256 array, which should result in a faster acquisition rate. Bench tests with the system have shown acquisition rates of 600 Hz can be achieved. However, this has not been attempted at the beamlines.
The cross-shaped aperture in the I19 Lancelot module is ideal for low intensity beamlines as it allows more scattered photons to reach the sensor. Additionally, the signal-to-noise ratio increases significantly when using a cross-shaped aperture [7]. However, the measured image in figure 4 is a convolution of the aperture shape with that of the beam. As the aperture is large compared to the size of the beam, it dominates the measured image's shape. The counts around the cross are from photons scattering off air molecules, which were absent in the vacuum environment at I24. Although information about beam shape is lost, the beam position can be measured more precisely with this aperture in high-noise environments such as that at I19. As the L/D ratio is fixed at 2.6, spatial ranges of 5.5 mm and 3.2 mm along the xand z-axes respectively are deduced.
Position variation as a function of time is analysed with the I19 Lancelot module in a similar fashion to that conducted on the I24 beamline. Images are acquired at exposure times of 10 ms at a rate of approximately 84 Hz, and beam variation is witnessed at around 24 Hz in the x -and y positions. This frequency of this variation is close to that observed with the I24 Lancelot module above, indicating that it could be related to the source. The peaks at 24 Hz are also witnessed in data collected at an exposure time of 1 ms, where a data acquisiton rate of approximately 241 Hz is achieved. As with the tests at I24, no improvement in the rate of acquisition is seen at lower exposure times of 100 µs and 10 µs for the reasons stated above.

Beam intensity & energy
In addition to determining the position of the beam, the images taken by the Lancelot can be used to measure the change in intensity through the total number of counts recorded across the Medipix3RX sensor array. Figure 5 shows the change in beam intensity recorded by the Lancelot detector during an overnight run at I24 with an exposure time of 200 ms and data acquisition rate of 0.1 Hz. The beam is topped-up at 10 minute intervals, which are clearly visible in the plot. Energy calibration is peformed by varying the Medipix3RX threshold from 40 to 200 DACu in 1 DACu steps while illuminating the sensor with monoenergetic photons coherently scattered off the kapton foil. The beam energy at I24 is varied from 9.0 to 15.0 keV to obtain the curves shown in figure 6. Ten of these threshold scans are performed at each energy. Exposure times at each energy are selected such that a handful of pixels are saturated, and vary between 120 ms at 9.0 keV and 500 ms at 15.0 keV.
The characteristic S-curve in figure 6, where the threshold exceeds the amplitude of pulses generated by the incident photons at the inflection point, is polluted by charge sharing between neighbouring pixels [11,12], thus making it difficult to fit a simple expression with error function and linear term to the data. The effect is more visible in the differential profile shown in figure 6, where the mean of the Gaussian distribution (which is the derivative of the error function) at the tail is the inflection point.
Modelling the contribution of charge sharing and other factors such as electronic noise and beam flux has been performed on Pilatus detectors [10]. Differentiating the expression given in the aforementioned work, the following is obtained: where N are the total counts and V t is the threshold energy in DACu. The parameters a 2 , a 3 and a 4 depend on the charge sharing, electronic noise, energy spectrum of the incident photons, beam flux and exposure time. The parameter a 1 yields a value close to the position of the inflection point. Extracting this parameter from fits of eq. (4.1) to the differential profiles of threshold scans at each energy yields the distribution shown in figure 6. A linear fit can be performed to obtain the detector gain G and offset O: -8 -

JINST 12 C12044
where E t is the incident photon energy. A gain of 8.4 DACu/keV and offset of 15.9 DACu is obtained, which compare well with expected values for a Medipix3RX sensor array in single pixel mode at super high gain settings [13].

Conclusions & further work
Tests have been conducted on two Lancelot beam position and profile monitors at the I19 and I24 beamlines at Diamond Light Source. The potential to operate the Lancelot detector under vacuum and in air has been demonstrated.
It has been shown that the resultant beam image can be magnified by adjusting the L/D ratio, as defined in figure 1, sacrificing detected intensity at a set exposure time and spatial range. Centroid displacements of ∼ 1 µm can be resolved and real time Fourier analysis on the variation in its position is an excellent tool to diagnose possible noise sources. The images from coded apertures have been shown to provide accurate position information when scattering off air molecules is a significant background, albeit with the loss of information on the beam's shape.
A maximum data acquisition rate of 245 Hz has been achieved. This is limited by the speed at which a 256 × 256 array describing each image can be sent over the network. Sending a 2 × 256 array of the x -and y -profiles may improve the data acquisition rate.
The potential use of the Lancelot module to measure the flux of the beam has been demonstrated. Additionally, energy calibration performed with the module on the I24 beamline showed a linear relationship between recorded and incident photon energies, demonstrating the possibility of using the monitor as an independent measure of beam energy.
Future work includes replacing the cross-shaped aperture on the I19 Lancelot with a pinhole to investigate the change in the signal-to-noise ratio during in air operation. Establishment of a relationship between beam flux and total counts recorded at I24 would realise the full potential of the Lancelot detector. Replacing the kapton foil with a more radiation hard material such as CVD diamond should improve the accuracy in measurements of centroid displacement and reduce the error in pixel resolution. Finally, it is intended to conduct the energy and flux calibrations at I19 to compare with those at I24.
The replacement of the silicon Medipix3RX sensor with one of gallium arsenide could extend the detectable energy range of the Lancelot monitor. Operating the Medipix3RX sensor in charge summing mode could improve the energy resolution.