Package: pyFAI
Main development website:https://github.com/silx-kit/pyFAIPyFAI 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.ReferencesThe philosophy of pyFAI is described in the proceedings of SRI2012:https://doi.org/10.1088/1742-6596/425/20/202012Implementation in parallel is described in the proceedings of EPDIC13:https://doi.org/10.1017/S0885715613000924Benchmarks and optimization procedure is described in the proceedings of EuroSciPy2014:https://doi.org/10.48550/arXiv.1412.6367Calibration procedures are described in J. Synch. Radiation 2020:https://doi.org/10.1107/S1600577520000776InstallationWith PIPAs most Python packages, pyFAI is available via PIP:pip install pyFAI[gui]It is advised to run this in a vitural environment.
Provide the–userto perform an installation local to your user (not recommended).
Under UNIX, you may have to run the command viasudoto gain root access an
perform a system wide installation (neither recommended).With condapyFAI is also available via conda:conda install pyfai -c conda-forgeTo install conda please see eithercondaorAnaconda.From source codeThe latest release of pyFAI can be downloaded fromGithub.
Presently the source code has been distributed as a zip package.
Download it one and unpack it:unzip pyFAI-main.zipAs developement is also done on Github,development branch is also availableAll files are unpacked into the directory pyFAI-main:cd pyFAI-mainBuild it & test it:python3 run_tests.pyFor 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 (no more needed at ESRF):export http_proxy=http://proxy.site.org:3128Finally, install pyFAI in the virtualenv after testing it:pip install --upgrade .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 --upgrade .If you want pyFAI to make use of your graphic card, please installpyopenclDocumentationDocumentation can be build using this command and Sphinx (installed on your computer):pip install -r requirements.txt
python3 build-doc.pyDependenciesPython 3.7, … 3.11 are well tested and officially supported.
For python 3.12, it requires silx version 2 which is still unreleased for now.
For full functionality of pyFAI the following modules need to be installed.numpy-http://www.numpy.orgscipy-http://www.scipy.orgmatplotlib-http://matplotlib.sourceforge.net/fabio-http://sourceforge.net/projects/fable/files/fabio/h5py-http://www.h5py.org/pyopencl-http://mathema.tician.de/software/pyopencl/pyqt5-http://www.riverbankcomputing.co.uk/software/pyqt/introsilx-http://www.silx.orgnumexpr-https://github.com/pydata/numexprThose dependencies can simply be installed by:pip install -r requirements.txtUbuntu and Debian-like Linux distributionsTo 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 pyfaiThe extra Ubuntu packages needed are:python3-numpypython3-scipypython3-matplotlibpython3-devpython3-fabiopython3-pyopenclpython3-pyqt5python3-silxpython3-numexprusing apt-get these can be installed as:sudo apt-get build-dep pyfaiMacOSXOne needs to installPython(>=3.7) andXcodeprior to start installing pyFAI.
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 withpip:pip install -r requirements.txtWindowsUnder Windows, one needs to installPython(>=3.7) and the Visual Studio C++ compiler.
Then install the missing dependencies withpip:pip install  -r requirements.txtGetting helpA 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 tosympa@esrf.frwith a subject “subscribe pyfai”.MaintainersJérôme Kieffer (ESRF)ContributorsEdgar Gutierrez Fernandez (ESRF)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 @githubGunthard Benecke (Desy)Gero Flucke (Desy)Indirect contributors (ideas…)Peter BoeseckeManuel Sánchez del RíoVicente Armando SoléBrian PauwVeijo Honkimaki