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.5.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.5.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.5.0-cp314-cp314-win_amd64.whl (5.4 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 11.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.13macOS 10.13+ x86-64

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

Uploaded CPython 3.12Windows x86-64

pyfai-2026.5.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.1 MB view details)

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

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 10.13+ x86-64

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

Uploaded CPython 3.11Windows x86-64

pyfai-2026.5.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.4 MB view details)

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

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10macOS 11.0+ ARM64

pyfai-2026.5.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.5.0.tar.gz.

File metadata

  • Download URL: pyfai-2026.5.0.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.5.0.tar.gz
Algorithm Hash digest
SHA256 f343cf0599f5e3e01163a41623cd4225da9bddbd4532a872256a15b01628559b
MD5 940bfbc7f32d6a7faedd0cbf9ad121c2
BLAKE2b-256 9343d6a5717ca6777c98b91d9177574ea044b87fb58d6e15267cc5a40f4cfa6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 71e32e9d035b5ab3c45e1bac21807f5c083ecc4e98a1704afaa9745434f975c8
MD5 5856ff3a677a9fdd8b1114ff3d213e6d
BLAKE2b-256 de320577241212f167268456f0d655d37bed27ab7f1c92da3a1784a36bd5e1e1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyfai-2026.5.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cf8c1731765a1cb24223838a75a8f894ca2934130e2fc3e888798a604c21fc43
MD5 22240e97693b98e5cfadb95a9fa1765a
BLAKE2b-256 6f214b487c97383ba22820fc2416f7fdbbcc533f66527abd34fc15ced17d9600

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 45faf77dd515b0f2ddf9a32305925051975c9b125ba46769f46ec8e6b6491b87
MD5 4f44d7484de519a45056ec99f7ee5a07
BLAKE2b-256 838e742ff3e69cbd8a0525618440b37e04963dd13a4b805ee707fe25d7455d52

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 590b8958cb9c804a198aac69bad347f65251b58f9295b29e4cdf1c636def466e
MD5 b2639d3ae0a9ef97aee894e07a983f4c
BLAKE2b-256 99f0ab6b4086ffedc3d61770ba1012bb881406edba97356cc5de0ad5b9f34d5f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyfai-2026.5.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d49f75454e80ee8a8fda806c2157263d804909d0f0f611544fc809edaf642143
MD5 79e42d214f98c367bfa465da9860362d
BLAKE2b-256 0fce84459b71a7a4d7310f446f6a5a5d3cb22d1903f1ce4e780b35ee311efc78

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 db3b7674b5a81c6260c94b6eb732fa52d11600d6f78d5fd209cc1dc813a687ce
MD5 eb313abe688979af441eece194902f41
BLAKE2b-256 162de52d9cb6bf018b05abe31c7bb4798eb8276ee86a1080a949212268dce9f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a52f1daab27bd2c7e6101e524ad1ca870bfd4182e945a22cc461b26f5d735b92
MD5 04a99e6c671cf222da3443ad85effd6f
BLAKE2b-256 6f6f7f1654926aed2e36f36b5aa8d48ca3d2c135565b376eb08147536b0491b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 7c9b602c29aed0b6eaed786120ba6d4d30145435f4ebe67b713abffc5e5bfbcd
MD5 e1b7acbddbed56d8b53c82ffa753ac68
BLAKE2b-256 1a406b082fa2ea06762ff66792504bdb4be80c4e3ad6b58ba1c8f4c4e61b35d6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyfai-2026.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 cd6548f5b83e141a5fd7b5506c43947c7bd718a7b1b63cc5e9cd9f45dd66c68a
MD5 633fead4f2135b219985ab8b986f8292
BLAKE2b-256 924c07fdaad5bf370b38e975e35e2d6061ebec03eab0497373f9f3381dd1d3db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 151dd2fed6c323bef3019cd533fd5a590f5f3d3d16385bb39cc1fcdd97df2f3e
MD5 1f17643490e5ac34d21aee3d4ab4bace
BLAKE2b-256 d28d3a9ecfac6ea9b26005b1258d4c86965ef7048df4d9c8810f1cb6f3a36a51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 16b5f153995b85dc6a0cefb9aeaedeee394eba22e1ee46a307e9c80c16b714d8
MD5 5a8c0bc310637a7c1ec35a434c92da1a
BLAKE2b-256 10e4057ebc39870776f9ba71c638e856e9018e2985431e54f91cd5ff02e5bbd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 4701b5615a8731655e93571380844ea9401c6bc9ef3e4837cbbcdac57fcd5e6a
MD5 80f550fb38e88627f628df21a0b129f3
BLAKE2b-256 3256d1cf5057dd7b6234f9bfab0c15fc6b35d1581122ec45cdc0c810ab7cce5d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyfai-2026.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6077b896555fbd4644be5434a5e06c6d20d148da779101584faca9a56e03f4b7
MD5 af47e7e19de0c620a1adbcd145c109a9
BLAKE2b-256 109a4e4f2263596b7f51d7744b4da9fcdba78822c7e1ac1e3b2eeafa22b95d97

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ccbd203c2df6185c74f73d2168342043e4b77f4deb08b98c47a5e88d18c15a56
MD5 6739ba543dda44ea5b2b911e9cd0c263
BLAKE2b-256 583c93798cd44e95e1447800e1e8611fde926b2d098dfaf27bbd53d309d43a44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cd31d0d0fc4a242818b3909f9cf80e8c1235a503d8ec50e28d51b88de0f607bf
MD5 85bfebf3a3d539160d38d89fd071721b
BLAKE2b-256 94b87e7f474ac64eee1b837149f9513adc46c80182e4b8aee637b2d62ad85cb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a564397bf0df53742a2602ebbb095c705f09100ab23e287c1e3c4886b20c84cb
MD5 89ffacc1076540174a49a7bf8ad67c90
BLAKE2b-256 76f5c421447576e813932574e688e6398634bb19f3c2e190c1721019862892c1

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyfai-2026.5.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0f1c977d377d4845de31d7e327562d6d8f9286b59ac8791a0266255b580eb699
MD5 6b911e01ff3e0dccfd6088e9271e8e16
BLAKE2b-256 0754145743808c4310954750564b68ee013684454d6ddde4142faad134d3adf3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e7427c2af9d7360b246238c22b1157a1d6100eb427ced1a4826d626658fdfc05
MD5 15bc66596d0682c0f67eef5e41386b1d
BLAKE2b-256 7b3f17ac5922fbe0f4cdb4cec715338b4a2c9185990e6726ac08cc124f53b709

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 796825b56ea8641a3974d52f016546f310b5dcd8c8a1cdfdfd05bb7eb9b263d2
MD5 bc4aadfe437bfc45faa0fa188a5a0f04
BLAKE2b-256 0d4d4009c0a3ab939c5dbc43ff2b558714344eb249ae3b5039d945835a3f98ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyfai-2026.5.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3dfc8a87e07565cac61d7fd8a515d0ca1d2b6bb905e33531135bc829267c3ea1
MD5 0dd174e0763815419ebaf6bf3dd4078d
BLAKE2b-256 c8cf7ed4f1cb8d91f18eedc5c39634585fe4a941c504faa28f13fbb047d398ca

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