Xray Tomography

Xray Tomography#

In this example, we consider performing X-Ray Tomography (XRT) to image the interior of a structure. We assume that the x-rays travel at the same speed regardless of the medium through which they are passing, and so their paths are straight lines between source and receiver. However, the medium causes the x-rays to attenuate: paths through dense objects (such as bones!) arrive at the receiver with far less energy than they had at the source. Thus, by analysing the attenuation along many different paths, we can build up a picture of the interior of an object.

Specifically, we will assume that the intensity at the receiver, \(I_{rec}\), is related to the intensity at the source, \(I_{src}\) by \(I_{rec} = I_{src}\exp\left\{-\int_\mathrm{path} \mu(\mathbf{x})\,\mathrm{d}\mathbf{l}\right\}\)

where \(\mu(\mathbf{x})\) is a position-dependent attenuation coefficient. To obtain a linear inverse problem, we rewrite this as \(-\log \frac{I_{rec}}{I_{src}}=\int_\mathrm{path} \mu(\mathbf{x})\,\mathrm{d}\mathbf{l}\,.\)

We know that \(\int\left[f(x) + g(x)\right]\,\mathrm{d}x = \int f(x)\,\mathrm{d}x + \int g(x)\,\mathrm{d}x\)

so we say that integration is a linear operation, and hence we can solve the XRT problem with linear inverse theory.

We will assume that the object we are interested in is 2-dimensional, so that \(\mu(\boldsymbol{x}) = \mu(x,y)\). If we discretize this model, with \(N_x\) cells in the \(x\)-direction and \(N_y\) cells in the \(y\)-direction, we can express \(\mu(x,y)\) as an \(N_x \times N_y\) vector \(\boldsymbol{\mu}\). This is related to the data by \(d_i = A_{ij}\mu_j\)

where \(d_i = -\log {I^{(i)}_{rec}}/{I^{(i)}_{src}}\), and where \(A_{ij}\) represents the path length in cell \(j\) of the discretized model.

Contribution Metadata for X-ray Tomography

Author:

Andrew Valentine

Contact:

Andrew Valentine (andrew.valentine@durham.ac.uk)

Citation:

Tarantola, A., 2005. Inverse problem theory and methods for parameter estimation, Sec.5.6.

Example usage for XrayTomography#

Code block below is generated automatically based on our tests and inspection of the example objects. We’d like to also refer you to the API Reference for more about the Espresso API.

 1import espresso
 2
 3# Create a XrayTomography object
 4my_xray_tomography = espresso.XrayTomography(example_number=1)
 5
 6# Guaranteed API
 7model_size     = my_xray_tomography.model_size
 8data_size      = my_xray_tomography.data_size
 9null_model     = my_xray_tomography.starting_model
10good_model     = my_xray_tomography.good_model
11given_data     = my_xray_tomography.data
12synthetic_data = my_xray_tomography.forward(good_model)
13
14# Optional API
15example_desc       = my_xray_tomography.description
16model_fig          = my_xray_tomography.plot_model(good_model)

Additional attributes to explore: [list_capabilities].

LICENCE#

Copyright 2021-2022 The Contributors All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.