Skip to main content

Python implementation of fast azimuthal integration

Project description

Main development website: https://github.com/kif/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/kif/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-fftw

  • 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-fftw 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”.

Maintainer

  • Jérôme Kieffer (ESRF)

Contributors

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

  • Dimitris Karkoulis (ESRF)

  • Aurore Deschildre (ESRF)

  • Valentin Valls (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.12.0.tar.gz (26.2 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyFAI-0.12.0.win-amd64-py3.5.msi (2.2 MB view details)

Uploaded Source

pyFAI-0.12.0.win-amd64-py2.7.msi (2.4 MB view details)

Uploaded Source

pyFAI-0.12.0-cp35-cp35m-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.5mWindows x86-64

pyFAI-0.12.0-cp35-cp35m-macosx_10_6_intel.whl (5.2 MB view details)

Uploaded CPython 3.5mmacOS 10.6+ Intel (x86-64, i386)

pyFAI-0.12.0-cp27-none-macosx_10_11_intel.whl (5.1 MB view details)

Uploaded CPython 2.7macOS 10.11+ Intel (x86-64, i386)

pyFAI-0.12.0-cp27-cp27m-win_amd64.whl (2.4 MB view details)

Uploaded CPython 2.7mWindows x86-64

File details

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

File metadata

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

File hashes

Hashes for pyFAI-0.12.0.tar.gz
Algorithm Hash digest
SHA256 e036e62d054ea3313b495edb01b465e94fb7714f60b29c749a7288a304b316af
MD5 f4222401d8813a5366aa08eb81ed3bf6
BLAKE2b-256 0554af0161d329cc3424feb603c7c2d343d4e88514a9a96cd2e28addb7b9ae60

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.12.0.win-amd64-py3.5.msi
Algorithm Hash digest
SHA256 6715f90b1d4dced112b7909a3d34f802a5a99540e9de96b14e3ad3f51e2cf526
MD5 2404c5796217cf709aeec71b7745d803
BLAKE2b-256 e45b7c03defdc86da6fa410f23aa15939d4c059ffd48ca1a56714b167064289a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.12.0.win-amd64-py2.7.msi
Algorithm Hash digest
SHA256 b609541511dc8efd1d889108afea05d968490b5c7ec1d37a22bdd1c580ee44b2
MD5 c452272a0f82b037168d2c5a4898bf90
BLAKE2b-256 dc7374e4f18b0713355e971db94056a3e7dfdb9ebbd89d1ea2c829ac2e4fe442

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.12.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 ab68db949d9efa26a7140a43d317705b79981f52967285c779d9ca59c1ad2af7
MD5 295aeca10f02b80bf1b727d2de008c88
BLAKE2b-256 01df20f597627327f2a39bd0e16af3e533093f84ee34579958294c7339e3052d

See more details on using hashes here.

File details

Details for the file pyFAI-0.12.0-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.12.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 dc4193855aaf274aba952dd7b8a0f6d778286be56ff9602344d448580eaff302
MD5 a0c367d18691490266ad659bd0ae255a
BLAKE2b-256 f21bb1c39693c979b045db5bc568a00271b69b99806072126d5c16c9730f4607

See more details on using hashes here.

File details

Details for the file pyFAI-0.12.0-cp27-none-macosx_10_11_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.12.0-cp27-none-macosx_10_11_intel.whl
Algorithm Hash digest
SHA256 5d13253a889a92fffc3f468e1229fe5e890f04bbe4fd262e9bfe5c7de38e64a5
MD5 07c89de88b65cceac27e594063f127ac
BLAKE2b-256 591b6744c1967442210648c12c0d2c5eaf2f2a1a5354239eeffcde5d608f5d6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.12.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 9269aa9a8831f4cc267d50e260e5029627e5a248053a673e0f36344a7ed55664
MD5 d10784f1f776152756f2531631cbc701
BLAKE2b-256 92d5bc3e60b43181c37ef82db1e3844508b9f9790e327acf97336d60383f88e5

See more details on using hashes here.

Supported by

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