Skip to main content

Python implementation of fast azimuthal integration

Project description

Main development website: https://github.com/silx-kit/pyFAI

Build Status Appveyor Status

pyFAI is an azimuthal integration library that tries to be fast (as fast as C and even more using OpenCL and GPU). It is based on histogramming of the 2theta/Q positions of each (center of) pixel weighted by the intensity of each pixel, but parallel version uses a SparseMatrix-DenseVector multiplication. Neighboring output bins get also a contribution of pixels next to the border thanks to pixel splitting. Finally pyFAI provides also tools to calibrate the experimental setup using Debye-Scherrer rings of a reference compound.

References:

  • The philosophy of pyFAI is described in the proceedings of SRI2012: doi:10.1088/1742-6596/425/20/202012 http://iopscience.iop.org/1742-6596/425/20/202012/

  • Implementation in parallel is described in the proceedings of EPDIC13: PyFAI: a Python library for high performance azimuthal integration on GPU. doi:10.1017/S0885715613000924

  • Benchmarks and optimization procedure is described in the proceedings of EuroSciPy2014: http://conference.scipy.org/category/euroscipy.html (accepted)

Installation

As most Python packages, pyFAI is available via PIP:

pip install pyFAI [--user]

Provide the –user to perform an installation local to your user. Under UNIX, you may have to run the command via sudo to gain root access an perform a system wide installation.

The latest release of pyFAI can be downloaded from Github . Presently the source code has been distributed as a zip package. Download it one and unpack it:

unzip pyFAI-master.zip

As developement is also done on Github, development branch is also available

All files are unpacked into the directory pyFAI-master:

cd pyFAI-master

Build it & test it:

python setup.py build test

For its tests, pyFAI downloads test images from the internet. Depending on your network connection and your local network configuration, you may have to setup a proxy configuration like this:

export http_proxy=http://proxy.site.org:3128
python setup.py build test

This is especially true at ESRF, where you will have to phone the hotline (24-24) to get this information or grab it from the intranet.

Finally, install pyFAI computer-wise if you have local root access. This command may request your password to gain root-access:

sudo pip install . --upgrade

If you prefer a local installation (only you will have access to the installed version):

pip install . --upgrade --user

The newest development version can also be obtained by checking out from the git repository:

git clone https://github.com/silx-kit/pyFAI.git
cd pyFAI
python setup.py build bdist_wheel
sudo pip install . --upgrade

If you want pyFAI to make use of your graphic card, please install pyopencl

If you are using MS Windows you can also download a binary version packaged as executable installation files (Chose the one corresponding to your python version).

For MacOSX users with MacOS version>10.7, the default compiler switched from gcc to clang and dropped the OpenMP support. Please refer to the installation documentation …

Documentation

Documentation can be build using this command and Sphinx (installed on your computer):

python setup.py build build_doc

Dependencies

Python 2.7, 3.4 and 3.5 are well tested. Python 2.6, 3.2 and 3.3 are no more supported since pyFAI 0.12 For full functionality of pyFAI the following modules need to be installed.

Those dependencies can simply be installed by:

pip install -r requirements.txt

Ubuntu and Debian Like linux distributions:

To use pyFAI on Ubuntu/Debian the needed python modules can be installed either through the Synaptic Package Manager (found in System -> Administration) or using apt-get on from the command line in a terminal:

sudo apt-get install pyfai

The extra ubuntu packages needed are:

  • python-numpy

  • python-scipy

  • python-matplotlib

  • python-dev

  • python-fabio

  • python-pyopencl

  • python-qt4

using apt-get these can be installed as:

sudo apt-get install python-numpy python-scipy python-matplotlib  python-dev python-fabio python-pyopencl python-qt4

MacOSX

You are advised to build pyFAI with the GCC compiler, as the compiler provided by Apple with XCode (a derivative of clang) lakes the support of OpenMP. If you use Xcode5 or newer, append the “–no-openmp” option to deactivate multithreading in binary modules. You will also need cython to re-generate the C-files and delete src/histogram.c before running:

pip install cython --user --upgrade
rm pyFAI/ext/histogram.c
python setup.py build --no-openmp

Windows

Under 32 bits windows, pyFAI can be built using The MinGW compiler. Unfortunately, pyFAI will be limited to small images as the memory consumption, limited to 2GB under windows, is easily reached. With 64 bits windows, the Visual Studio C++ compiler is the only one known to work correctly.

Dependencies for windows have been regrouped in our wheelhouse, just use:

pip install --trusted-host www.edna-site.org -r requirements_appveyor.txt

Getting help

A mailing-list, pyfai@esrf.fr, is available to get help on the program and how to use it. One needs to subscribe by sending an email to sympa@esrf.fr with a subject “subscribe pyfai”.

