Go to file
Loic Huder 8ae18a277e Fix typos in CONTRIBUTING 2024-04-16 11:20:49 +02:00
.github include more recent versions of python 2023-10-11 14:53:44 +02:00
applications application metadata 2024-01-25 15:03:25 +01:00
binder Fix index.ipynb generation 2019-05-16 09:43:10 +02:00
ci Merge branch 'main' into 2079_ImageD11 2024-03-08 15:04:23 +01:00
doc Update for compatibility with Numpy2 2024-03-15 13:51:10 +01:00
package Debian12 again (#1891) 2023-05-31 17:25:02 +02:00
plugins filtered by pre-commit 2022-11-15 10:36:04 +01:00
sandbox filtered by pre-commit 2022-11-15 10:36:04 +01:00
src/pyFAI only config copy 2024-04-15 14:28:20 +02:00
.gitattributes provide some packaging tools 2023-01-26 11:33:01 +01:00
.gitignore enable debian12 packaging wo setup.py 2023-05-31 10:00:20 +02:00
.landscape.yml
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate 2024-04-08 16:22:48 +00:00
.readthedocs.yaml move RTD configuration file (+symlink) 2024-02-01 09:00:14 +01:00
.travis.yml drop Python 3.6 from Travis 2022-06-24 14:55:41 +02:00
CHANGELOG.txt filtered by pre-commit 2022-11-15 10:36:04 +01:00
CONTRIBUTING.md Fix typos in CONTRIBUTING 2024-04-16 11:20:49 +02:00
LICENSES.txt
MANIFEST.in related to #1809 2023-01-24 15:50:51 +01:00
README.rst start to make a release candidate 2024-01-15 14:40:14 +01:00
SECURITY.md Create SECURITY.md 2022-04-20 14:48:09 +02:00
bootstrap.py minor improvements 2023-12-01 13:35:11 +01:00
build-deb.sh Update build-deb.sh 2023-12-19 16:27:25 +01:00
build-doc.py tool to build documentation using meson 2023-01-05 10:38:17 +01:00
copyright
meson.build update 2023-12-18 16:35:46 +01:00
pyproject.toml Include pilx as display window of diffmap 2024-03-20 10:41:24 +01:00
requirements.txt needed only one elder python 2024-03-07 12:03:43 +01:00
run_tests.py minor improvements 2023-12-01 13:35:11 +01:00
stdeb.cfg filtered by pre-commit 2022-11-15 10:36:04 +01:00
version.py March version 2024-03-07 19:18:22 +01:00

README.rst

pyFAI: 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 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

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* to perform an installation local to your user (not recommended).
Under UNIX, you may have to run the command via *sudo* to gain root access an
perform a system wide installation (neither recommended).


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

pyFAI is also available via conda::

  conda install pyfai -c conda-forge

To install conda please see either `conda <https://conda.io/docs/install/quick.html>`_ or `Anaconda <https://www.continuum.io/downloads>`_.

From source code
................

The latest release of pyFAI can be downloaded from
`Github <https://github.com/silx-kit/pyFAI/archive/main.zip>`_.
Presently the source code has been distributed as a zip package.
Download it one and unpack it::

    unzip pyFAI-main.zip

As developement is also done on Github,
`development branch is also available <https://github.com/silx-kit/pyFAI/archive/main.zip>`_

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

    cd pyFAI-main

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 (no more needed at ESRF)::

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

Finally, 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 install
`pyopencl <http://mathema.tician.de/software/pyopencl>`_

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

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

    pip install -r requirements.txt
    python3 build-doc.py


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

Python 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.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/
* ``pyqt5``	     - http://www.riverbankcomputing.co.uk/software/pyqt/intro
* ``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-pyqt5``
* ``python3-silx``
* ``python3-numexpr``

using apt-get these can be installed as::

    sudo apt-get build-dep pyfai

MacOSX
------

One needs to install `Python` (>=3.7) and `Xcode` prior 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 with `pip`::

   pip install -r requirements.txt


Windows
-------

Under Windows, one needs to install `Python` (>=3.7) and the Visual Studio C++ compiler.
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)

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

* Edgar 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 @github
* Gunthard Benecke (Desy)
* Gero Flucke (Desy)

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=main
    :alt: Documentation Status
    :scale: 100%
    :target: https://pyfai.readthedocs.io/en/main/?badge=main
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.832896.svg
   :target: https://doi.org/10.5281/zenodo.832896