Skip to main content

Python implementation of fast azimuthal integration

Project description

Fast Azimuthal Integration in Python

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

Github Actions Appveyor Status myBinder Launcher RTD docs Zenodo DOI

PyFAI is an azimuthal integration library designed for high-performance, achieving performance comparable to C and even greater through OpenCL-based GPU acceleration. It is based on histogramming the 2θ/Q positions of each pixel centre, weighted by pixel intensity, whereas the parallel version performs a SparseMatrix-DenseVector multiplication. Both method achieve the same numerical result. Neighboring output bins also receive contributions from pixels adjacent to the border through pixel splitting. PyFAI also provides 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
  • Implementation in parallel is described in the proceedings of EPDIC13
  • Benchmarks and optimization procedure are described in the proceedings of EuroSciPy2014
  • Calibration procedures are described in J. Synch. Radiation (2020)
  • Application of signal separation to diffraction image compression and serial crystallography in J. Appl. Cryst. (2025)

Installation

Using PIP (python-package installer)

As with most Python packages, pyFAI is available via pip:

pip install pyFAI[gui]

It is recommended to run this in a virtual environment. Provide the --user option to perform an installation local to your user-space (not recommended). Under UNIX, you may have to run the command via sudo to gain root access and perform a system wide installation (which is neither recommended).

Using conda installer

PyFAI is also available via the conda installer from Anaconda:

conda install pyfai -c conda-forge

To install conda please see either conda or Anaconda.

From source code

The current development version of pyFAI can be downloaded from GitHub. The source code is currently distributed as a zip package.

Download and unpack it:

unzip pyFAI-main.zip
cd pyFAI-main

Install dependencies:

pip install -r requirements.txt

Build and test it:

python run_tests.py

For its tests, pyFAI downloads test images from the internet. Depending on your network connection and your local network configuration, you may have to set up a proxy configuration like this (not needed at ESRF):

export http_proxy=http://proxy.site.org:3128

Finally, install pyFAI in the virtualenv after testing it:

pip install .

The latest development version is available by checking out the Git repository:

git clone https://github.com/silx-kit/pyFAI.git
cd pyFAI
pip install .

To enable GPU acceleration in pyFAI, please install pyopencl.

Documentation

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

python build-doc.py

Dependencies

Python 3.10 ... 3.14 are well tested and officially supported (thread-free is untested).

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

On Ubuntu or Debian, the required Python modules for pyFAI can be installed either via the Synaptic Package Manager (under System → Administration) or from the command line using apt-get:

sudo apt-get install pyfai

MacOSX

On macOS, a recent version of Python (≥3.10) must be installed before installing pyFAI. Apple provides only an outdated version of Python 2.7 which is deprecated. To build pyFAI from source, you will also need Xcode, which is available from the Mac App Store. The binary extensions will use only a single core due to the limitation of the compiler from Apple. OpenCL is hence greatly advised on Apple systems. Next, install the missing dependencies using pip:

pip install -r requirements.txt

Windows

On Windows, a recent version of Python (>=3.10) must be installed before pyFAI. The Visual Studio C++ compiler is required when building from source Next, install any missing dependencies using pip:

pip install -r requirements.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 the subject "subscribe pyfai". There is also a discussion space at GitHub and an issue tracker where bugs can be reported.

Maintainers

  • Jérôme Kieffer (ESRF)
  • Edgar Gutierrez Fernandez (ESRF)
  • Loïc Huder (ESRF)

Contributors

Thanks to all who have contributed to pyFAI!

Contributors image

Indirect contributors (ideas, ...)

  • Peter Boesecke
  • Manuel Sánchez del Río
  • Thomas Vincent
  • Vicente Armando Solé
  • Brian Pauw
  • Veijo Honkimaki

Project details


Download files

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

Source Distribution

pyfai-2026.3.0.tar.gz (69.3 MB view details)

Uploaded Source

Built Distributions

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

pyfai-2026.3.0-cp314-cp314t-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.14tWindows x86-64

pyfai-2026.3.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp314-cp314-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.14Windows x86-64

pyfai-2026.3.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp314-cp314-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

pyfai-2026.3.0-cp313-cp313-win_amd64.whl (5.3 MB view details)

