miniPixD: a compact sample analysis system which combines X-ray imaging and diffraction

This paper introduces miniPixD: a new, compact system that utilises transmission X-ray imaging and X-ray diffraction (XRD) to locate and identify materials of interest within an otherwise opaque volume. The system and the embodied techniques have utility in security screening, medical diagnostics, non-destructive testing (NDT) and quality assurance (QA). This paper outlines the design of the system including discussion on the choice of components and presents some data from relevant samples which are compared to other energy dispersive and angular dispersive XRD techniques.


Introduction
Transmission X-ray imaging is the mainstay of non-invasive interrogation of 3D volumes and is used in many fields including medical diagnostics, material and drug discovery, security screening, non-destructive testing (NDT) and quality assurance (QA). A conventional X-ray image is the projection of 3D information onto a 2D plane, making cluttered scenes (those containing many overlapping items) particularly difficult to interpret. Tomographic techniques can be applied to a series of projections in order to recover volumetric/spatial information but this is at the expense of measurement speed. In both cases the only material information that can be obtained relates to the attenuation properties of the objects (e.g. density and effective atomic number). In many applications, being able to identify the material(s) within a 3D volume would significantly enhance sample interpretation; making diagnosis and/or decision making easier. X-ray diffraction (XRD) can be used for this purpose.
XRD is a technique which can be used to calculate the atomic or molecular structure of a material by measuring X-ray scattering profiles. This makes XRD a valuable tool in analytical science and material discovery for understanding physical properties in the context of atomic structure. Since -1 -all materials have a unique atomic arrangement, the scattering profile is a 'fingerprint' which can be used to identify unknowns against a library of standards. Examples of this can be found in fields as diverse as cancer diagnostics [1], archaeological studies [2] and detection of illicit drugs [3]. Furthermore, the penetrating power of X-rays allows diffraction signatures to be obtained through a barrier, enabling the interrogation and identification of materials inside an otherwise opaque volume (e.g. items within baggage or sealed packaging).
These two techniques are combined to provide a new capability called Image Guided X-ray Diffraction (IGXRD). In IGXRD the user is able to examine the sample being investigated though transmission X-ray images which are intuitive to understand and familiar to most people in clinical, security and laboratory situations. The use of XRD adds a second tier of analysis which can be used to assist interpretation. This paper presents a new instrument, miniPixD, which was developed to demonstrate the utility of IGXRD for different applications in a compact and deployable form factor. The specification of the instrument and components are detailed below.
Some compact systems which offer XRD capabilities are available in the marketplace including examples from manufactures such as Olympus (TERRA Portable XRD and BTX II Benchtop XRD), Bruker (D2 PHASER) and Rigaku (MiniFlex). However, these portable/benchtop instruments are for analytical studies and require samples to be prepared in a specific sample holder. The novel aspect of miniPixD is that it does not require any special sample preparation and non-invasive analysis is possible thanks to the combined approach of IGXRD.

Background
Diffraction occurs when X-rays are coherently and elastically scattered from different atomic/ molecular layers within a material which are separated by a distance (d). Scattered X-rays of a given wavelength (λ) constructively interfere at certain angles (2θ) giving rise to intense cones of radiation where Bragg's Law (eq. (2.1)) is satisfied.
Traditionally, XRD is measured by one of two methods: angular dispersive X-ray diffraction (ADXRD) or energy dispersive X-ray diffraction (EDXRD). ADXRD is performed by measuring the scattered intensity of monoenergetic X-rays as a function of angle. This method gives very high angular resolution, but requires precise alignment and coordinated motion of the source, sample and detector. EDXRD measures diffraction using a wide range of energies with a fixed scattering angle using an energy dispersive detector. This method has the advantage of utilising more of the X-ray flux from the source, but strict collimation of the scattered X-ray beam can lead to a drop in measured X-ray flux. Both methods are difficult to deploy in-the-field, particularly where robustness and speed are pertinent factors. The system described here utilises the novel PixD technique which has been proven to be highly effective for the identification of drugs and explosives [4,5]. The geometry of the PixD setup was designed to simultaneously combine the advantages of ADXRD and EDXRD using a multi-element (pixellated), energy dispersive HEXITEC detector developed at the STFC Rutherford Appleton Laboratory (RAL) [6]. Each pixel of the sensor generates an individual energy spectrum, and since the pixels provide spatial/angular resolution, the diffraction system can remain static. The -2 -value of 2θ at which diffraction occurs for a particular d-spacing is dependent on the incident X-ray energy: as this energy is increased, the scattering angle decreases. A number of diffraction cones can occur due to coherent scatter from different atomic/molecular planes in a material. The detector is positioned such that these cones are seen as portions of rings. Since the source-sample-detector geometry is known, each pixel has a well-defined scattering angle and the energy (E ∝ λ −1 ) spectrum obtained for each pixel can be represented on a common momentum transfer (x) axis defined by eq. (2.2), where the product hc = 1.24 keV nm in convenient units.
In this way, the information from every pixel can be summed together to give a single diffraction pattern for the material which is comparable with other XRD methods. This analysis procedure proves particularly useful for rapid analysis, where each individual pixel records a very low number of events.
It should be noted that some definitions of momentum transfer have a multiplying factor of 4π although this has been neglected here in the definition of x in eq. (2.2). It can be seen that for a particular value of x, d can be calculated by eq. (2.3).

