pyfai

Fast Azimuthal Integration in Python

https://github.com/silx-kit/pyfai

Science Score: 77.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 13 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    3 of 80 committers (3.8%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.1%) to scientific vocabulary

Keywords

diffraction python science

Keywords from Contributors

wx tk qt gtk mesh closember spacy-extension hydrology pipeline-testing energy-system
Last synced: 6 months ago · JSON representation ·

Repository

Fast Azimuthal Integration in Python

Basic Info
  • Host: GitHub
  • Owner: silx-kit
  • License: other
  • Language: Python
  • Default Branch: main
  • Size: 528 MB
Statistics
  • Stars: 116
  • Watchers: 13
  • Forks: 102
  • Open Issues: 231
  • Releases: 32
Topics
diffraction python science
Created over 13 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security Copyright

README.rst

pyFAI: Fast Azimuthal Integration in Python
===========================================

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

|Github Actions| |Appveyor Status| |myBinder Launcher| |Zenodo DOI| |RTD docs|

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: https://doi.org/10.1088/1742-6596/425/20/202012
* Implementation in parallel is described in the proceedings of EPDIC13: https://doi.org/10.1017/S0885715613000924
* Benchmarks and optimization procedure is described in the proceedings of EuroSciPy2014: https://doi.org/10.48550/arXiv.1412.6367
* Calibration procedures are described in J. Synch. Radiation (2020): https://doi.org/10.1107/S1600577520000776
* Application of signal separation to diffraction image compression and serial crystallography. J. Appl. Cryst. (2025): https://doi.org/10.1107/S1600576724011038

Installation
------------

With PIP
........

As most Python packages, pyFAI is available via PIP::

   pip install pyFAI[gui]

It is advised to run this in a `vitural 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**).

With conda
..........

pyFAI is also available via conda::

  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 `_.
Presently the source code has been distributed as a zip package.
Download it one and unpack it::

    unzip pyFAI-main.zip

All files are unpacked into the directory pyFAI-main::

    cd pyFAI-main

Install dependencies::

    pip install -r requirements.txt

Build it & test it::

    python3 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 setup 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 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
    pip install .

If you want pyFAI to make use of your graphic card, please install
`pyopencl `_

Documentation
-------------

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

    python3 build-doc.py

Dependencies
------------

Python 3.9, ... 3.13 are well tested and officially supported.
For full functionality of pyFAI the following modules need to be installed.

* ``numpy``      - http://www.numpy.org
* ``scipy`` 	  - http://www.scipy.org
* ``matplotlib`` - http://matplotlib.sourceforge.net/
* ``fabio`` 	  - http://sourceforge.net/projects/fable/files/fabio/
* ``h5py``	     - http://www.h5py.org/
* ``pyopencl``	  - http://mathema.tician.de/software/pyopencl/
* ``pyside6``	  - https://wiki.qt.io/Qt_for_Python
* ``silx``       - http://www.silx.org
* ``numexpr``    - https://github.com/pydata/numexpr

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:

* ``python3-numpy``
* ``python3-scipy``
* ``python3-matplotlib``
* ``python3-dev``
* ``python3-fabio``
* ``python3-pyopencl``
* ``python3-qtpy``
* ``python3-silx``
* ``python3-numexpr``

using apt-get these can be installed as::

    sudo apt-get build-dep pyfai

MacOSX
------

One needs to manually install a recent version of `Python` (>=3.8) prior to installing pyFAI.
Apple provides only an outdated version of Python 2.7 which is now incomatible.
If you want to build pyFAI from sources, you will also need `Xcode` which is available from the Apple store.
The compiled extension will use only one core due to the limitation of the compiler.
OpenCL is hence greately adviced on Apple systems.
Then install the missing dependencies with `pip`::

   pip install -r requirements.txt


Windows
-------

