{'fraction_non_alphanumeric': 0.024331696672122205, 'fraction_numerical': 0.010911074740861976, 'mean_word_length': 4.782965299684543, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Calibration and post-processing for photon-integrating pixel array detectors

We have developed calibration and data processing techniques optimized specifically for photon-integrating pixel array detectors (PADs). Primary effects to be calibrated are pixel gain variation and pixel area variation. Gain variations originate in pixel electronics and may be corrected for via a multiplicative factor. In contrast, area variations result from doping inhomogeneities in the sensor diode, which induce lateral fields that disturb the path of charge carriers as they traverse the diode, resulting in variation in the area mapped to each pixel, depending on the x-ray energy. Methods for measuring both effects are described. Additionally, the single-photon sensitivity used in the gain calibration enables flexible thresholding of events in low-fluence data.


Introduction
Area detectors based on direct conversion of x-rays in silicon exhibit device nonuniformities that are fundamentally different from those in indirect conversion devices such as phosphorcoupled CCDs, necessitating the development of new calibration methods. This paper focuses on the calibration of photon-integrating pixel array detectors (PADs). Process variations in integrated circuit fabrication produce electronic gain variation in PADs as well as in CCDs, but since each pixel in a PAD has its own amplifier, the variation is more finely-grained. Geometric distortions present greater contrast between device families: whereas the primary source of geometric distortion in a phosphor-coupled CCD is structure in the phosphor and fiber-optic taper, distortions in PADs result from doping inhomogeneities in the high-resistivity silicon sensor that alter the effective area of a given pixel. As will be seen, the geometric distortions tend to dominate over gain nonuniformity.

Geometric distortions
Variations in doping density during the growth of the high-resisitivity silicon wafers used as the sensor layer in a PAD result in a "tree-ring" pattern visible in regions of nominally flat illumination. As shown in figure 1, this effect is readily seen in PADs as well as in directdetection CCDs, which are fabricated on similar material. The doping inhomogeneities produce lateral fields in the sensor that deflect charge as it traverses the diode. As a result, charge that should be drawn by the overbias field into one pixel's amplifier can be diverted to a neighboring pixel. Since the amount of deflection depends on the relative strength of the transverse vs. lateral fields, the tree ring amplitude decreases as the bias voltage used to deplete the diode is increased. Additionally, the distortion depends on the x-ray conversion depth, and thus on the photon energy, as charge carriers generated at the top of the diode will be deflected onto different paths than those generated near the bottom [1]. In our experience, pixel areas are distorted by 1-5% in 300-600 µm thick diodes.
The following sections describe calibration measurements made on the mixed-mode pixel array detector (MMPAD), a high-speed (maximum frame rate 1 kHz) photon-integrating PAD with a 500 µm thick diode and 150 µm x 150 µm pixels which uses an in-pixel charge removal circuit coupled to an 18-bit counter to achieve a dynamic range spanning eight orders of magnitude [1,3]. The methods described are equally applicable to other photon-integrating PADs.

Area distortion measurements
There is insufficient information in a flood field image to directly decouple true gain variations from area distortion. Additionally, area distortions cannot be corrected for via a multiplicative factor, which would treat the distortions as a variation in gain. The appropriate correction is a re-distribution of charge between neighboring pixels, wherein the total signal on a chip is preserved. To construct the re-distribution map, an accurate measure of the pixel boundaries must be determined.
To measure the pixel boundaries in an efficient manner, the detector was scanned across an array of pinhole spots. An x-ray mask was fabricated in 50 µm tungsten with a square array of 75 µm pinholes on a 330 µm pitch. The pinhole diameter was chosen to provide good isolation of a single pixel. The mask was placed 5 mm from the detector entrance window and was flood illuminated from a copper x-ray tube. To measure the effective pixel widths in x or y, the mask was centered in y or x, respectively, and translated in sub-pixel-width steps across the detector face in the desired direction. A step size one-tenth of the nominal pixel width provides a compromise between resolution and time required to complete a scan. A total exposure time of 25 s at each step was sufficient to yield 3000 photons per pinhole, giving a Poisson-limited uncertainty of less than 2% per point. Since multiple points are used to fit the boundary locations (about 10 points per boundary crossing), the boundaries are fit to better than 1% accuracy.
The rising and falling edges of each pinhole crossing are identified and fit to a sigmoid function, from which the crossing midpoint, i.e. the pixel boundary, is obtained as a fit parameter. An example curve and a map of computed pixel areas are shown in figure 2. Approximating the pixels as rectangular, the overlap between a pixel and each of its eight neighbors can be calculated. To correct an image, the corresponding fraction of a pixel's signal is shuffled to/from each neighbor [4]. This procedure degrades the spatial resolution slightly. Alternatively, software packages designed to work with distorted images can use the pixel boundary map directly.

Gain calibration and single-photon measurements
Photon-integrating PADs do not provide electronic in-pixel energy thresholding, yet the read noise can be a small fraction of an 8 keV x-ray photon, enabling flexible thresholding in software of low-fluence data during post-processing. The 3x2 MMPAD module exhibits read noise corresponding to approximately one 1.3 keV photon. This sensitivity can be used during calibation to measure individual pixel gains, and during processing to threshold, significantly reducing the effects of detector systematics and unwanted signal in low-fluence regions [5].
To separate gain variations from geometric distortions, the pinhole mask is used to isolate selected pixels from their neighbors. A 25 µm nickel filter was used to improve the spectral purity of the source. Many thousands of short exposures are taken such that there is on average less than one photon per pixel per frame. A histogram of the intensity values recorded by an isolated pixel is comprised of discrete photon peaks that can be fit to a sum of Gaussians, as shown in figure 3. The single-photon gain of the pixel determines the spacing between peaks. The peak width is determined by the read noise, and to a lesser extent by noise from dark current (negligible at very low integration times). Figure 3. Photon spectrum recorded by one pixel over 130,000 8 ms frames. The fit shown is to a sum of 5 Gaussians: four corresponding to discrete photon peaks, and the fifth accounting for the heights of the valleys between peaks. The y-axis is normalized to the total number of frames represented.
A gain map obtained by this method is shown in figure 4. The pixel gains are nearly uniform, with a mean of 10.8 ADU/8 keV photon, and varying by about 0.5% across the detector, with the exception of the upper right corner of the lower middle chip, which is systematically low in the gain map as well as in the flood field ( figure 1(b)). Normalizing the flood field by the computed gain removes this feature.
The ability to define an x-ray energy of interest and apply thresholds in low-fluence regions of the detector has proved useful in synchrotron experiments, greatly improving the fidelity of low-  signal measurements while maintaining the high-flux capabilities of integrating detectors. As an illustrative example, we present data from an experiment carried out at CHESS A2 station.
With the station x-ray energy set to 15 keV, the dynamics of reactive metal foils were studied in situ by capturing 2 ms frames on the MMPAD before, during and after the initiation of a run-away thermal reaction. Similar experiments using an earlier-generation PAD are described in [6]. The short exposure time was necessary to capture the sample dynamics, but lead to low signal per frame. The samples also produced significant nickel fluorescence at 7.5 keV. Figure 5 is the histogram of all pixel values recorded in a single frame. Peaks at 10 and 30 ADU correspond to one and three 7.5 keV photons, respectively; peaks at 20, 40 and 60 ADU correspond to one, two and three diffracted 15 keV photons. The 20, 40 and 60 ADU peaks may also contain small contributions from pixels registering two, four and six 7.5 keV photons, respectively. The separation between the first two peaks allows single-photon fluorescence rejection to be carried out in software as a post-processing step. Background noise is further reduced by thresholding, since read noise from pixels with zero photon hits can be excluded from any intensity sum.