miniPixD instrument and component details
miniPixD is a multi-component system which was designed and built to demonstrate the IGXRD capability. A schematic diagram of the assembled system is shown in figure 1 and this section describes the component choices in detail.

X-ray source
A compact ST9001 X-ray generator (SenTek Corp., U.S.A.) was used for both imaging and diffraction. The ST9001 has user variable operating voltage and current up to a maximum of 80 kV and 2.0 mA respectively. The ST9001 has a water cooled tungsten anode and filtration was provided by a 120 µm beryllium emission window only. The tube has a nominal focal spot of 0.2 mm. A safety interlock loop was used to safeguard against accidental exposure and X-ray on/off was controlled by external switches. The tube was operated at 72 kV and 0.7 mA in order to avoid stressing the power supply and cooling capacity.
The primary X-ray beam was collimated using a lead mask (2 mm thick), to provide two sources of radiation. A schematic of the mask is shown in figure 2. The mask was placed 37 mm from the focal spot and had a 0.6 mm pinhole to shape the beam in to a narrow pencil beam for diffraction measurements and a 1 mm × 20 mm slot to produce a fan beam for transmission imaging. The pencil beam was further refined by a secondary 0.6 mm pinhole in a lead sheet (2 mm thick) positioned 235 mm downstream from the primary mask.

Transmission imaging detector
Transmission images were obtained using a linear strip detector array. Three X-Card 1.5-64DE modules were 'daisy-chained' together and coupled to an X-DAQ board for data acquisition (Detection Technology, Finland). The X-Card modules have 64 high and low energy pixels with a pitch of 1.5 mm. Each pixel consisted of a scintillating layer bonded to a photodiode which was read out by a multiplexer application specific integrated circuit (ASIC). The low energy scintillator was 0.3 mm gadolinium oxysulfide (Gadox) while the high energy scintillator was 4.0 mm of thallium doped caesium iodide (CsI(Tl)). High energy filtration was achieved via a 0.6 mm copper filter between the low and high energy pixels. The combined active length of the array was 290.4 mm.
Image detector normalisation was conducted using the manufacturer supplied X-View 5.3 software (Detection Technology, Finland). The process involved adjusting the X-ray tube to suitable operating parameters and setting the detector acquisition time. The software automatically determined pixel normalisation factors based on a dark field and flat field image. The normalisation factors were saved in the flash memory to the X-DAQ and were applied to all data thereafter. Typically the X-ray source operating parameters (kV and mA) are adjusted to give optimal imaging performance, however, since the source was being used for both imaging and diffraction, the operating parameters were optimised for the diffraction process.
The use of a 2D pixellated imaging sensor would have yielded better quality images and reduced the image acquisition time, typically having small pixels (around 100 µm) and large collection areas (100s mm in the imaging plane). A strip detector was chosen for the miniPixD system in order to maintain a compact footprint and to fit with the allocated budget.

