Monte Carlo simulation of X-ray imaging and spectroscopy experiments using quadric geometry and variance reduction techniques

Abstract The simulation of X-ray imaging experiments is often performed using deterministic codes, which can be relatively fast and easy to use. However, such codes are generally not suitable for the simulation of even slightly more complex experimental conditions, involving, for instance, first-order or higher-order scattering, X-ray fluorescence emissions, or more complex geometries, particularly for experiments that combine spatial resolution with spectral information. In such cases, simulations are often performed using codes based on the Monte Carlo method. In a simple Monte Carlo approach, the interaction position of an X-ray photon and the state of the photon after an interaction are obtained simply according to the theoretical probability distributions. This approach may be quite inefficient because the final channels of interest may include only a limited region of space or photons produced by a rare interaction, e.g., fluorescent emission from elements with very low concentrations. In the field of X-ray fluorescence spectroscopy, this problem has been solved by combining the Monte Carlo method with variance reduction techniques, which can reduce the computation time by several orders of magnitude. In this work, we present a C++ code for the general simulation of X-ray imaging and spectroscopy experiments, based on the application of the Monte Carlo method in combination with variance reduction techniques, with a description of sample geometry based on quadric surfaces. We describe the benefits of the object-oriented approach in terms of code maintenance, the flexibility of the program for the simulation of different experimental conditions and the possibility of easily adding new modules. Sample applications in the fields of X-ray imaging and X-ray spectroscopy are discussed. Program summary Program title: XRMC Catalogue identifier: AERO_v1_0 Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AERO_v1_0.html Program obtainable from: CPC Program Library, Queen’s University, Belfast, N. Ireland Licensing provisions: GNU General Public License version 3 No. of lines in distributed program, including test data, etc.: 83617 No. of bytes in distributed program, including test data, etc.: 1038160 Distribution format: tar.gz Programming language: C++. Computer: Tested on several PCs and on Mac. Operating system: Linux, Mac OS X, Windows (native and cygwin). RAM: It is dependent on the input data but usually between 1 and 10 MB. Classification: 2.5, 21.1. External routines: XrayLib ( https://github.com/tschoonj/xraylib/wiki ) Nature of problem: Simulation of a wide range of X-ray imaging and spectroscopy experiments using different types of sources and detectors. Solution method: XRMC is a versatile program that is useful for the simulation of a wide range of X-ray imaging and spectroscopy experiments. It enables the simulation of monochromatic and polychromatic X-ray sources, with unpolarised or partially/completely polarised radiation. Single-element detectors as well as two-dimensional pixel detectors can be used in the simulations, with several acquisition options. In the current version of the program, the sample is modelled by combining convex three-dimensional objects demarcated by quadric surfaces, such as planes, ellipsoids and cylinders. The Monte Carlo approach makes XRMC able to accurately simulate X-ray photon transport and interactions with matter up to any order of interaction. The differential cross-sections and all other quantities related to the interaction processes (photoelectric absorption, fluorescence emission, elastic and inelastic scattering) are computed using the xraylib software library, which is currently the most complete and up-to-date software library for X-ray parameters. The use of variance reduction techniques makes XRMC able to reduce the simulation time by several orders of magnitude compared to other general-purpose Monte Carlo simulation programs. Running time: It is dependent on the complexity of the simulation. For the examples distributed with the code, it ranges from less than 1 s to a few minutes.

[1]  A Bravin,et al.  Compact x-ray sources for mammographic applications: Monte Carlo simulations of image quality. , 2009, Medical physics.

[2]  Piernicola Oliva,et al.  Quantitative evaluation of single-shot inline phase contrast imaging using an inverse compton x-ray source , 2010 .

[3]  Tom Schoonjans,et al.  A general Monte Carlo simulation of energy dispersive X-ray fluorescence spectrometers — Part 5 Polarized radiation, stratified samples, cascade effects, M-lines , 2012 .

[4]  Piernicola Oliva,et al.  Advantages of quasi-monochromatic X-ray sources in absorption mammography , 2009 .

[5]  Antonio Brunetti,et al.  An X-ray Diffraction (XRD) and X-ray Fluorescence (XRF) investigation in human and animal fossil bones from Holocene to Middle Triassic , 2009 .

[6]  Koen Janssens,et al.  A general Monte Carlo simulation of energy-dispersive X-ray fluorescence spectrometers. Part 3. Polarized polychromatic radiation, homogeneous samples , 1995 .

[7]  Carter,et al.  Present and future capabilities of MCNP , 2000, Applied radiation and isotopes : including data, instrumentation and methods for use in agriculture, industry and medicine.

[8]  Bruno Golosio,et al.  The xraylib library for X-ray-matter interactions. Recent developments , 2011 .

[9]  M. Carpinelli,et al.  Visibility of tumor-like details in inline phase contrast mammography using quasimonochromatic X-ray sources , 2009 .

[10]  M. Carpinelli,et al.  Phase contrast imaging simulation and measurements using polychromatic sources with small source-object distances , 2008 .

[11]  Antonio Brunetti,et al.  Is X-ray diffraction able to distinguish between animal and human bones? , 2013 .

[12]  Koen Janssens,et al.  Monte Carlo simulation of X-ray fluorescence spectra: Part 4. Photon scattering at high X-ray energies , 1999 .

[13]  Koen Janssens,et al.  A general Monte Carlo simulation of ED-XRF spectrometers. II: Polarized monochromatic radiation, homogeneous samples , 1995 .

[14]  Antonio Brunetti,et al.  A multi-technique approach by XRD, XRF, FT-IR to characterize the diagenesis of dinosaur bones from Spain , 2011 .

[15]  Josep Sempau,et al.  Monte Carlo simulation of X‐ray emission using the general‐purpose code PENELOPE , 2005 .

[16]  Piernicola Oliva,et al.  Start-to-end simulation of a Thomson source for mammography , 2010 .

[17]  Alexandre Simionovici,et al.  A library for X-ray-matter interaction cross sections for X-ray fluorescence applications , 2004 .

[18]  Piernicola Oliva,et al.  Effect of different spectral distributions to image a contrast detail phantom in the mammography energy range , 2006 .

[19]  Piernicola Oliva,et al.  Voxel-based Monte Carlo simulation of X-ray imaging and spectroscopy experiments , 2004 .

[20]  Freddy C. Adams,et al.  A general Monte Carlo simulation of energy-dispersive X-ray fluorescence spectrometers—I: Unpolarized radiation, homogeneous samples , 1993 .

[21]  Piernicola Oliva,et al.  Measurement of an inverse Compton scattering source local spectrum using k-edge filters , 2012 .