A Python package for forward and inverse Abel transforms
Note: This readme is best viewed as part of the PyAbel Documentation.
PyAbel is a Python package that provides functions for the forward and inverse Abel transforms. The forward Abel transform takes a slice of a cylindrically symmetric 3D object and provides the 2D projection of that object. The inverse abel transform takes a 2D projection and reconstructs a slice of the cylindrically symmetric 3D distribution.
Inverse Abel transforms play an important role in analyzing the projections of angle-resolved photoelectron/photoion spectra, plasma plumes, flames, and solar occultation.
PyAbel provides efficient implementations of several Abel transform algorithms, as well as related tools for centering images, symmetrizing images, and calculating properties such as the radial intensity distribution and the anisotropy parameters.
The outcome of the numerical Abel Transform depends on the exact method used. So far, PyAbel includes the following transform methods:
- basex - Gaussian basis set expansion of Dribinski and co-workers.
- hansenlaw - recursive method of Hansen and Law.
- direct - numerical integration of the analytical Abel transform equations.
- two_point - the “two point” method of Dasch and co-workers.
- three_point - the “three point” method of Dasch and co-workers.
- onion_peeling - the “onion peeling” deconvolution method of Dasch and co-workers.
- onion_bordas - “onion peeling” or “back projection” method of Bordas et al. based on the MatLab code by Rallis and Wells et al.
- linbasex - the 1D-spherical basis set expansion of Gerber et al.
- fh - Fourier–Hankel method (not yet implemented).
- pop - polar onion peeling method (not yet implemented).
PyAbel requires Python 2.7 or 3.3-3.5. Numpy and Scipy are also required, and Matplotlib is required to run the examples. If you don’t already have Python, we recommend an “all in one” Python package such as the Anaconda Python Distribution, which is available for free.
The latest release can be installed from PyPi with
pip install PyAbel
If you prefer the development version from GitHub, download it here, cd to the PyAbel directory, and use
python setup.py install
Or, if you wish to edit the PyAbel source code without re-installing each time
python setup.py develop
Example of use
Using PyAbel can be simple. The following Python code imports the PyAbel package, generates a sample image, performs a forward transform using the Hansen–Law method, and then a reverse transform using the Three Point method:
import abel original = abel.tools.analytical.sample_image() forward_abel = abel.Transform(original, direction='forward', method='hansenlaw').transform inverse_abel = abel.Transform(forward_abel, direction='inverse', method='three_point').transform
Note: the abel.Transform() class returns a Python class object, where the 2D Abel transform is accessed through the .transform attribute.
The results can then be plotted using Matplotlib:
import matplotlib.pyplot as plt import numpy as np fig, axs = plt.subplots(1, 2, figsize=(6, 4)) axs.imshow(forward_abel, clim=(0, np.max(forward_abel)*0.6), origin='lower', extent=(-1,1,-1,1)) axs.imshow(inverse_abel, clim=(0, np.max(inverse_abel)*0.4), origin='lower', extent=(-1,1,-1,1)) axs.set_title('Forward Abel Transform') axs.set_title('Inverse Abel Transform') plt.tight_layout() plt.show()
General information about the various Abel transforms available in PyAbel is available at the links above. The complete documentation for all of the methods in PyAbel is hosted at https://pyabel.readthedocs.io.
If you have a question or suggestion about PyAbel, the best way to contact the PyAbel Developers Team is to open a new issue.
We welcome suggestions for improvement, together with any interesting images that demonstrate application of PyAbel.
CONTRIBUTING.rst has more information on how to contribute, such as how to run the unit tests and how to build the documentation.
PyAble is licensed under the MIT license, so it can be used for pretty much whatever you want! Of course, it is provided “as is” with absolutely no warrenty.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|PyAbel-0.7.6-py3.4-linux-x86_64.egg (390.7 kB) Copy SHA256 Checksum SHA256||3.4||Egg||Jan 14, 2017|
|PyAbel-0.7.6-py3.5-linux-x86_64.egg (386.2 kB) Copy SHA256 Checksum SHA256||3.5||Egg||Jan 14, 2017|
|PyAbel-0.7.6.tar.gz (114.3 kB) Copy SHA256 Checksum SHA256||–||Source||Jan 14, 2017|