2.1. Experimental set-up

A 50 µm-thick disk of tantalum (Ta) with a 15 µm circular laser-drilled hole in the center was purchased from National Aperture (Salem, NH, USA), and placed at the sample position in the protein crystallography beamline 8.3.1 at the Advanced Light Source [instrument described by MacDowell

*et al.* (2004

)]. The photon energy was set to just above the Ta

*L*
_{2}-edge at 11141 eV to maximize the stopping-power contrast of the pinhole, and the convergence angles of the beam were reduced to 50 µrad × 50 µrad by adjusting a set of slits 10 m up-beam from the X-ray focus (pinhole position). The beam stop was removed and the Quantum 315r detector positioned 85 mm from the pinhole. After inserting absorbers, it was found that a 0.1 s exposure yielded a ‘direct-beam’ spot with peak pixel intensity of approximately 20000 pixel levels or ‘analog to digital units’ (ADUs) on an unbinned, dezingered and spatially corrected image. A total of 1883 such direct-beam shots were collected, and each was followed by an equivalent ‘explicit dark’ exposure where the shutter was not opened. These explicit dark images were necessary because if the same dark image were subtracted from all the ‘light’ images then the noise in the common dark image would dominate the analysis below.

The distance between the pinhole and detector minimized the contributions of fluorescence and scattering from the pinhole to a negligible level (see §3.2

). Each image was collected with the detector driven to a slightly different position relative to the X-ray beam: ranging at random over an area approximately one pixel wide and six pixels high (the pixel size was 51.3 µm). These movements were executed to sample more than just a single part of a single pixel on the detector surface, but at the same time involve only the central region of one fiber-optic taper. A 200 × 200 pixel region-of-interest (ROI), centered on the spot, was extracted from each image and the corresponding explicit-dark image pixels subtracted to form a ‘net’ image with no read-out noise events in common with any other. The ROI was centered 2 mm × 2 mm down and left of the center of the middle detector module, so all the pixels in this experiment were digitized by the same read-out channel.

Each net image was then fitted to a two-dimensional Gaussian function to roughly establish the fractional pixel coordinate of the center of the incident beam and also to obtain a rough scale factor from the height of each fitted function. Using these fitted parameters the midpoint of each pixel could then be assigned a linear distance from the ‘beam center’ and each spot put on a common scale with the others. These shifted and scaled data were then plotted as the red points in Fig. 2. Scale factors ranged from 0.75 to 1.35 and were due largely to variations in storage-ring current. Note that the grouping of pixel values at unity is a discretization artifact arising because the difference between any two integer-valued pixels must also be an integer.

To improve the signal-to-noise ratio in the low end, each pixel was treated as a square area of constant intensity and the intensity re-distributed onto a new common pixel grid using triangle binning with the program

*FIT2D* (Hammersley, 1997

). The resulting ‘sum pixel’ intensities are plotted as the blue points in Fig. 2. This peak-fitting and re-binning procedure was repeated using the model for the actual PSF derived below to extract the center and scale of each observed spot, but the resulting changes to the points plotted in Fig. 2 were unremarkable.

2.3. Mathematical representation of the PSF

The pixel intensities observed here are not the ‘true’ PSF, but rather the convolution of the PSF with the beam profile, followed by integrating over the area of each pixel, so in this section we describe how these effects were decoupled. Specifically, the point spread observed here appears best described by a Moffat function (Moffat, 1969

), which is essentially the convolution of a Gaussian with a power law. Unfortunately this convolution cannot be expressed in closed form, but the sum of a sufficient number of Gaussians can represent almost any function to within a desired error. A highly successful example of this approach is the popular ‘5-Gaussian’ representation of atomic scattering factors (Vand

*et al.*, 1957

; Cromer & Waber, 1965

; Maslen

*et al.*, 1999

). The main utility of this representation is that convoluting atomic shapes with a Gaussian ‘blur’ may be performed analytically by simply adding the relevant

*B*-factor to that of each of the component Gaussian terms.

For example, if both the PSF and the beam have Gaussian shapes, then the spot recorded on the detector will also be Gaussian, but with a full width at half-maximum (FWHM) related to that of the PSF (

*w*
_{PSF}) and beam (

*w*
_{beam}) by

However, if either the beam or the PSF are not Gaussian, the convolution is not this simple. Suppose the PSF is still Gaussian but the X-ray beam profile is bimodal and, in effect, consists of two Gaussian ‘sub-beams’ with different

*w*
_{beam} and intensity. In this case the spot recorded on the detector is the sum of the two spots one would observe with either sub-beam alone, using (1)

to compute the FWHM of each ‘sub-spot’. This treatment can be extended to an arbitrary number of sub-beams, and theoretically any beam shape that can be ‘painted’ onto the detector face by using a variable Gaussian beam may be modeled with this formalism. In exactly the same way the spot profile resulting from a simple Gaussian beam and a non-Gaussian PSF may be expressed as a sum of Gaussians if a suitable Gaussian-sum approximation to the PSF can be found.

Two-dimensional Gaussians may not have equal FWHMs in both directions, and indeed the major and minor axes may be tilted relative to the Cartesian coordinate system of the pixel plane. So, in general, two-dimensional Gaussians are convoluted by summing the elements of their covariance matrices.