Maintainers

  • Jérôme Kieffer (ESRF)

  • Valentin Valls (ESRF)

Contributors

  • Frédéric-Emmanuel Picca (Soleil)

  • Dimitris Karkoulis (ESRF)

  • Aurore Deschildre (ESRF)

  • Giannis Ashiotis (ESRF)

  • Zubair Nawaz (Sesame)

  • Jon Wright (ESRF)

  • Amund Hov (ESRF)

  • Dodogerstlin @github

  • Gunthard Benecke (Desy)

  • Gero Flucke (Desy)

Indirect contributors (ideas, …):

  • Peter Boesecke

  • Manuel Sánchez del Río

  • Vicente Armando Solé

  • Brian Pauw

  • Veijo Honkimaki

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyFAI-0.13.0.tar.gz (29.5 MB view details)

Uploaded Source

Built Distributions

pyFAI-0.13.0.win-amd64-py3.5.msi (2.3 MB view details)

Uploaded Source

pyFAI-0.13.0.win-amd64-py2.7.msi (2.8 MB view details)

Uploaded Source

pyFAI-0.13.0-cp35-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.5 macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.6+ x86-64 macOS 10.9+ intel macOS 10.9+ x86-64

pyFAI-0.13.0-cp35-cp35m-win_amd64.whl (2.4 MB view details)

Uploaded CPython 3.5m Windows x86-64

pyFAI-0.13.0-cp27-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (3.2 MB view details)

Uploaded CPython 2.7 macOS 10.10+ intel macOS 10.10+ x86-64 macOS 10.6+ intel macOS 10.6+ x86-64 macOS 10.9+ intel macOS 10.9+ x86-64

pyFAI-0.13.0-cp27-cp27m-win_amd64.whl (2.8 MB view details)

Uploaded CPython 2.7m Windows x86-64

File details

Details for the file pyFAI-0.13.0.tar.gz.

File metadata

  • Download URL: pyFAI-0.13.0.tar.gz
  • Upload date:
  • Size: 29.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyFAI-0.13.0.tar.gz
Algorithm Hash digest
SHA256 8d2752bd65d8ac1db5fb170b1ebaea052563261ff374bab14733bd2782746673
MD5 f66097fa1c1b713800dae9f3bcf898d1
BLAKE2b-256 8ffea0d5aac72e0b71ec9e1f1a8085dd64d0cfc141a7eeb797d122c1ff1451ab

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0.win-amd64-py3.5.msi.

File metadata

File hashes

Hashes for pyFAI-0.13.0.win-amd64-py3.5.msi
Algorithm Hash digest
SHA256 7bdd0f48840c1b424b3d22def8a267dc9679822112adbaea460ebff551b9674a
MD5 71d2d1e43414cf43725c6f256d654244
BLAKE2b-256 6761fe54f1ae6b196da5b9ca447fad2361b55fe3ace7d2637abf702540118835

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0.win-amd64-py2.7.msi.

File metadata

File hashes

Hashes for pyFAI-0.13.0.win-amd64-py2.7.msi
Algorithm Hash digest
SHA256 2507112598ee26589626210e43457eee1abcafba89de7889f3d0dfc2fdb5ed1d
MD5 4eac0a50226e27abe4a8007ee1d99ff6
BLAKE2b-256 6788df35d67707a0a0fbb26bf4b77ab9bf18182b8b4b31c97c9063541768f504

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0-cp35-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.0-cp35-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 52f26d9b799eafc6f6c95f49bc48fc9cab8e7475c9f02282aa2283cacbf8dc00
MD5 cbf07d442dc7d6bea80372fd5a447ee0
BLAKE2b-256 d37dc90642176d3a4c9b1c9619b3a5acd1a03669dfff630d768c1238c057264a

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 58749352e8a077183112c48469f67352e952023dc48724ec7b425ea49d7bf1f0
MD5 877be43b37967f398f766effb94da321
BLAKE2b-256 ae501ae0876c1325a92e101ce8450337d1ed28b435671828e3611dbf1ff6a5cc

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0-cp27-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.0-cp27-none-macosx_10_6_intel.macosx_10_6_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Algorithm Hash digest
SHA256 d52d38dae15a22c84745b869612509b7a7529902aa0c5a6b771b2a19729878d0
MD5 7da79522ef08a16fae7e6fdacea3669d
BLAKE2b-256 bf22c4c25d151618a0245364b1951089b69b8401e5ccc05650a6871d75a21818

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.0-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 91b8ff9a989137f438e039b3c8a7dd7a399c94d4697d3a03bf3f965ece0b5e23
MD5 fd60869775827c145658b7690de47e8a
BLAKE2b-256 64c3bbc98aae8c4c6360a139e36b608ac26c285255bbfc42482d21f56f8609f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page