<commit_before>.. |nbsp| unicode:: 0xA0 
   :trim:

Hansen-Law
==========


Introduction
------------

The Hansen and Law transform is the work of <NAME> and <NAME> [1].

From the abstract:

*... new family of algorithms, principally for Abel inversion, that are 
recursive and hence computationally efficient. The methods are based on a 
linear, space-variant, state-variable model of the Abel transform. The modl 
is the basis for deterministic algorithms, applicable when data are noise free, 
and least-squares estimation (Kalman filter) algorithms, which accommodate 
the noisy data case.*

The key advantage of the algorithm is its computational simplicity that 
amounts to only a few lines of code. 



How it works
------------

.. figure:: https://cloud.githubusercontent.com/assets/10932229/13543157/c83d3796-e2bc-11e5-9210-12be6d24b8fc.png
   :width: 200px
   :alt: projection diag
   :align: right
   :figclass: align-center

   Projection geometry (Fig. 1 [1])

image function |nbsp|  :math:`f(r)`, |nbsp| projected function |nbsp|  :math:`g(R)`

forward Abel transform 

.. math:: g(R) = 2 \int_R^\infty \frac{f(r) r}{\sqrt{r^2 - R^2}} dr 

inverse Abel transform 

.. math:: f(r) = -\frac{1}{\pi}  \int_r^\infty \frac{g^\prime(R)}{\sqrt{R^2 - r^2}} dR



The Hansen and Law method makes use of a coordinate transformation, which is 
used to model the Abel transform, and derive *reconstruction* filters. The Abel
transform is treated as a system modeled by a set of linear differential 
equations. In this framework the forward Abel transform :math:`g(R)` is 
the solution of a differential equation with :math:`f(r)` as its driving 
function. Similarly, the Abel inversion :math:`f(r)` is a solution of a 
differential equation with :math:`g^\prime(R)` as its driving function. 

.. figure:: https://cloud.githubusercontent.com/assets/10932229/13544803/13bf0d0e-e2cf-11e5-97d5-bece1e61d904.png 
   :width: 350px
   :alt: recursion
   :align: right
   :figclass: align-center

   Recursion: pixel value from adjacent outer-pixel


forward transform

.. math:: 

  x_{n+1} &= \Phi_n x_n + \Gamma_n f_n 

  g_n &= \tilde{C} x_n

inverse transform

.. math:: 

  x_{n+1} &= \Phi_n x_n + \Gamma_n g^\prime_n 

  f_n &= \tilde{C} x_n


Note the only difference between the *forward* and *inverse* algorithms is 
the exchange of :math:`f_n` with :math:`g^\prime_n` (or :math:`g_n`).

|
|

:math:`\Phi_n` and :math:`\Gamma_n` are functions with predetermined 
parameter constants, all listed in [1].


The algorithm iterates along each individual row of the image, starting at 
the out edge, ending at the center-line. This provides for efficient code 
parallelization.



When to use it
--------------

The Hansen-Law algorithm offers one of the fastest, most robust methods for <commit_msg>hansenlaw.rst doc rephrase<commit_after>.. |nbsp| unicode:: 0xA0 
   :trim:

Hansen-Law
==========


Introduction
------------

The Hansen and Law transform is the work of <NAME> and P.-L. Law [1].

From the abstract:

*... new family of algorithms, principally for Abel inversion, that are 
recursive and hence computationally efficient. The methods are based on a 
linear, space-variant, state-variable model of the Abel transform. The modl 
is the basis for deterministic algorithms, applicable when data are noise free, 
and least-squares estimation (Kalman filter) algorithms, which accommodate 
the noisy data case.*

The key advantage of the algorithm is its computational simplicity that 
amounts to only a few lines of code. 



How it works
------------

.. figure:: https://cloud.githubusercontent.com/assets/10932229/13543157/c83d3796-e2bc-11e5-9210-12be6d24b8fc.png
   :width: 200px
   :alt: projection diag
   :align: right
   :figclass: align-center

   Projection geometry (Fig. 1 [1])

image function |nbsp|  :math:`f(r)`, |nbsp| projected function |nbsp|  :math:`g(R)`

forward Abel transform 

.. math:: g(R) = 2 \int_R^\infty \frac{f(r) r}{\sqrt{r^2 - R^2}} dr 

inverse Abel transform 

.. math:: f(r) = -\frac{1}{\pi}  \int_r^\infty \frac{g^\prime(R)}{\sqrt{R^2 - r^2}} dR



The Hansen and Law method makes use of a coordinate transformation, which is 
used to model the Abel transform, and derive *reconstruction* filters. The Abel
transform is treated as a system modeled by a set of linear differential 
equations. In this framework the forward Abel transform :math:`g(R)` is 
the solution of a differential equation with :math:`f(r)` as its driving 
function. Similarly, the Abel inversion :math:`f(r)` is a solution of a 
differential equation with :math:`g^\prime(R)` as its driving function. 

.. figure:: https://cloud.githubusercontent.com/assets/10932229/13544803/13bf0d0e-e2cf-11e5-97d5-bece1e61d904.png 
   :width: 350px
   :alt: recursion
   :align: right
   :figclass: align-center

   Recursion: pixel value from adjacent outer-pixel


forward transform

.. math:: 

  x_{n+1} &= \Phi_n x_n + \Gamma_n f_n 

  g_n &= \tilde{C} x_n

inverse transform

.. math:: 

  x_{n+1} &= \Phi_n x_n + \Gamma_n g^\prime_n 

  f_n &= \tilde{C} x_n


Note the only difference between the *forward* and *inverse* algorithms is 
the exchange of :math:`f_n` with :math:`g^\prime_n` (or :math:`g_n`).

|
|

:math:`\Phi_n` and :math:`\Gamma_n` are functions with predetermined 
parameter constants, all listed in [1].


The algorithm iterates along each individual row of the image, starting at 
the out edge, ending at the center-line. Since all rows in a column can be 
processed simultaneously, the operation can be easily vectorized and is 
therefore numerically efficient.



When to use it
--------------

The Hansen-Law algorithm offers one of the fastest, most robust methods for 
{'fraction_non_alphanumeric': 0.11934805467928496, 'fraction_numerical': 0.03119523308797757, 'mean_word_length': 3.6778688524590164, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '347278', 'n_tokens_mistral': 2002, 'n_tokens_neox': 1788, 'n_words': 688}