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

With PIP

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.

With conda

pyFAI is also available via conda (for Linux and Mac, currently):

conda install pyfai -c conda-forge

To install conda please see either conda or Anaconda.

From source code

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, 3.5, 3.6 and 3.7 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-pyqt5

  • python-silx

  • python-numexpr

and the same with python3 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-pyqt5 python-silx python-numexpr
sudo apt-get install python3-numpy python3-scipy python3-matplotlib  python3-dev python3-fabio python3-pyopencl python3-pyqt5 python3-silx python3-numexpr

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 --force-cython --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)

  • Thomas Vincent (ESRF)

  • 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.17.0.tar.gz (27.5 MB view details)

Uploaded Source

Built Distributions

pyFAI-0.17.0-cp37-cp37m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

pyFAI-0.17.0-cp37-cp37m-manylinux1_x86_64.whl (14.6 MB view details)

Uploaded CPython 3.7m

pyFAI-0.17.0-cp37-cp37m-macosx_10_6_intel.whl (8.6 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pyFAI-0.17.0-cp36-cp36m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyFAI-0.17.0-cp36-cp36m-manylinux1_x86_64.whl (14.6 MB view details)

Uploaded CPython 3.6m

pyFAI-0.17.0-cp36-cp36m-macosx_10_6_intel.whl (9.1 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pyFAI-0.17.0-cp35-cp35m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.5m Windows x86-64

pyFAI-0.17.0-cp35-cp35m-manylinux1_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.5m

pyFAI-0.17.0-cp35-cp35m-macosx_10_6_intel.whl (8.3 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

pyFAI-0.17.0-cp34-cp34m-manylinux1_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.4m

pyFAI-0.17.0-cp27-cp27mu-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 2.7mu

pyFAI-0.17.0-cp27-cp27m-win_amd64.whl (3.8 MB view details)

Uploaded CPython 2.7m Windows x86-64

pyFAI-0.17.0-cp27-cp27m-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 2.7m

pyFAI-0.17.0-cp27-cp27m-macosx_10_6_intel.whl (8.6 MB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: pyFAI-0.17.0.tar.gz
  • Upload date:
  • Size: 27.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0.tar.gz
Algorithm Hash digest
SHA256 45098b9386f3229d5bee61eab5f88f261553ed6d743c4804aebacf893b7f9d76
MD5 32b4322f379a231ceed00f2c7ea3d1fa
BLAKE2b-256 8f159a1324aa88aa66de8d313e4c7440e4c10a76f0b47f2b579edee23c1e0ce5

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 84016c47f46700b3c8ff0fd885a622f27bba6b1779b433d79c3504bbd98006c3
MD5 ecec52c5105422e19d39f64992e11e10
BLAKE2b-256 1572492c88d2f7342c88c8c8379ad749d7f90ed3f2bd0c1ace1fe080e6fa6490

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.6 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 41d349f4d57d377f729ff49c6dd306d0bbb0f89329856e2fbae5145c438033d6
MD5 9a1484e95925540701b6f385b92c7575
BLAKE2b-256 b6c415c9d8320669827a23201450837305dcbd2c2f8331fd218b1f46f85406b9

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 5c2d798098a0b8039a53ff1d799d1f1916d0acb0675c088b681f8b57184d9d80
MD5 cb1ce98ab5836b91dc0445ece9515948
BLAKE2b-256 6a5642183660d2085925c495946627a061665493e6da68868e6ea82ad4a4503c

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 0a45d14e9e5b39d8996ebac48565634a6a25b0540b0d218e1af950b276d37de9
MD5 43c46a7766202ae8016a561db3c4e40f
BLAKE2b-256 aabb9c591d3cebcbf1cacdf580cd0c4e59936922179479c157871cf9b810668e

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a0c9313210aa47ce127c2a1d1c3483b2db7b2e858c6a090bfb65a335bc347051
MD5 d10fe431d43ed7e13ffb094ff15561e2
BLAKE2b-256 2a440985a7f21e597fa91fbcf6e7e64ca1b1c0a4be7614e2feb5e5ac47ecf2ff

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 f71172ea49cd8a577fe67322f276c0bec39d1a34934e18ad9df8e3fec8fa387e
MD5 c4e630344ad451279a897ff29122bb22
BLAKE2b-256 f0475b40496c467244624b62ec04c7e60dc828d32eb240797ab29ff2d03b4450

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 80662b66da23984c8e051b6d9cfcc84622c6ea4a1d3e448c08fcf95271d15f12
MD5 dc207bded32c00ce0018f52e5cb9613a
BLAKE2b-256 a2b89f5087ef90af72cd846456712f2afb8bb6a8babd8c7d43ab8442217ffe63

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 871b5bea17a1b1f972f52ce73c3e3ac9ff095b0ada559abe6f20b2bc688c42c3
MD5 94caef876de721359b770de170cd3c9f
BLAKE2b-256 40a3f843d745f0f370a495ecf81ea4bb24bbe0acc466b9d567fe3c005f36f892

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.0-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 8.3 MB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 6ac26dae3978eb9c466a8ccbaca8e5c52eb85509d915f279252b3f6ad28e9499
MD5 484b0be79a219527b47dac8857425019
BLAKE2b-256 e85bd9d8d545220ec64456469d5849997e1988c22bb465f225778a8a8f644656

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7a0deafd8e33e2804b9a38c217e499831199059020e75a2b8dbc728a6fc5180a
MD5 cb853ae30bb4d1fa97192b7d1ed805a2
BLAKE2b-256 29af74ecb93644c8a1e9c21d1513d3bb0545cc108d1e7417c154d2b79dbee7c3

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 edb7de564b3dc7c4029db4c723dee54f1a39527678d3c6932a7926abd4a5a989
MD5 df457e602ab8b3045ce5c30a1de6f65f
BLAKE2b-256 09f2a67c2cfde7c0c80e5b4e120d8010cdd8d6fc22fcc11de8cb2e98b3945979

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.0-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 f720662253263ac646bc20ed9db80fe34c7c2f128f1192d06533a3bfb6f0425b
MD5 9a81e0248dec50b5b548ecf0f38c4135
BLAKE2b-256 141e7d0b59562d31ffbaaf8c44989c527280fd0eaabf35c543dcb46cbe62d3c8

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 98a41e73792fe339bdf47153c309120e170c8ac9fab71774d0eee8554145c1ac
MD5 f59577fa24d39a77e6340646103753c6
BLAKE2b-256 c7844520a42ca7d55fed99fd4c171e180845383846b8e7321c26f4a7f322e6f4

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.0-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pyFAI-0.17.0-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 fd3075c47867197607a8fa42c65fc2a32d838417ec61ab4279d713f6ca468618
MD5 e77e4cea6640985c1e89e6adf9db766a
BLAKE2b-256 068e100e82842949ca7e0fba6e834ae19d101d4e660f3174c02943de5cbaccbf

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