Diffraction detector
The HEXITEC pixellated, energy dispersive detector was used to collect the diffraction data. The active sensor material is a single cadmium telluride (CdTe) crystal, measuring 20 × 20 × 1 mm, bump bonded on to an ASIC which gives 80 × 80 pixels with a 250 µm pitch. The CdTe crystal was maintained at 12°C by means of a Peltier cooling module. During a measurement the CdTe crystal was subjected to a bias voltage of −475 V which was cycled every 60 s to avoid polarisation and degraded sensor performance. A greater bias could not be applied since electrical breakdown along the edge of the detector and high leakage currents (which introduce noise into the electronics of the ASIC) would start to occur. The detector bias voltage was provided by a compact HV supply (aSpect Systems, Germany) which was controlled via a serial interface. The interface allowed the voltage and current limits to be set as well as providing commands to remotely enable and disable the HV output.
Energy calibration was carried out on a pixel-by-pixel basis. The whole sensor was exposed to an americium test source (Am-241) to gain a spectrum with 7.5 × 10 4 counts per pixel on average. The major peaks at 13.9, 17.8, 20.8 and 59.5 keV were identified in the raw ADU spectrum and the linear fit coefficients (to convert ADU to energy) were determined for each pixel. In all subsequent measurements, energy conversion was carried out by the HEXITEC data acquisition software based on the fit coefficients.
To estimate the intrinsic energy resolution of the detector a Gaussian function was fitted to the 59.5 keV peak and the FWHM value was determined. Figure 3a shows the histogram of the spread -5 -

JINST 12 P02001
in FWHM values for all pixels. It can be seen that the distribution is positively skewed with the peak being at around 1.6 keV. The histogram shape is in agreement with other authors [6,7], however, the modal FWHM value reported here is marginally higher, due to the age of this detector and manufacturing variations between prototypes. 90% of pixels have a FWHM smaller than 1.9 keV. Figure 3b shows the spatial distribution of the FWHM values across the detector. Non-responsive (dead) pixels are shown in dark blue and account for 1.8% of the total (113 out of 6400). These pixels were discounted from all analysis. Figure 3c shows the energy spectrum obtained for all pixels summed together. The major peak at 59.5 keV is the characteristic emission line due to the americium decay process. The low energy tail of the 59.5 keV peak (down to about 54 keV) is due to a combination of charge trapping and charge sharing where the low energy contribution falls below the low energy threshold of the detector [6] (5 keV in this case).
Incident photons with energy above the K-edge of Cd (26.7 keV) or Te (31.8 keV) undergo photoelectric interactions, leaving the Cd and Te atoms in an excited state. Upon relaxation, characteristic Kα and K β photons are emitted which, depending on the direction, may move into neighbouring pixels or leave the sensor completely. These escaped photons have a mean free path in CdTe sufficient to travel beyond the nearest neighbour pixels [8] and would not be identified by the charge sharing correction used. The energy recorded in the primary pixel is equal to the energy of the incident photon less the K-edge absorption energy. This downshifting is another mechanism which spreads counts towards lower energies. This effect can be seen in figure 3c where the 59.5 keV Am-241 decay photons give rise to escape peaks and characteristic Kα and K β peaks in the region of 23-37 keV [7].
The other prominent peaks present in the spectrum at 13.9, 17.8 and 20.8 keV are due to neptunium decay (americium daughter product). The dashed line in figure 3c is the Gaussian fit to the 59.5 keV peak and the detector energy resolution (FWHM) was measured to be 1.6 keV in agreement with the distribution in figure 3a.

Sample position system
Sample positioning was provided by two OSPE25 linear stages (Parker-Origa, Germany) that could move in the plane perpendicular to the primary beam direction, having travel of 330 mm and 200 mm in horizontal and vertical directions respectively. Hybrid stepper motors with EZHR23 high resolution controllers (AllMotion, U.S.A.) were used for accurate positioning on each axis of motion. NEMA23 high torque hybrid stepper motors (SY57STH76-1006MA, Micromech Ltd., U.K.) were used to drive each axis. The EZHR23 controllers accepted commands through a standard serial interface. The controllers were driven via Matlab (The MathWorks, U.S.A.) using a driver class supplied by AllMotion.

Instrument control hardware and software
miniPixD is controlled by a small form factor PC mounted within the system. The specification of the PC was necessitated by the demands of the HEXITEC data acquisition. All system components were integrated into a single control interface written in Matlab. The user could initiate imaging and sample positioning in one application. The user could also pick points on the image where -6 - XRD data should be taken and the motion control automatically aligned the desired point with the diffraction X-ray beam. HEXITEC data acquisition was not integrated into the control interface, instead a detector specific piece of software was used. However, JavaScript code was developed to make data collection simple and consistent.

