Commit e0dcd577 authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Struggling with sphinx

parent bd18c7c0
.. toctree::
:maxdepth: 4
nabu.external package
Module contents
.. automodule:: nabu.external
nabu.imgproc package
Module contents
.. automodule:: nabu.imgproc
nabu.interfaces package
Module contents
.. automodule:: nabu.interfaces
......@@ -8,9 +8,6 @@ Subpackages
setup module
.. automodule:: setup
......@@ -77,7 +77,11 @@ def setup(app):
app.add_config_value('recommonmark_config', {
'url_resolver': lambda url: github_doc_root + url,
'auto_toc_tree_section': 'Contents',
'enable_math': True,
'enable_inline_math': True,
}, True)
# Document __init__
autoclass_content = 'both'
......@@ -12,11 +12,10 @@ Welcome to Nabu's documentation!
# Phase Retrieval
Phase Retrieval is the process of extracting the phase shift, induced by the sample on the beam, acquired on the detector. This phase shift is then used to reconstruct a map of the (deviation from unity of the real part of) refractive index through tomographic reconstruction.
Nabu implements the following non-iterative phase retrieval methods.
## Paganin phase retrieval
This phase retrieval method was first described in [[1]](#references).
The implementation [PaganinPhaseRetrieval](apidoc/nabu.preproc.html#nabu.preproc.phase.PaganinPhaseRetrieval) follows the normalization of [[2]](#references) and is compatible with the implementation of [tomopy](
## Single-Distance CTF phase retrieval
This method, although based on Contrast Transfer Function (CTF) rather than Transport of Intensity (TIE), can also be expressed as a single step "filtering" processing. See for example [[2]](#references).
## References
[1] D. Paganin Et Al, "Simultaneous phase and amplitude extraction from a single defocused image of a homogeneous object", Journal of Microscopy, Vol 206, Part 1, 2002
[2] Boliang Yu Et Al, "Evaluation of phase retrieval approaches in magnified X-ray phase nano computerized tomography applied to bone tissue," Opt. Express 26, 11110-11124 (2018)
\ No newline at end of file
......@@ -13,7 +13,7 @@ def lmicron_to_db(Lmicron, energy, distance):
to a value of delta/beta.
Lmicron: float
Length in microns, values of the parameter "PAGANIN_Lmicron"
in PyHST2 parameter file.
......@@ -22,13 +22,14 @@ def lmicron_to_db(Lmicron, energy, distance):
distance: float
Sample-detector distance in microns
The conversion is done using the formula
L^2 = \pi \lambda D \frac{\delta}{\beta}
L^2 = \\pi \\lambda D \\frac{\\delta}{\\beta}
The PyHST2 normalization differs from the one used by other softwares
like tomopy by a factor $1/(4\pi^2)$
......@@ -141,17 +142,19 @@ class PaganinPhaseRetrieval(object):
The radio is divided, in the Fourier domain, by the original
"Paganin filter" [1]
F + 1 + \frac{\delta}{\beta} \lambda D \rho |k|^2
where $k$ is the wave vector, computed as
k_l = \frac{1}{P} (\frac{-1}{2} + \frac{l}{N-1})
where $P$ is the pixel size, $N$ the number of pixels in one direction,
and $l \in [0, N-1]$.
The factor $\rho$ is either $\pi$ or $1/(4\pi^2)$
.. math::
F = 1 + \\frac{\\delta}{\\beta} \\lambda D \\rho |k|^2
where k is the wave vector, computed as
.. math::
k_l = \\frac{1}{P} (\\frac{-1}{2} + \\frac{l}{N-1})
where P is the pixel size, N the number of pixels in one direction,
and :math:`l \\in [0, N-1]`.
The factor :math:`\\rho` is either :math:`\\pi` or :math:`1/(4\\pi^2)`
depending on the convention (default is the former).
......@@ -42,8 +42,6 @@ def setup_package():
packages_folders = [
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment