Skip to content

Commit b63942b

Browse files
committed
adding detailed documentation
1 parent bc2a5f4 commit b63942b

File tree

7 files changed

+93
-3
lines changed

7 files changed

+93
-3
lines changed
212 KB
Loading
214 KB
Loading
156 KB
Loading
45.4 KB
Loading
82 KB
Loading

docs/source/reference/methods_list/phase_contrast_methods.rst

Lines changed: 91 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,94 @@ When we record propagation-based phase contrast images (e.g., at a certain dista
1717
a mixture of absorption and phase effects. To reconstruct a clean 3D volume, we must separate phase from intensity.
1818
This process is called the phase retrieval. The Paganin method :cite:`Paganin02` provides a simple, robust way to do this.
1919

20-
:math:`n = (1 - \delta) + i \beta`
20+
The Paganin formula is the following, see eq.10 in :cite:`paganin2020boosting`:
21+
22+
.. math:: T(x,y) = - \frac{1}{\mu}\ln\left (\mathcal{F}^{-1}\left
23+
(\frac{\mathcal{F}\left [ I(x, y, z = \Delta) / I_{0} \right ]}{1 +
24+
\frac{\delta\Delta}{\mu}\left ( k_x^2 + k_y^2 \right )} \right )\right ),
25+
26+
where:
27+
28+
* :math:`I(x, y, z = \Delta)` - measured X-ray beam intensity at the propagation distance :math:`\Delta`.
29+
30+
* :math:`I_{0}` - measured X-ray beam intensity at the zero-distance from the X-ray source (incident beam).
31+
32+
* :math:`\Delta > 0` - propagation distance of the wavefront from sample to detector.
33+
34+
* :math:`\mu` - linear attenuation coefficient of the single-material object defined as :math:`\mu = 2k\beta`, where :math:`k=\frac{2\pi}{\lambda}` is the wave-number corresponding to the vacuum wavelength :math:`\lambda`.
35+
36+
* :math:`\delta` - the phase decrement, related to the phase shift of X-rays. It is the real part of the complex refractive index: :math:`n = (1 - \delta) + i \beta`.
37+
38+
* :math:`\beta` - the absorption index, related to the attenuation. It the complex part of the material refractive index: :math:`n = (1 - \delta) + i \beta`.
39+
40+
One can re-write the formula above as:
41+
42+
.. math:: T(x,y) = - \frac{1}{\mu}\ln\left (\mathcal{F}^{-1}\left
43+
(\frac{\mathcal{F}\left [ I(x, y, z = \Delta) / I_{0} \right ]}{1 +
44+
\alpha \left ( k_x^2 + k_y^2 \right )} \right )\right ),
45+
46+
where:
47+
48+
.. math:: \alpha = \frac{\lambda \Delta \delta}{4 \pi \beta}.
49+
50+
**Where and how to use it:**
51+
52+
Works well for single-material and relatively homogeneous or weakly heterogeneous samples (e.g., biological tissues, polymers, soft matter). The filter is particularly useful for weakly absorbing samples imaged with hard X-rays, where traditional absorption contrast is poor.
53+
54+
**What are the adjustable parameters:**
55+
56+
* :code:`input data` is the flat/dark normalised raw data before the negative log. Note that the :math:`-ln()` operation is the part of the Paganin filter.
57+
58+
* :code:`pixel_size` Detector pixel size (resolution) in MICRON units.
59+
60+
* :code:`distance` Propagation distance (:math:`\Delta`) of the wavefront from sample to detector in METRE units.
61+
62+
* :code:`energy` Incident beam energy in keV.
63+
64+
* :code:`ratio_delta_beta` The ratio of :math:`\frac{\delta}{\beta}` is a critical parameter as it defines how the algorithm balances phase contrast versus absorption contrast. Higher ratio values lead to stronger smoothing, more phase contrast recovered, but potential loss of edge sharpness. It is recommended to keep :math:`\frac{\delta}{\beta} > 250` for weakly absorbing materials (like biological tissue, polymers, and light materials). Lower values :math:`\frac{\delta}{\beta} << 250` lead to less smoothing, more edges preserved.
65+
66+
**Real data examples:**
67+
68+
In this section we will be applying Paganin filter to data obtained at Diamond Light Source I12 beamline (beamtime NT41036-2, PI: G. Burca).
69+
The sample is a set of fixed bovine liver sections in a centrifuge tube. This is a biological sample and a good candidate for Paganin filter demonstration.
70+
71+
We used :ref:`method_remove_all_stripe` to remove ring artifacts and :ref:`method_LPRec3d_tomobar` for reconstruction of the filtered projections.
72+
We also used the following parameters for Paganin filter, while varying only :code:`ratio_delta_beta`.
73+
74+
.. code-block:: yaml
75+
76+
pixel_size: 32.4 # microns
77+
distance: 3.2 # meters
78+
energy: 53.0 # KeV
79+
80+
.. list-table::
81+
82+
83+
* - .. figure:: ../../_static/figures/paganin/lprec_no_paganin.jpg
84+
:width: 335px
85+
86+
No Paganin filter applied. The reconstruction is too noisy and without any features.
87+
88+
- .. figure:: ../../_static/figures/paganin/paganin_10.jpg
89+
:width: 335px
90+
91+
Paganin filter with :math:`\frac{\delta}{\beta} = 10`. Some features are recongnisable, but the image is still too noisy.
92+
93+
94+
.. list-table::
95+
96+
97+
* - .. figure:: ../../_static/figures/paganin/paganin_100.jpg
98+
:width: 200px
99+
100+
Paganin filter with :math:`\frac{\delta}{\beta} = 100`. Still a bit noisy.
101+
102+
- .. figure:: ../../_static/figures/paganin/paganin_500.jpg
103+
:width: 200px
104+
105+
Paganin filter with :math:`\frac{\delta}{\beta} = 500`. Close to the optimal value.
106+
107+
- .. figure:: ../../_static/figures/paganin/paganin_2000.jpg
108+
:width: 200px
109+
110+
Paganin filter with :math:`\frac{\delta}{\beta} = 2000`. Oversmoothed.

httomolibgpu/prep/phase.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def paganin_filter(
5757
ratio_delta_beta: float = 250,
5858
) -> cp.ndarray:
5959
"""
60-
Perform single-material phase retrieval from flats/darks corrected tomographic measurements. See
61-
:cite:`Paganin02` and :cite:`paganin2020boosting` for references.
60+
Perform single-material phase retrieval from flats/darks corrected tomographic measurements. For more detailed information, see :ref:`phase_contrast_module`.
61+
Also see :cite:`Paganin02` and :cite:`paganin2020boosting` for references.
6262
6363
Parameters
6464
----------

0 commit comments

Comments
 (0)