Skip to content

Commit bc2a5f4

Browse files
committed
adding initial documentation
1 parent f9dbc66 commit bc2a5f4

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

docs/source/reference/methods.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Here we present a list of methods of the HTTomolibGPU library with more detailed
1010

1111
methods_list/correction_methods
1212
methods_list/stripe_removal_methods
13+
methods_list/phase_contrast_methods
1314
methods_list/reconstruction_methods
1415
methods_list/denoising_methods
1516
methods_list/rescale_methods
16-
17-
17+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. _phase_contrast_module:
2+
3+
Phase-contrast enhancement
4+
**************************
5+
6+
Methods from the :mod:`httomolibgpu.prep.phase` module needed when the data requires phase contrast enhancement.
7+
8+
**Description**
9+
10+
In conventional X-ray tomography, image contrast comes mainly from absorption, i.e., how much a material attenuates X-rays.
11+
For some samples, especially biological, the absorption difference between structures can be insignificant and therefore the edge contrast
12+
can be lost. X-rays also undergo phase shifts when passing through materials with different refractive indices and
13+
these phase shifts carry valuable structural information that can be converted into contrast if properly reconstructed.
14+
15+
The phase contrast enhances edges and interfaces, revealing fine internal structure that pure absorption tomography would miss.
16+
When we record propagation-based phase contrast images (e.g., at a certain distance from the sample), the detected intensity includes
17+
a mixture of absorption and phase effects. To reconstruct a clean 3D volume, we must separate phase from intensity.
18+
This process is called the phase retrieval. The Paganin method :cite:`Paganin02` provides a simple, robust way to do this.
19+
20+
:math:`n = (1 - \delta) + i \beta`

httomolibgpu/prep/phase.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Created By : Tomography Team at DLS <[email protected]>
1919
# Created Date: 01 November 2022
2020
# ---------------------------------------------------------------------------
21-
"""Modules for phase retrieval and phase-contrast enhancement"""
21+
"""Modules for phase retrieval and phase-contrast enhancement. For more detailed information, see :ref:`phase_contrast_module`."""
2222

2323
import numpy as np
2424
from httomolibgpu import cupywrapper
@@ -48,7 +48,7 @@
4848

4949
# This implementation originated from the TomoPy version. It has been modified to conform
5050
# different unit standards and also control of the filter driven by 'delta/beta' ratio
51-
# as opposed to 'alpha' in the TomoPy implementation.
51+
# as opposed to 'alpha' in the TomoPy's implementation.
5252
def paganin_filter(
5353
tomo: cp.ndarray,
5454
pixel_size: float = 1.28,
@@ -71,7 +71,7 @@ def paganin_filter(
7171
energy : float
7272
Beam energy in keV.
7373
ratio_delta_beta : float
74-
The ratio of delta/beta, where delta is the phase shift and real part of the complex material refractive index :math:`n = (1 - \delta) + i \beta` and beta is the absorption.
74+
The ratio of delta/beta, where delta is the phase shift and real part of the complex material refractive index and beta is the absorption.
7575
7676
Returns
7777
-------

httomolibgpu/recon/algorithm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# Created By : Tomography Team at DLS <[email protected]>
1919
# Changes relative to ToMoBAR 2024.01 version
2020
# ---------------------------------------------------------------------------
21-
"""Module for tomographic reconstruction. For more detailed information see :ref:`image_reconstruction_module`"""
21+
"""Module for tomographic reconstruction. For more detailed information, see :ref:`image_reconstruction_module`"""
2222

2323
import numpy as np
2424
from httomolibgpu import cupywrapper

0 commit comments

Comments
 (0)