Under Windows, one needs to install `Python` (>=3.8) prior to pyFAI.
The Visual Studio C++ compiler is also needed when building from sources.
Then install the missing dependencies with `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 a subject "subscribe pyfai".

Maintainers
-----------

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

Contributors
------------

* Valentin Valls (ESRF)
* Frédéric-Emmanuel Picca (Soleil)
* Thomas Vincent (ESRF)
* Dimitris Karkoulis (Formerly ESRF)
* Aurore Deschildre (Formerly ESRF)
* Giannis Ashiotis (Formerly ESRF)
* Zubair Nawaz (Formerly Sesame)
* Jon Wright (ESRF)
* Amund Hov (Formerly ESRF)
* Dodogerstlin @github
* Gunthard Benecke (Desy)
* Gero Flucke (Desy)
* Maciej Jankowski (ESRF)

Indirect contributors (ideas...)
--------------------------------

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

.. |Github Actions| image:: https://github.com/silx-kit/pyFAI/actions/workflows/python-package.yml/badge.svg
.. |Appveyor Status| image:: https://ci.appveyor.com/api/projects/status/github/silx-kit/pyfai?svg=true
   :target: https://ci.appveyor.com/project/ESRF/pyfai
.. |myBinder Launcher| image:: https://mybinder.org/badge_logo.svg
   :target: https://mybinder.org/v2/gh/silx-kit/pyFAI/main?filepath=binder%2Findex.ipynb
.. |RTD docs| image:: https://readthedocs.org/projects/pyfai/badge/?version=latest
   :target: https://pyfai.readthedocs.io/en/latest/
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.832896.svg
   :target: https://doi.org/10.5281/zenodo.832896

Owner

  • Name: Organization managing the silx project
  • Login: silx-kit
  • Kind: organization
  • Email: silx@esrf.fr

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use pyFAI, please cite it as below."
authors:
  - family-names: Kieffer
    given-names: Jerome
    orcid: https://orcid.org/0000-0002-0730-6577
    affiliation: ESRF
  - family-names: Valls
    given-names: Valentin
    affiliation: ESRF
  - family-names: Gutierrez-Fernandez
    given-names: Edgar
    affiliation: ESRF
  - family-names: Ashiotis
    given-names: Giannis
    affiliation: ESRF
  - family-names: Karkoulis
    given-names: Dimitris
    affiliation: ESRF
  - family-names: Nawaz
    given-names: Zubair
    affiliation: ESRF
  - family-names: Deschildre
    given-names: Aurore
    affiliation: ESRF
  - family-names: Vincent
    given-names: Thomas
    affiliation: ESRF
  - family-names: Picca
    given-names: Frederic Emmanuel
    affiliation: Soleil
  - family-names: Massahud
    given-names: Emily
    affiliation: ANSTO
  - family-names: Payno
    given-names: Henri
    affiliation: ESRF
  - family-names: Huder
    given-names: Loïc
    affiliation: ESRF
  - family-names: Wright
    given-names: Johnathan Paul
    affiliation: ESRF
  - family-names: Pandolfi
    given-names: Ronald
    affiliation: LBL
    orcid: https://orcid.org/0000-0003-0824-8548
  - family-names: Jankowski
    given-names: Maciej
    affiliation: ESRF
  - family-names: Paleo
    given-names: Pierre
    affiliation: ESRF
  - family-names: Faure
    given-names: Bertrand
    affiliation: Xenocs
  - family-names: Storm
    given-names: Malte
    affiliation: Helmholtz-Zentrum Hereon
  - family-names: De Nolf
    given-names: Wout
    affiliation: ESRF
  - family-names:  Wright
    given-names: Christopher J.
    affiliation: NSLS-II
  - family-names: Hopkins
    given-names: Jesse B.
    orcid: https://orcid.org/0000-0001-8554-8072
    affiliation: APS
  - family-names: Pascal
    given-names: Elena
    affiliation: Diamond
  - family-names: Weninger
    given-names: Clemens
    affiliation: MAX IV
  - family-names: Detlefs
    given-names: Carsten
    affiliation: ESRF
  - family-names:  Plaswig
    given-names: Florian
    affiliation: ESRF
  - family-names: Lavanchy
    given-names: Aurelien
  - family-names: gbenecke
  - family-names: zxs-un
  - family-names: iltommi
    affiliation: LULI
  - family-names: dodogerstlin
date-released: '2025-03-14'
doi: 10.5281/zenodo.15023377
license: MIT
repository-code: https://github.com/silx-kit/pyFAI/tree/v2025.03
type: software
title: "pyFAI: Fast Azimuthal Integration in Python"
version: v2025.03
identifiers:
  - type: doi
    value: 10.5281/zenodo.15023377
cff-version: 1.2.0
identifiers:
- type: swh
  value: swh:1:dir:152f2a14f5adb8a55584ab09eaa911aab3bb3714;origin=https://doi.org/10.5281/zenodo.832896;visit=swh:1:snp:d3e7c816f5a8655ea86e2fa3c32138881bcc42cd;anchor=swh:1:rel:811cecda6ccff076118796e57847c5540b9d3407;path=silx-kit-pyFAI-8cfd244
license:
- mit

GitHub Events

Total
  • Create event: 25
  • Release event: 2
  • Issues event: 196
  • Watch event: 13
  • Delete event: 14
  • Issue comment event: 252
  • Push event: 174
  • Pull request review comment event: 77
  • Pull request review event: 114
  • Pull request event: 245
  • Fork event: 7
Last Year
  • Create event: 25
  • Release event: 2
  • Issues event: 196
  • Watch event: 13
  • Delete event: 14
  • Issue comment event: 252
  • Push event: 174
  • Pull request review comment event: 77
  • Pull request review event: 114
  • Pull request event: 245
  • Fork event: 7

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 7,750
  • Total Committers: 80
  • Avg Commits per committer: 96.875
  • Development Distribution Score (DDS): 0.323
Past Year
  • Commits: 924
  • Committers: 11
  • Avg Commits per committer: 84.0
  • Development Distribution Score (DDS): 0.392
Top Committers
Name Email Commits
Jerome Kieffer j****r@e****r 5,244
Valentin Valls v****s@e****r 1,741
edgar e****z@e****r 245
pre-commit-ci[bot] 6****] 147
Giannis Ashiotis a****s@k****r 53
Picca Frédéric-Emmanuel p****a@d****g 35
Thomas VINCENT t****t@e****r 27
deschila a****e@g****m 26
Picca Frédéric-Emmanuel p****a@s****r 23
Emily Massahud m****e@a****u 22
Loic Huder l****r@e****r 14
Dimitris Karkoulis d**** @ ****l 11
Dimitris Karkoulis d****s@ ****l 10
jonwright w****t@e****r 10
Jerome Kieffer k****r@s****r 8
Alexandre Marie a****e@s****r 7
Giannis Ashiotis g****s@l****n 7
Valentin Valls v****s@m****f 6
Edgar Gutierrez 1****3 5
GiannisA g****s@g****m 5
Kieffer Jerome k****r@K****l 5
Jerome Kieffer j****r@.****r 4
Bertrand Faure b****e@x****m 4
Ronald Pandolfi r****i@g****m 4
dodogerstlin d****n@g****m 4
Maciej Jankowski m****i@e****r 4
Christopher J. Wright c****h@g****m 3
woutdenolf w****f@u****t 3
Pierre Paleo p****o@e****r 3
Malte Storm m****m@h****e 3
and 50 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 365
  • Total pull requests: 644
  • Average time to close issues: 4 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 48
  • Total pull request authors: 20
  • Average comments per issue: 1.39
  • Average comments per pull request: 0.73
  • Merged pull requests: 562
  • Bot issues: 0
  • Bot pull requests: 7
Past Year
  • Issues: 147
  • Pull requests: 281
  • Average time to close issues: 15 days
  • Average time to close pull requests: 4 days
  • Issue authors: 18
  • Pull request authors: 8
  • Average comments per issue: 0.73
  • Average comments per pull request: 0.57
  • Merged pull requests: 233
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • kif (246)
  • EdgarGF93 (40)
  • picca (14)
  • woutdenolf (7)
  • loichuder (4)
  • P-Mousley (3)
  • djm87 (3)
  • jonwright (3)
  • malte-storm (2)
  • emilymassahud (2)
  • CPrescher (2)
  • t20100 (2)
  • marcocamma (2)
  • takluyver (1)
  • ljr-1959 (1)
Pull Request Authors
  • kif (480)
  • EdgarGF93 (115)
  • loichuder (10)
  • vallsv (7)
  • pre-commit-ci[bot] (6)
  • emilymassahud (4)
  • t20100 (4)
  • jacobfilik (2)
  • takluyver (2)
  • harshal301002 (2)
  • woutdenolf (2)
  • pierrepaleo (2)
  • P-Mousley (1)
  • alejandrohomsp (1)
  • malte-storm (1)
Top Labels
Issue Labels
bug (67) enhancement (66) easy (35) gui (27) doc (24) Easy (11) quality (10) question (10) packaging (7) work in progress (4) performance (3) proposal (3) wontfix (2) dependencies (1) invalid (1) OpenCL (1) ready to merge (1) duplicate (1)
Pull Request Labels
ready to merge (277) doc (25) work in progress (22) enhancement (22) gui (16) easy (14) bug (11) proposal (7) quality (6) packaging (5) improvement needed (3) performance (2) question (2) Easy (1) OpenCL (1) dependencies (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 18,941 last-month
  • Total docker downloads: 19
  • Total dependent packages: 25
    (may contain duplicates)
  • Total dependent repositories: 30
    (may contain duplicates)
  • Total versions: 55
  • Total maintainers: 3
pypi.org: pyfai

Python implementation of fast azimuthal integration

  • Documentation: https://pyfai.readthedocs.io/
  • License: Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: pyfai Source: https://github.com/silx-kit/pyFAI Files-Excluded: pyFAI/third_party/_local Files: * Copyright: 2011-2017 European Synchrotron Radiation Facility License: MIT/X11 (BSD like) Files: package/debian?/* Copyright: 2012-2014 Jerome Kieffer <jerome.kieffer@esrf.fr> 2013-2016 Picca Frédéric-Emmanuel <picca@debian.org> 2015-2016 European Synchrotron Radiation Facility License: GPL-3.0+ Files: pyFAI/resources/openCL/bitonic.cl openCL/bsort.cl Copyright: Matthew Scarpino License: public-domain Files: doc/source/mathjax.py Copyright: 2007-2013 by the Sphinx team License: BSD-3 Files: pyFAI/third_party/transformation.py Copyright: 2006-2018, Christoph Gohlke, University of California License: BSD-3 License: BSD-3 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the <organization> nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. License: GPL-3.0+ This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. . This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/> . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". License: public-domain You can use this free for any purpose. It's in the public domain. It has no warranty License: MIT/X11 (BSD like) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 2025.3.0
    published 11 months ago
  • Versions: 35
  • Dependent Packages: 10
  • Dependent Repositories: 26
  • Downloads: 18,941 Last month
  • Docker Downloads: 19
Rankings
Dependent packages count: 1.0%
Downloads: 2.5%
Dependent repos count: 2.8%
Average: 3.9%
Docker downloads count: 4.6%
Forks count: 4.8%
Stargazers count: 7.5%
Maintainers (3)
Last synced: 6 months ago
conda-forge.org: pyfai

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.

  • Versions: 15
  • Dependent Packages: 13
  • Dependent Repositories: 4
Rankings
Dependent packages count: 4.8%
Dependent repos count: 16.2%
Average: 19.3%
Forks count: 20.0%
Stargazers count: 36.1%
Last synced: 6 months ago
conda-forge.org: pyfai-base

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.

  • Versions: 5
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Forks count: 18.5%
Dependent packages count: 19.5%
Average: 26.4%
Stargazers count: 33.7%
Dependent repos count: 34.0%
Last synced: 6 months ago

Dependencies

ci/requirements_appveyor.txt pypi
  • Pillow *
  • fabio *
  • h5py *
  • matplotlib *
  • numexpr *
  • numpy *
  • scipy *
  • silx *
  • wheel *
ci/requirements_gh.txt pypi
  • cython *
  • fabio *
  • h5py *
  • lxml *
  • matplotlib *
  • numexpr *
  • numpy *
  • numpy <1.19
  • numpy <1.20
  • pillow *
  • scipy *
  • silx *
  • unittest2 *
  • wheel *
ci/requirements_rtd.txt pypi
  • cython *
  • docutils <0.20
  • fabio *
  • h5py *
  • ipython_genutils *
  • nbsphinx *
  • numpy *
  • numpy <1.19
  • pygments *
  • scipy *
  • silx *
  • sphinx *
  • sphinx-rtd-theme *
  • sphinxcontrib-programoutput *
ci/requirements_travis.txt pypi
  • cython *
  • fabio *
  • h5py *
  • lxml *
  • matplotlib *
  • numexpr *
  • numpy <1.19
  • numpy *
  • pillow *
  • scipy *
  • silx *
  • unittest2 *
  • wheel *
pyproject.toml pypi
  • fabio *
  • h5py *
  • matplotlib *
  • numexpr != 2.8.6
  • numpy *
  • scipy *
  • silx *
requirements.txt pypi
  • PyOpenGL *
  • PyQt5 *
  • cython >=0.29.31
  • fabio *
  • h5py *
  • hdf5plugin *
  • matplotlib *
  • meson-python *
  • nbsphinx *
  • ninja *
  • numexpr *
  • numpy *
  • scipy *
  • silx >=1.1
  • transformations *
  • wheel *