Cooling
The X-ray source and control PC CPU were cooled by means of a closed loop system. A 410 ml capacity reservoir/pump combination (D5 Photon 170, Overclockers U.K. Ltd., U.K.) was used to circulate a water based coolant. A radiator was connected in the loop and two 120 mm PC fans were used to force air though the cooling fins.

Power supply units (PSUs)
DC voltage lines were provided by two compact AQF600 series PSUs (ALL PSU Ltd., U.K.). The 12 V (540 W) PSU suppled power to the cooling pump, HV supply, X-DAQ and HEXITEC, while the 24 V (600 W) PSU suppled power to the X-ray source, external warning lights and the EZHR23 controller to drive the stepper motors. The control PC and the Peltier cooler controller had independent power supplies.

PixD alignment
In order for the PixD technique to work successfully, two parameters must be determined: a) the position of the pencil beam centre relative the HEXITEC detector pixels and b) the distance between the sample and the detector. These two parameters are used to assign each pixel a unique scattering angle in order to convert the energy spectrum to momentum transfer via eq. (2.2). Momentum transfer is a common axis for all pixels such that counts across the whole detector can be summed together.
If the beam centre is well-defined but the sample-detector distance is incorrect, then upon processing an arbitrary data set, the peaks will be narrow but in the wrong positions. In the opposite case, the peaks will have the correct mean positons but will be blurred. It is typical that these parameters are determined together through iterative adjustment using a standard (wellcharacterised) material to reach optimal settings.
In order to maximise the angular (and momentum transfer) range accessible by the PixD technique, the beam centre is placed just off one corner of the detector and only one quarter of the whole diffraction profile is measured. The geometry of miniPixD enables HEXITEC to cover an angular range between 0.1°and 11.2°.

Image registration
A key aspect of the miniPixD instrument is to provide the user with an image-guided approach to material identification. In order to achieve this, it is necessary to correlate the image output to the position of the XRD beam. A simple phantom was constructed consisting of a 3 mm sheet of acrylic with small (<2 mm) X-ray absorbing spheres randomly placed across the surface. The phantom was placed on the sample stage and a transmission image was collected. The stage was moved by 1.2 mm between consecutive lines in the image (less than the detector pixel pitch) in order to account for magnification due to the sample and detector being placed at 390 mm and 470 mm respectively from the X-ray focal spot. A small sheet of X-ray fluorescent screen (Lanex Min-R, Kodak, U.S.A.) was positioned so that the diffraction beam could be observed in real-time using -8 -

JINST 12 P02001
a scientific camera (Dragonfly Express, Point Grey Research Inc., Canada). For each sphere, the location in the image was recorded and then the position of the stage was manually adjusted until the sphere was aligned with the diffraction beam. Proper alignment was achieved when a drop in intensity of the light emitted by the intensifier screen was observed. The positions of the sphere in the image and the positions of the stage when aligned was recorded for each sphere and a linear calibration relationship was calculated for the horizontal and vertical axes.