Uploaded CPython 3.13Windows x86-64

pyfai-2026.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp313-cp313-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

pyfai-2026.3.0-cp313-cp313-macosx_10_13_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

pyfai-2026.3.0-cp312-cp312-win_amd64.whl (5.3 MB view details)

Uploaded CPython 3.12Windows x86-64

pyfai-2026.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp312-cp312-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

pyfai-2026.3.0-cp312-cp312-macosx_10_13_x86_64.whl (5.6 MB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

pyfai-2026.3.0-cp311-cp311-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.11Windows x86-64

pyfai-2026.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp311-cp311-macosx_11_0_arm64.whl (5.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

pyfai-2026.3.0-cp311-cp311-macosx_10_9_x86_64.whl (5.8 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

pyfai-2026.3.0-cp310-cp310-win_amd64.whl (5.5 MB view details)

Uploaded CPython 3.10Windows x86-64

pyfai-2026.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pyfai-2026.3.0-cp310-cp310-macosx_11_0_arm64.whl (5.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pyfai-2026.3.0-cp310-cp310-macosx_10_9_x86_64.whl (5.9 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file pyfai-2026.3.0.tar.gz.

File metadata

  • Download URL: pyfai-2026.3.0.tar.gz
  • Upload date:
  • Size: 69.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0.tar.gz
Algorithm Hash digest
SHA256 7c4ca81502185ba0582d677b680cadd295f9ef94c735484a51179506efe579ab
MD5 486f225cd09428f84c85428475e58891
BLAKE2b-256 05435a2b3f2b7e21edc9c68cd28c294aeb61e54b5e851fdd9a22c732580024d3

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 8c8320f6de1ea0858d554c6667991563150cc6e0c2b7411aae89024718680b91
MD5 47a373a9cc144ae7b593f88a5a02d361
BLAKE2b-256 ddd3a9cc9664b5276a774b2d43bdcf53c323c0635b7235ed0ea3e16620046909

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da050ead7a7c56e5f73a386ea4015faaaf20ea24666cc37488475c2fd76b2595
MD5 eb2e1706491748825f1de58fbcd0ebdb
BLAKE2b-256 9e5f93351df22c6c6b9b4f8be4861513077ed4c362b29c48b2ac9cd618ba87d8

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 5.4 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4148c0658cb29729a381e8337946cfb92b10db051896fb971aca53fdcceff054
MD5 68dce3d86880c08ef1d802bff589f464
BLAKE2b-256 516ad09a55f93a4c6170305e54bd7f6c558248024c3d42a97befac9adac29bf8

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4ce01c062816ea417e860a0817a8e8799bc7b5752e24cbe689905edd4322c45
MD5 fe10d9f9608fe5191ff7cf8175d342c6
BLAKE2b-256 2bf659995ff519cd36bba4f77df2c15b28569b4bf1ecf711fc8ca84616027f71

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8c6fec4e6907b6bcdfdbbc14673bdf45f09eb1628a1d56f569dca372999a9cb6
MD5 c89152c4fb1eb0a85869fffe7022b75f
BLAKE2b-256 b3f1a0dd72da8a1d1e6fb54c88c21a8cf61203dbb0556fab866d73803b256526

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d765e3d0301630f15ceae09e529ebb681904dd2c2588d80ef91ffc7a856e1023
MD5 22c5e835e101546c55d6713dcddf8114
BLAKE2b-256 42476ebf7bf5bad7361e94f4792e85978601e3c68c6931a72309c6fcf862d269

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 85922a5c99a0a160bccf4423ddae54b931baa0ddd85f084fa3b745f02820241d
MD5 3e6160a1056b4a7ef99ae5c8b2baeb6f
BLAKE2b-256 4a824fef61b62347aab44db53e423a09de9307ed4619b36cdc3abbc40a7cd878

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9835a3ec62af12962005e15118da4ca966fe0ef8535d44f135ef95a9eba39061
MD5 c0b122b92237e9f07c77040e44558f28
BLAKE2b-256 f407c0e46fc15a91ff2ff6a2f2af406c5690f5c88f7ebc991b665054074c50a4

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 fd8bf7b6a1f78f182c30c9943154b7747bed0746fcf84b0e73f697219ca6e9f0
MD5 a5d7e225fa4aa236d0a6d99788846d17
BLAKE2b-256 370b2a9858ff7eff0fbb0e46eb216e39c874118b0a59ad65c1dfd96027267ee2

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 167624b8b822a467afd9d84105e39e3ac03bd4716b0e2869c476782518f4e31d
MD5 471ab8c5f86f265468467848edd03854
BLAKE2b-256 d2318350f9797fc3eaecd60d698530e454e672d930813ff66b7782a577520049

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 789dd569d7138c56cddc9f1d7b544b8900a6d66ad4ad8c0d666821ce1fb135eb
MD5 9bd8be3d83fd1bcf54fc98a93d1786c6
BLAKE2b-256 a2326babc2cfc0d009e59969f16a130fbc528264a2bdadadeff0bdd666dd91ef

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9e3785e85679cffe30c0403230f11286dcc756be4de395c516eebf8a27c01a1e
MD5 62ae9de71472bfbef88674b8f2339638
BLAKE2b-256 3f9a031a49950e0c9a612a047548b1f014c04793d9e859895f90100f724cb5d9

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 5e993e8bbf4cd32b941e7cb26e97703a1110de440e9bce18172785f5153046d4
MD5 e67397d7fab0ad405b43875c9ac7e098
BLAKE2b-256 ab74d95cd3b1dee67e1ee3544a605c943ec0bab0c9cdcd628fd895c3e210b767

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 14ecb80c2ae657ab3563ef97f95cfc8f9ec02a6f7801c6224852285a3151275f
MD5 f8c6b5c9a622eb459c04a79e0e1a1e24
BLAKE2b-256 0617d0f72e181df0e9407d881b4a599948876a51c05dd6c9de90393c5ac14e29

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 082ff3ef949562bc280f0d73b7172ac108180d40809e58bd71e6954c304ed0cf
MD5 d63c8a83355137dcf1de2d719795d0a6
BLAKE2b-256 72e68c81c8b8117f9fd12e5d386b9c0cd422196dc646c3c56e22aa9a106ef76d

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26c2a16539a17c39383c93bd04980fd02d3717c72e6b96a7cca8bdc473381c70
MD5 ccbcf425eefdba9cff8d026e1a20acd6
BLAKE2b-256 bfab1245aeec58a39c739ab9148f5bb7b75426e48141551ed8b10213b46b7c11

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8894d70572a1ba491c3a0c4d85caf755bf6bf23de1df7e29ee1836f72e998109
MD5 d67b71814c3d8cb70b40b3978e99ebb0
BLAKE2b-256 e8e951cd51d3ede6d631ee202e4aac77e0da5ab99745f74157d47a139fcbf684

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pyfai-2026.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 5.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pyfai-2026.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d3eafad2c6e4985d2025f7db6fe48fb5ceb5b4c0a20d01935c6d0c38cd13c379
MD5 eed9e596721d93356df7140def852a06
BLAKE2b-256 d904cc90feecaa00f8e2108130bf82a3bc00aeba8ed6d6a2e18e345d5fdc0319

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3aa6d4f1a07766fcf4d768f6116edef805fa5a5181762617284a0d5df8fdcba6
MD5 b06ba2ab1e03d7cbf5696902880a3c65
BLAKE2b-256 a0e3913ca30973886fa9ef5f1a78cf6a5a206ee76d8da2033ad67c4b8beec6b2

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 95edd242ce7a40a83dd1c2d4907f2c8874b518df1baefa563ce383b7f3af5138
MD5 faea041785f9690620a6a2f13114e0e3
BLAKE2b-256 56229e726b9537ec8ebe9981dc3dce07d4e72b059ad0546bc19ca16771ee23a5

See more details on using hashes here.

File details

Details for the file pyfai-2026.3.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pyfai-2026.3.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2b53ec545d6c57e900254d028d334e2d8abb03d60c9902fba0442832c9ccd786
MD5 82afa931827e5ce07db764b6a4c4210b
BLAKE2b-256 1e4e4238861f6ef2b1229932d79cbffd32305073c1f5bc09520eb22c869d0045

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