Skip to main content

PyAbel README

https://travis-ci.org/PyAbel/PyAbel.svg?branch=master https://ci.appveyor.com/api/projects/status/g1rj5f0g7nohcuuo

Note: This readme is best viewed as part of the PyAbel Documentation.

Introduction

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.

PyAbel

Transform Methods

The outcome of the numerical Abel Transform depends on the exact method used. So far, PyAbel includes the following transform methods:

  1. basex - Gaussian basis set expansion of Dribinski and co-workers.

  2. hansenlaw - recursive method of Hansen and Law.

  3. direct - numerical integration of the analytical Abel transform equations.

  4. threepoint - the “three point” method of Dasch and co-workers.

  5. fh - Fourier–Hankel method (not yet implemented).

  6. onion - onion peeling method (not yet implemented).

  7. pop - polar onion peeling method (not yet implemented).

Installation

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.

With pip

The latest release can be installed from PyPi with

pip install PyAbel

With setuptools

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() function returns a Python dict object, where the 2D Abel transform is accessed through the 'transform' key.

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[0].imshow(forward_abel, clim=(0, np.max(forward_abel)*0.6), origin='lower', extent=(-1,1,-1,1))
axs[1].imshow(inverse_abel, clim=(0, np.max(inverse_abel)*0.4), origin='lower', extent=(-1,1,-1,1))

axs[0].set_title('Forward Abel Transform')
axs[1].set_title('Inverse Abel Transform')

plt.tight_layout()
plt.show()

Output:

example abel transform

Documentation

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.org.

Support

If you have a question or suggestion about PyAbel, the best way to contact the PyAbel Developers Team is to open a new issue.

Contributing

We welcome suggestions for improvement! Either open a new Issue or make a Pull Request.

Contributing.md has more information on how to contribute, such as how to run the unit tests and how to build the documentation.

License

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.

Citation

First and foremost, please cite the paper(s) corresponding to the implementation of the Abel Transform that you use in your work. The references can be found at the links above.

If you find PyAbel useful in you work, it would bring us great joy if you would cite the project. [DOI coming soon!]

Have fun!

Release files for PyAbel 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyAbel 0.7.1
File Size Uploaded
PyAbel-0.7.1.tar.gz 97.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyAbel 0.7.1
File Interpreter ABI Platform
PyAbel-0.7.1-cp27-cp27m-macosx_10_5_x86_64.whl CPython 2.7 CPython 2.7 pymalloc macOS 10.5+ x86-64 Details

Total release size: 251.8 kB

Release files / PyAbel-0.7.1.tar.gz

Download URL PyAbel-0.7.1.tar.gz
Size 97.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c7910eccc5fddf6e79ea2419f924ef820542b36349bca3c498160e570c20ebe4
BLAKE2b-256 checksum
How to use checksums
c00f67568446b476f470b25574657124915ab474284d3e5ba890384f5a84db4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / PyAbel-0.7.1-cp27-cp27m-macosx_10_5_x86_64.whl

Download URL PyAbel-0.7.1-cp27-cp27m-macosx_10_5_x86_64.whl
Size 154.1 kB
Tags CPython 2.7 CPython 2.7 pymalloc macOS 10.5+ x86-64
SHA-256 checksum
How to use checksums
00a39f8cc1e7ecd2318cfed9c13d9f32157e3276a450558b735cca0fb261dd5f
BLAKE2b-256 checksum
How to use checksums
efa11454d17aacaa22749da70c85a370d9e363f51fadffa88c544b5087981652
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page