Performance with standard materials
In order to assess the imaging and diffraction performance offered by miniPixD a phantom was constructed as shown in figure 4a. The phantom consisted of a laser cut sheet of 3 mm acrylic with a series 11 mm diameter holes cut out. The holes were filled with materials of known composition, summarised in table 1. The materials were held in place with a layer of Mylar film (VWR International, 710-0149, 6.3 µm) on the front and back faces of the phantom. The phantom was mounted on the sample stage and a transmission X-ray image was captured (using the low energy pixels only) as shown in figure 4b. All images were collected for approximately 0.5 s per line which includes detector integration time, reading the detector data to computer memory and moving the sample to the next position. Figure 4b was acquired in less than 40 s. The highly attenuating object in the bottom right of figure 4b is an aluminium bracket used to hold the phantom in place. XRD data were collected for each of the phantom materials (using the PixD method) at a point selected from the transmission image (roughly at the centre of each). The data presented here were collected for 1800 s, however one of the advantages of miniPixD is to be able to operate with shorter acquisition times due to the collecting area offered by the HEXITEC sensor. Figure 5 compares the pre-corrected spectrum of caffeine for 150 and 1800 s acquisitions. It is apparent that all the main features are present in the short acquisition with a higher level of noise being observed at -9 - higher momentum transfer values. This can be explained in terms of the system geometry and the available X-ray flux. The number of pixels at scattering angles greater than ∼8°decrease due to the size of the detector and the number of photons at higher energy decreases due to the shape of the X-ray tube spectrum. The combined effect is that the number of counts tail off towards higher momentum transfer values which is accompanied by an increase in statistical noise.
The acquisition time could be reduced further with the use of an X-ray source with higher output, however there are some limitations imposed by the HEXITEC detector. At maximum the detector can operate with a frame rate of up to 9 kHz. The ASIC outputs the maximum energy recorded on every pixel in every frame but it is best to operate the detector with less than 10% of 6400 pixel detecting an event in each frame so that charge sharing events can be properly identified. This puts a practical limitation on the count rate of ∼5 × 10 6 photons s −1 . The count rate in the miniPixD system comes from the available flux from the compact X-ray source.
The energy spectrum of each pixel was normalised to the X-ray tube spectrum and the counts from each pixel were summed together in momentum transfer space. Since the data were collected over a large area, some scattering angles, and therefore momentum transfer values, were represented more than others. The diffraction patterns were further normalised to account for this. The pattern collected for position 4 in the phantom was used as a background and was subtracted from the other data after having an attenuation correction applied. Attenuation factors were taken from the photon interaction database at the National Institute of Standards and Technology (NIST). Other corrections (e.g. for Compton scattering and the atomic form factor) to put the magnitude of the diffraction profiles on an absolute scale have not been applied since there is only interest in comparing the positions and shapes of diffraction features with respect to database values and other diffraction techniques. The resulting spectra are shown in figure 6 (solid lines). The major peaks in the measured spectra are compared to database and previously published data [9]- [12].
The database values are given as singular 2θ and intensity pairs. The 2θ values were converted to momentum transfer via eq. (2.2) and are represented in figure 6 as stems. To more accurately match the collected data, Gaussians were calculated at each database position and then summed together. The summation is also shown in figure 6 (dashed lines). The Gaussian position and magnitude was -10 - defined by the database values and the width was determined empirically by matching the peak width in the experimental data, however, a linear relationship was imposed between peak width and peak position (in momentum transfer space).
It can be seen from figure 6 that caffeine, cellulose, aluminium, PTFE and nylon have only a few major peaks which contribute to the scattering profile, whereas sodium bicarbonate and aspirin are significantly more complex, being composed of many peaks of similar magnitude across a wide range of momentum transfer. In all cases the experimental data are well represented by the database and broadened profiles.

