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.2.1.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.2.1-cp314-cp314t-win_amd64.whl (6.0 MB view details)

Uploaded CPython 3.14tWindows x86-64

pyfai-2026.2.1-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.2.1-cp314-cp314-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.14Windows x86-64

pyfai-2026.2.1-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.2.1-cp314-cp314-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

pyfai-2026.2.1-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.2.1-cp313-cp313-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

pyfai-2026.2.1-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.2.1-cp312-cp312-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

pyfai-2026.2.1-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.2.1-cp311-cp311-macosx_11_0_arm64.whl (5.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

pyfai-2026.2.1-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.2.1-cp310-cp310-macosx_11_0_arm64.whl (5.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

pyfai-2026.2.1-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.2.1.tar.gz.

File metadata

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

File hashes

Hashes for pyfai-2026.2.1.tar.gz
Algorithm Hash digest
SHA256 7e7223c7202b53b3f3abe57cbcdd8cb6062eeb063868b47774009e9dc6d47260
MD5 e7d8f4b4f4d841ab5f5e05a6953b0ee0
BLAKE2b-256 92752a40492f83d6510b99eb300dd36a98583b3bac0033bd6a2174e643b2b3d9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 12dddeca21e321d6caa9ece3939639dff070c2cd444a50340a7195fdfb836ed5
MD5 2e640c906c149293a229294094be5f9d
BLAKE2b-256 5ffe0fc9f4f11afd74af559390cd62cb55a2d431bb850cf2e58a1ab64657c12d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 542bc965e2be7f0c5e8729259f6fa34036edf862cda8119fa88814ccc9ad5f28
MD5 0b1089a1838f7b1df0e98b04426c5a9e
BLAKE2b-256 37bf81d8661a6c3e12bcd8bca21fcbb9caaa6188c9ea5ae97b3bb56ae772e59b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 858c9603870931551e4cde88e6134700a8c372aa738db8575c1b4eba17f7fb9a
MD5 377eb66c3183f3616a5047fd06b88b5a
BLAKE2b-256 b4310e7c76fb3a03cf092363bbf3a3ecf0027018a2f37e29f85b79a1dc92d3d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 56a48bb5d6ccaa8b5837871bfe31cf084a0cc964cac44030883f35ee8b9429a8
MD5 30a8e1f394f98b0cae925c2cd9a4fcda
BLAKE2b-256 fedfcbf5bdd3f6992b0c7acb1d3b8ead6d8b47d7fae37c6c268034f9eaab6be6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ad0f698fd3154c483b99519d4305c1022334ff3b2e4983e11826ba436178cfe
MD5 38f5d3e9d07822aa4ae499b42ee3d646
BLAKE2b-256 ae4bc01e85010c17b621c525a7219c852fac990afb37a87f40e1dd34df2616a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 904dd41d738be27c5c5721ee9dcb9d1f4f5c55436b8a27d12d452970a7c39b79
MD5 ffc97f476cf2e7b39f42918806742839
BLAKE2b-256 8a4bbce6e4afec0704aa8262f17c0e6db76a21d343d1e8591420b76065b8b183

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 aa8f0d96d24d09d7903da8a9a2bbc82e85b366d51d148ea5a37fdc1ee7c45606
MD5 cb9b0ee42b3fd4dc7d91ebb8d68f2af8
BLAKE2b-256 9f32d3b077b4d540d32ee4b1cd342d9bbf9293528673f96bf5d589c00077fad0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7290cef32e64a0bfcc98f82d09622a9113c1272f853a666238d88404e4bb693
MD5 61d77d90e73d505227cb467932917a99
BLAKE2b-256 9d01c13fd0aa369c4d061906644cb5e715ccac57768194b7ea469eae67a3965f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 2af96d9f8421b61528a6944d8deebf9e14bfe97cd5f39a03138e31a7708fd757
MD5 2671c74c10a9863dfcd3349da3a34a9f
BLAKE2b-256 a5cf7f7a6966d0120313efee3f386e20b36f4edc0ecbc95708999c6600839613

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bc6a74ddf90a4da29df0e5206d6fba681d583e309060726a7e6378efb8628c22
MD5 8f1cc50887106dffd1aa196d82b8deaa
BLAKE2b-256 4ce03bf1e58082105c3106f83aaa15bd27e72cf4260312be0cadd2520f8ef269

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18a9e50a029d860e7a221834d1280710b30aeeed4eee7d068709dc77ae5d84db
MD5 69f880b8f4f505bd919734f0d7d20973
BLAKE2b-256 cd76403ea93b165ab38588c93330b660a74a8423d0aae5701e89f1e05968ac8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11fe5a2234f14a56dd9692022402dbd6bfd3fdfaa9e5b9c863194affe344f6af
MD5 967eab742d368b9a9f354baf0d67013b
BLAKE2b-256 f8b97d21da07f14cb68df29f1197413f1a5869448a130c4ef05f915e7df63312

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 513c43f649100e367bcbe9333b1c51066d6b548ea728649e90d4e87edf612707
MD5 8a1981570e92be91383fec4f56378e7e
BLAKE2b-256 5d194c9a0694ea8ff67e667f5e42f34958097fb86d59d3023dc0dda17e2c86f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b2db14dd9ad269b064582031c240fcb1a1e7595615c27649a6457530ebc535e6
MD5 43eed0228ae5af9470da33e416a3b850
BLAKE2b-256 9d2f716213e8d1a6a3b6f39dd18c068ce27d7a44c5bc6bad541c7442fe388218

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cff341059d776f4e7db0479fd6bbb843d61e353e1f379bb91134f45201dc734
MD5 06f38a426207d5837399ba8b7d48a8bb
BLAKE2b-256 fd735517fe15ae17addd75d03ec4cd6dd0be773a1e8d08bd62d7db4e28c25d7c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 35ea2ecf65db3bd9b810087c9568b85b7345171549357d6397a7de8b9dfe6edb
MD5 611d552bbc58907eda68901ca20bcfbf
BLAKE2b-256 6d6e6da0c82b3b789536560c3ceb0a68095888b01f968476130fa6d33f8d8b8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2f47237c7651889b6e6d05eb7c7af0e1dc87f654e601dd8ef6474641c5dcbec9
MD5 2d0a62d855caae1d07ab01cde0d17fdd
BLAKE2b-256 365345fc9f7f0a0fd1ca79fbefd4e0e772a46d925046ba4c548260a9d2ef5d43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfai-2026.2.1-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.13.1

File hashes

Hashes for pyfai-2026.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c363b3372fabacd66e5a8450c58e7b59bfee69063fd1e4100934e67e48165f48
MD5 f0c15786d62f5887e05c7547b13b22a8
BLAKE2b-256 a960f2a704b1c9442e820dbd94bf1175ca5d579fb0ec20f473f05f2c5c658a0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24d776b6b63baa11405057d9ddec4697be85b6aec99c41ea44efaf6d2f290bdc
MD5 7f34f297d697f5ee99cc717d9826f824
BLAKE2b-256 030ae22012cacf9eda1d68956ad296a444b1b1e0cb12d4d18f9dad2306596421

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3631b1512b6829b4d0a5833b03cbab65d45d6edb91842cdf418c1e1da039ccec
MD5 ea7dacefcc827d6b500e742806359be5
BLAKE2b-256 de6b2a44951a2600a39e958ce71ab242f07fd8bacb1d2d9fa0e0f2938e776dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.2.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a06ff3c524f413df3df054ca916f2ac22b0f8ddb035a5e81e9a3d29de235ef7f
MD5 e0702f858d23e731e15db85782b37b58
BLAKE2b-256 5569b642028e6571b7a23147a391459ea01fbdbaaaabc42596f35e2574dccaef

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