e-champenois / CPBASEX

pBASEX Abel Transform Inversion without Polar Rebinning
MIT License
7 stars 7 forks source link

CPBASEX

pBASEX Abel Inversion without Polar Rebinning... in MATLAB and Python. A broader introductionto Abel inversion and the pBASEX algorithm is available in README.pdf.

Quick feature list:

Installation

For MATLAB, simply add CPBASEX/pbasex-MATLAB/ to the MATLAB path.

For Python, a pip installation is recommended. From the command line (perhaps using a virtual environment), simply install the PyPi CPBASEX distribution:

$ pip3 install pbasex

This will install the Python version as well as several dependencies:

Pre-installing Cython and H5Py will make the installation process much faster, as opposed to installation using pip dependencies:

$ pip3 install cython
$ pip3 install h5py
$ pip3 install pbasex

The dill is also required to parallelize the Abel transformed basis function sampling step:

$ pip3 install dill

Running the code

The pBASEX algorithm works in two steps. First, the Abel transformed basis functions must be sampled. Next, a least-squares fit inverts measured data. Sample code for the first (examples/save_gData.m, examples/save_gData.py) and the second (examples/sample_pbasex.m, examples/sample_pbasex.py) is available. The first step must only be run once, with the results being saved locally. The second step can be run with these results for any amount of new raw image data.

In save_gData, several key parameters that can be changed are:

In sample_pbasex, the steps required to fold an image and invert it are shown. Various forms of the result are also plotted. This requires the Matplotlib library, which can also easily be installed with pip:

$ pip3 install matplotlib

Code wish list