Comparison with other XRD techniques
To compare miniPixD with ADXRD and EDXRD methods, caffeine and aspirin samples were measured on different systems. ADXRD data were collected using Debye-Scherrer (transmission) geometry on a STOE STADI P diffractometer (STOE & Cie GmbH, Germany). A conventional Xray source with a Cu anode (operated at 40 kV and 30 mA) was used. Cu KαI radiation (8.0478 keV) was selected using a curved Ge(111) monochromator. The scattered radiation intensity was mea--11 - EDXRD data were collected on a laboratory setup consisting of a conventional tungsten anode X-ray source (operated at 80 kV and 2.0 mA), an electrically cooled high-purity germanium (HPGe) detector and brass pinhole collimators on the source and detector to define a nominal fixed scattering angle of 5.5° [13]. The samples were placed at the centre of the scattering volume and data were collected for 300 s. Figure 7 shows a comparison between the diffraction patterns obtained by ADXRD, PixD and EDXRD for caffeine and aspirin. In both cases ADXRD shows a series of well resolved diffraction features while the EDXRD and PixD spectral features are broader. This can be explained in terms -12 -of the resolution of each system. In ADXRD, the use of a near-monochromatic X-ray beam means that the spectral resolution is dependent of the angular resolution that can be achieved by the system. The angular resolution comes directly from the detector acceptance angle (i.e. the ranges of angles that the detector can 'see' at a given nominal angular position) and is defined simply by the size of the active part of the detector and its distance from the scattering sample. For the ADXRD system used here, the angular resolution (as quoted by the manufacturer) was better than 0.03°. For the EDXRD system, the range of scattering angles that the detector can see is governed by the size and shape of the scattering volume which is defined by the intersection of the primary beam and the field of view through the detector collimator. Smaller collimator apertures equate to better angular resolution but at the expense of flux/measurement time. The angular resolution of the EDXRD setup used here was calculated (by simple geometry) to be~1.7°. The miniPixD system is uncollimated on the detector side, relying on the small pixels of the HEXITEC detector to offer suitable spatial resolution [4]. Since the uncollimated detector receives scattered photons from every point where the primary beam intersects the sample, the range of angles that each pixel can see depends on the size of the primary beam and the sample thickness. The angular resolution was calculated to be~0.5°based on the well-defined geometry of the miniPixD system. The shape of the diffraction profiles collected by EDXRD and miniPixD are also dependent on the energy resolution of the respective detectors. Consider the EDXRD system having a fixed nominal scattering angle of 5.5°, angular resolution of 1.7°and energy resolution of 0.8 keV (typical for HPGe). For 35 keV photons the nominal momentum transfer value is 2.71 nm −1 . The contribution to the resolution in momentum transfer is 0.83 nm −1 due to angular uncertainty and 0.06 nm −1 due energy resolution. As such, the influence of energy resolution is negligible compared to the influence of the angular resolution on the diffraction profile.
It can be seen from figure 6 and figure 7 that peaks in miniPixD data have a distinctive tail towards low momentum transfer values. This is associated with the charge sharing and charge trapping characteristics of the HEXITEC detector as mentioned previously [6]. For caffeine (figure 7a), the ADXRD spectrum demonstrates a series of peaks which form two groups centred at around 0.7 and 1.5 nm −1 . These two groups are reflected in the EDXRD and PixD spectra as two major peaks. In both cases the size and shape of the broad peaks compare well with the distribution of peaks as found by ADXRD. The aspirin spectrum (figure 7b) is composed of a greater number of peaks which are more evenly spread across the range of momentum transfer. Again there is good agreement between the ADXRD and the other techniques in terms of spectral shape and peak positions.
To compare miniPixD with conventional EDXRD, the major peaks of caffeine were fitted with Gaussian functions and the width parameter was used as a measure of spectral resolution. The results of the fitting are shown in table 2. miniPixD demonstrates marginally better spectral resolution, particularly for the peak at higher momentum transfer.

Utility and limitations
Conventional screening systems based on X-ray imaging may be able to identify objects based on size, shape and attenuation properties but have no ability to precisely identify materials. A screening system based on XRD alone would have the capability to provide data which contains material specific information but, without the situational context provided by imaging, its utility -13 -  would be limited. The miniPixD system incorporates both of these modalities and has been designed for the screening of small mail items (e.g. envelopes and packets), personal items (e.g. small bags and wallets) and drug containers (e.g. blister packs or bottles). As previously mentioned, a known limitation of the PixD method is related to sample thickness. The analysis algorithm relies on each pixel having a single, fixed scattering angle. While the sample remains thin, the range of scattering angles accessible to each pixel is small and detrimental effects are negligible. However, as the sample becomes thicker, each pixel can see a wider range of scattering angles which causes the diffraction profile to become blurred since the recorded pattern is the sum of many identical but slightly shifted diffraction patterns. Furthermore, realistic targets may be composed of layers of different material which could have a negative effect on the fidelity -14 -of the diffraction pattern measured, both due to the presence of overlapping materials and beam hardening due to sample attenuation. These limitations hamper the utility of PixD in situations where samples of thicker dimensions and/or complex structure (e.g. baggage) are to be investigated. However, methods to overcome these limitations include directional collimation to restrict the range of scattering angles accessible to each pixel and coded aperture techniques [14] which can be used to deconvolve positional information in post processing.

Conclusions
miniPixD is a compact instrument which has been designed to demonstrate image guided X-ray diffraction (IGXRD), for material analysis and identification. miniPixD employs a hybrid approach to collecting X-ray diffraction data which has been compared to conventional ADXRD and EDXRD methods. While ADXRD provides superior data, miniPixD outperformed conventional EDXRD in terms of spectral resolution, particularly for peaks towards high momentum transfer. Diffraction data for various materials have been collected and compared to database and previously published values. There is good agreement, with the magnitude and position of spectral features well reproduced in the miniPixD data.