The power-law component of the PSF found here appears to be of order 3, which resembles the solid angle subtended by a pixel at a point source of light some distance

*g* above the pixel plane,

where

*x* and

*y* are the Cartesian coordinates of a point of interest relative to the beam impact point. The integral of

*P* over the entire pixel plane is unity, reflecting how the energy of a single photon is divided amongst the pixels, and

*P* may be thought of as having units of ‘intensity’ per unit area.

For comparison, the symmetric two-dimensional Gaussian with unit integral and unit FWHM is

We use

*G* to help represent the Gaussian component of the Moffat function,

which is still centrosymmetric and normalized to integrate to unity, but has FWHM

*w*
_{PSF} (µm). In turn, the X-ray beam may also be taken to have a Gaussian shape, but perhaps with different FWHM in the

*x* and

*y* directions (

*w*
_{beam,x} and

*w*
_{beam,y}),

Again the integral of

*I*
_{beam} over the entire pixel plane is unity, since it represents the probability distribution of photon impact points.

Since both

*M*
_{G} and

*I*
_{beam} are Gaussians, their convolution (

*M*
_{G} *I*
_{beam}) may be computed analytically using (1)

(see below), but the convolution

*P* *M*
_{G} cannot be expressed in closed form. We therefore approximate

*P* as the sum of a number of Gaussians,

where

*g* is still the height of the ‘point source’ over the pixel plane, and

*a*
_{i},

*b*
_{i} are obtained by a fit of (6)

to

*P* with the constraint that the sum of the volume of all

*n* Gaussian terms must be equal to 1. An example of such coefficients with

*n* = 8 is given in Table 1. Using these coefficients,

*P*
_{n} matches

*P* to within 2.5% error over the six-decade range of the data available here.

| **Table 1**Coefficients used to approximate *P* with *P*
_{n} when *n* = 8 |

Now, since addition and convolution commute,

*P*
_{n} *M*
_{G} may be expressed analytically as the sum of

*n* Gaussians, and used to approximate the full PSF (

*P* *M*
_{G}). Furthermore, the full intensity spread

*P* *M*
_{G} *I*
_{beam} may also be approximated with only

*n* Gaussians. Specifically, we take each term in

*P*
_{n} individually, and substitute the squared FWHM (

*g*
^{2}
*b*
_{i}
^{2}) with the sum of the squares of all the widths involved,

where

*w*
_{PSF} is the FWHM of the Gaussian component of the PSF,

*w*
_{beam,x} and

*w*
_{beam,y} are the FWHM of the beam in the

*x* and

*y* directions, and

*w*
_{i,x} is the FWHM of the

*i*th Gaussian term in the approximation of

*I*
_{point}, the intensity per unit area deposited by a photon at any point in the pixel plane,

If the beam shape is more complicated than a simple Gaussian, then it too may be represented as the sum of a collection of weighted Gaussian functions, much in the same way

*P* is approximated by

*P*
_{n}. That is, any beam profile may be represented as the sum of a collection of

*m* Gaussian-shaped sub-beams. Replacing each of these sub-beams with (8)

yields a total of

*nm* Gaussian terms, representing the observed spot shape on the detector. In this work, however, we restricted our representation to a simple Gaussian-shaped beam.

Now, since we find below that

*g* = 27 µm,

*w*
_{PSF} = 76 µm and the pixel size (

_{pix}) is 51.27 µm, we expect that the value of

*I*
_{point} will vary significantly from one side of a pixel to the other. Simply evaluating

*I*
_{point} at the center coordinate of the pixel will not be a faithful representation of the real detector behavior, which is to integrate

*I*
_{point} over the whole area of the spot. Algorithmically, this may be combated by dividing each pixel into many sub-pixels and averaging, but a much more elegant and computationally expedient approach is to take advantage of the analytic expression for the integral of a Gaussian over a square,

where erf is the Gauss error function, and

*w*
_{x},

*w*
_{y} are still the FWHM of ‘

*G*’, the Gaussian peak being integrated. The signal expected from a pixel is computed by taking the differences between the values of

*H* at the pixel corners,

where

_{pix} is the linear dimension of the edge of the square pixel (µm) and

*x* and

*y* are the Cartesian coordinates of the pixel center relative to the beam impact point. Note that as

_{pix} becomes large relative to

*w*
_{x} and

*w*
_{y} the value of

*G*
_{pix}(0,0) approaches unity, but as

_{pix} becomes small relative to

*w*
_{x} and

*w*
_{y} the value

*G*
_{pix}(

*x*,

*y*) approaches

*G*(

*x*,

*y*)

_{pix}
^{2}. We may now represent the fraction of the incident beam energy deposited into a given pixel (

*I*
_{pix}) by the convolution of a Gaussian beam shape with our Moffat function PSF integrated over a pixel centered at

*x*,

*y* relative to the beam center,

where

*a*
_{i} are taken from Table 1 and

*w*
_{i,x} are taken from

*b*
_{i} in Table 1

*via* (7)

. This function is represented by the brown lines in Fig. 2.