Go to file
Jerome Kieffer 1b2676710e isnan(None) fails under certain versions of numpy 2019-05-17 14:49:36 +02:00
binder Add ellipse to binder 2019-05-16 09:06:11 +02:00
ci Try to change ubuntu image 2019-01-18 16:09:41 +01:00
doc Merge remote-tracking branch 'upstream/master' into 0.18 2019-05-17 13:30:20 +02:00
package Bump silx to 0.10 2019-05-10 18:42:40 +02:00
plugins Remove PyMca plugin 2018-12-11 17:59:06 +01:00
pyFAI isnan(None) fails under certain versions of numpy 2019-05-17 14:49:36 +02:00
sandbox dump memcache objects 2019-04-16 15:21:06 +02:00
.gitignore Add sparse builder cython class 2018-07-10 17:58:05 +02:00
.landscape.yml Ignore some paths with landslides 2016-11-28 18:16:49 +01:00
.travis.yml Typo 2019-01-21 18:42:07 +01:00
CHANGELOG.txt Update documentation 2015-07-22 15:08:46 +02:00
CONTRIBUTING.md Create CONTRIBUTING.md 2018-12-12 14:03:01 +01:00
LICENSES.txt Change licens of scripts 2017-05-15 16:05:10 +02:00
MANIFEST.in Add *.cpp to manifest 2019-03-18 15:28:37 +01:00
README.rst Fix rst inline code 2019-05-16 09:17:56 +02:00
bootstrap.py Use python3 by default for development as well! 2018-12-18 10:48:37 +01:00
build-deb.sh compatibility with debian 10 2018-11-01 19:51:28 +01:00
copyright Remove copyright information for file which have been deleted 2018-12-11 14:47:07 +01:00
pyproject.toml Bump silx to 0.10 2019-05-10 18:42:40 +02:00
requirements.txt Typo 2018-08-29 16:48:57 +02:00
run_tests.py Use python3 by default for development as well! 2018-12-18 10:48:37 +01:00
setup.cfg Clean up setup.cfg 2017-07-25 16:40:58 +02:00
setup.py Bump silx to 0.10 2019-05-10 18:42:40 +02:00
stdeb.cfg clean-up 2015-10-09 16:27:34 +02:00
version.py start release v0.18: a build for the doc 2019-05-16 07:23:10 +02:00

README.rst

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

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

|Build Status| |Appveyor Status| |myBinder Launcher|

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:
  doi:10.1088/1742-6596/425/20/202012 http://iopscience.iop.org/1742-6596/425/20/202012/
* Implementation in parallel is described in the proceedings of EPDIC13:
  PyFAI: a Python library for high performance azimuthal integration on GPU.
  doi:10.1017/S0885715613000924
* Benchmarks and optimization procedure is described in the proceedings of EuroSciPy2014:
  http://conference.scipy.org/category/euroscipy.html (accepted)

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

With PIP
........

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

   pip install pyFAI [--user]

Provide the *--user* to perform an installation local to your user.
Under UNIX, you may have to run the command via *sudo* to gain root access an
perform a system wide installation.

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

pyFAI is also available via conda (for Linux and Mac, currently)::

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

    unzip pyFAI-master.zip

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

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

    cd pyFAI-master

Build it & test it::

    python setup.py build test

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

   export http_proxy=http://proxy.site.org:3128
   python setup.py build test

This is especially true at ESRF, where you will have to phone the hotline
(24-24) to get this information or grab it from the intranet.

Finally, install pyFAI computer-wise if you have local root access.
This command may request your password to gain root-access::

    sudo pip install . --upgrade

If you prefer a local installation (only you will have access to the
installed version)::

    pip install . --upgrade --user

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
    python setup.py build bdist_wheel
    sudo pip install . --upgrade

If you want pyFAI to make use of your graphic card, please install
`pyopencl <http://mathema.tician.de/software/pyopencl>`_

If you are using MS Windows you can also download a binary version packaged as executable
installation files (Chose the one corresponding to your python version).

For MacOSX users with MacOS version>10.7, the default compiler switched from gcc
to clang and dropped the OpenMP support. Please refer to the installation documentation ...

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

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

    python setup.py build build_doc


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

Python 2.7, 3.4, 3.5, 3.6 and 3.7 are well tested.
Python 2.6, 3.2 and 3.3 are no more supported since pyFAI 0.12
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:

* ``python-numpy``
* ``python-scipy``
* ``python-matplotlib``
* ``python-dev``
* ``python-fabio``
* ``python-pyopencl``
* ``python-pyqt5``
* ``python-silx``
* ``python-numexpr``

and the same with python3
using apt-get these can be installed as::

    sudo apt-get install python-numpy python-scipy python-matplotlib  python-dev python-fabio python-pyopencl python-pyqt5 python-silx python-numexpr
    sudo apt-get install python3-numpy python3-scipy python3-matplotlib  python3-dev python3-fabio python3-pyopencl python3-pyqt5 python3-silx python3-numexpr 

MacOSX
------

You are advised to build pyFAI with the GCC compiler, as the compiler provided
by Apple with XCode (a derivative of clang) lakes the support of OpenMP.
If you use Xcode5 or newer, append the "--no-openmp" option to deactivate multithreading
in binary modules.
You will also need *cython* to re-generate the C-files and delete *src/histogram.c*
before running::

    pip install cython --user --upgrade
    rm pyFAI/ext/histogram.c
    python setup.py build --force-cython --no-openmp


Windows
-------

Under 32 bits windows, pyFAI can be built using The MinGW compiler. Unfortunately,
pyFAI will be limited to small images as the memory consumption, limited to 2GB
under windows, is easily reached.
With 64 bits windows, the Visual Studio C++ compiler is the only one known to
work correctly.

Dependencies for windows have been regrouped in our wheelhouse, just use::

   pip install --trusted-host www.edna-site.org -r requirements_appveyor.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)
* Valentin Valls (ESRF)

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

* Frédéric-Emmanuel Picca (Soleil)
* Thomas Vincent (ESRF)
* Dimitris Karkoulis (ESRF)
* Aurore Deschildre (ESRF)
* Giannis Ashiotis (ESRF)
* Zubair Nawaz (Sesame)
* Jon Wright (ESRF)
* Amund Hov (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

.. |Build Status| image:: https://travis-ci.org/silx-kit/pyFAI.svg?branch=master
   :target: https://travis-ci.org/silx-kit/pyFAI
.. |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/master?filepath=binder%2Findex.ipynb