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.16.0.tar.gz (26.5 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.16.0-cp37-cp37m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.7mWindows x86-64

pyFAI-0.16.0-cp37-cp37m-manylinux1_x86_64.whl (13.8 MB view details)

Uploaded CPython 3.7m

pyFAI-0.16.0-cp37-cp37m-macosx_10_6_intel.whl (7.4 MB view details)

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

pyFAI-0.16.0-cp36-cp36m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.6mWindows x86-64

pyFAI-0.16.0-cp36-cp36m-manylinux1_x86_64.whl (13.9 MB view details)

Uploaded CPython 3.6m

pyFAI-0.16.0-cp36-cp36m-macosx_10_6_intel.whl (7.4 MB view details)

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

pyFAI-0.16.0-cp35-cp35m-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.5mWindows x86-64

pyFAI-0.16.0-cp35-cp35m-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.5m

pyFAI-0.16.0-cp35-cp35m-macosx_10_6_intel.whl (7.1 MB view details)

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

pyFAI-0.16.0-cp34-cp34m-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 3.4m

pyFAI-0.16.0-cp27-cp27mu-manylinux1_x86_64.whl (13.0 MB view details)

Uploaded CPython 2.7mu

pyFAI-0.16.0-cp27-cp27m-win_amd64.whl (3.6 MB view details)

Uploaded CPython 2.7mWindows x86-64

pyFAI-0.16.0-cp27-cp27m-manylinux1_x86_64.whl (13.0 MB view details)

Uploaded CPython 2.7m

pyFAI-0.16.0-cp27-cp27m-macosx_10_6_intel.whl (7.4 MB view details)

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

File details

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

File metadata

  • Download URL: pyFAI-0.16.0.tar.gz
  • Upload date:
  • Size: 26.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.16.0.tar.gz
Algorithm Hash digest
SHA256 63fc8adf6cb48f9d9e3050a25e3346e133f6cd95cfe4beda01c28cc567c2b554
MD5 a05fcda2a955c9a6e6376e09ae3198d8
BLAKE2b-256 a2853e46e6c9f320cc11ae337145877bd77e2098f66b7de87c03ba0a314e7820

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.16.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 84067c47b2faf432d9100156b5cb0a13e3e623eb49305cf0b7acf928813ee717
MD5 3cbaa86e8db671628fcc48179bf26eaf
BLAKE2b-256 8cab769289e7a84cd6faec186ff3b6b9de304a4277e8f4d81df086b3d16230af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.8 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.16.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fe7cc17e087c15d966daf306c86e3f148208f9dfe3f435065454b15850ff9427
MD5 1c25407b95209bb430a4ab238b6905f0
BLAKE2b-256 6b39b64eb31747f8225010cfd39572fa9edca2a97b089c7bde3812c6acd599ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.4 MB
  • Tags: CPython 3.7m, macOS 10.6+ Intel (x86-64, i386)
  • 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.16.0-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 db46b7c214e68e654c6503e4db89eb565a6c976df58e67dd0e8f675377b794b1
MD5 05177306c51f58897b70f6ae4b1e43c3
BLAKE2b-256 b701901a2badc2d9fcb751f021c5e2f9f257017b079a842392930ca36b223a98

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.5 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.16.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f2d2eb87bef528495bb7ddd888b57e68451fc3bb4261ee74188d31354049c220
MD5 1784a1d44bf0682146e99934a2ab267f
BLAKE2b-256 3898dfd3b49f7cd7dcb19c4847f33e928a9595c87dcd2b836fc7585c7d905db2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.9 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.16.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7c21b39b2cbdcecfe30c63ab7fc49abbce3a3083de4779494dbc921147bda1b4
MD5 46a83b08bf57c139cddf5b0eb11066e7
BLAKE2b-256 4fb069ddab985f10c6a331a42bf51393aaf0aaccc2286e29f4b3a23306bafa65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.4 MB
  • Tags: CPython 3.6m, macOS 10.6+ Intel (x86-64, i386)
  • 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.16.0-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 d977a6485f1b7f60ae613c23ad93e184a15701878279c2a78ceded8819539cfd
MD5 71ced79df93f46d56e938cc1f6d59d52
BLAKE2b-256 f97ad462e2d922d098ec51efd18063e88693bb43fc0daef0dee906d036800916

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.4 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.16.0-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 fb46d04b11772d2b12fc93a0ab008e4e4a54d1ed7a14d82aef428feb9c779c62
MD5 bf057b4eba825401dea4b94cb6eff7c2
BLAKE2b-256 8d54f86ddbbb6bdcfeb2551551d4603ac77a739f7f93806b15b21be43a145441

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 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.16.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 28b1e9603d183eef8dfc7577a91423aed87f6939a96d3e5c3981cd10cae965dd
MD5 bbbee573198c0fc97909cc923d75b959
BLAKE2b-256 c08e0fb8337a328822ea1221b6e26350e0fe71446f3dc1d1b8e28ed9f1b8c247

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: CPython 3.5m, macOS 10.6+ Intel (x86-64, i386)
  • 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.16.0-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 f723352d5b22e2bdd9227f2a9b0c8f5c1cc4a94034623dff62552209642a90a7
MD5 20f42eeeb0a799a52133d08df46a39d1
BLAKE2b-256 47bf8bac1fc8e50341c6eb377700636c8456aefed23dbc50afff4145b5aea2b2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 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.16.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4b6afc1c6a09e047bd6b5685804fe78daad55210920be43a96f99a3ce5bd826b
MD5 6c1eafa7aea471464f96495758c0168d
BLAKE2b-256 bfe4cc63b83404e6d900aec284246b32b24554f49416d2a252487a1c48e1f320

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.0 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.16.0-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1f91ed0d890e5d13008ed3151e46b16a1151fc11813c18e96ed80e0b3a33b39c
MD5 95c63e4ba12c3374c10689b5403e41f2
BLAKE2b-256 6906f261b2d387722d4417e7556e5d8aa01304aacb0e2843d1cab0e6cfeef4a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.6 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.16.0-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 c71103b2921fc8663a9db4247ff67329c7ac5a54e4d15c14001bc83f6be2428b
MD5 333facda8d24bb35fe0d3923057716a1
BLAKE2b-256 75141c4babc9851b31cac204491b568dd70a02bed42cf45def7abca1170d083f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.0 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.16.0-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4491b34f61c51d3fa8abfe4a541265a97fadd5fe5a29942733f0ed1ece7e8ac7
MD5 30e7e7fc756cddaf134fa4f6b1cce5b7
BLAKE2b-256 399c4c71075879280f8a144cdc0f8795a4ec15a7a859290e348fae939dd1e8e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.16.0-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.4 MB
  • Tags: CPython 2.7m, macOS 10.6+ Intel (x86-64, i386)
  • 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.16.0-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 e9c0e3de0280b63289eb8357dc6e661e4b2924939be4ae5e8ab003c8dad35337
MD5 066c65925912ce7d136373f3c72ecdf6
BLAKE2b-256 4c0180aa983ae9151fa0a2be614759445ce36f6f2d20f4b8e91d990d8ecaaf70

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