pyFAI/README.rst

226 lines
6.9 KiB
ReStructuredText
Raw Normal View History

2014-10-03 03:30:03 +08:00
pyFAI: Fast Azimuthal Integration in Python
===========================================
2012-06-08 03:37:21 +08:00
2016-06-28 20:18:01 +08:00
Main development website: https://github.com/silx-kit/pyFAI
2015-09-04 03:02:25 +08:00
2021-01-06 22:21:05 +08:00
|Build Status| |Appveyor Status| |myBinder Launcher| |RTD docs| |Zenodo DOI|
2015-09-04 03:02:25 +08:00
2021-01-06 22:21:05 +08:00
PyFAI is an azimuthal integration library that tries to be fast (as fast as C
2014-10-03 03:30:03 +08:00
and even more using OpenCL and GPU).
It is based on histogramming of the 2theta/Q positions of each (center of)
2016-04-12 00:46:19 +08:00
pixel weighted by the intensity of each pixel, but parallel version uses a
2014-10-03 03:56:25 +08:00
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.
2012-06-08 03:43:28 +08:00
2017-05-23 15:18:58 +08:00
References
----------
2014-10-03 03:30:03 +08:00
* 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)
2012-06-08 03:43:28 +08:00
Installation
2015-09-04 03:10:00 +08:00
------------
2014-10-03 03:30:03 +08:00
2017-05-23 15:18:58 +08:00
With PIP
........
2016-04-12 00:46:19 +08:00
As most Python packages, pyFAI is available via PIP::
2020-01-31 22:57:29 +08:00
pip install pyFAI[gui]
2016-04-12 00:46:19 +08:00
2022-01-19 16:48:56 +08:00
It is advised to run this in a vitural environment.
Provide the *--user* to perform an installation local to your user (not recommended).
2016-04-12 00:46:19 +08:00
Under UNIX, you may have to run the command via *sudo* to gain root access an
2022-11-15 17:36:04 +08:00
perform a system wide installation (neither recommended).
2022-01-19 16:48:56 +08:00
2016-04-12 00:46:19 +08:00
2017-05-23 15:18:58 +08:00
With conda
..........
2019-05-18 00:50:08 +08:00
pyFAI is also available via conda::
2017-05-23 11:37:43 +08:00
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>`_.
2017-05-23 15:18:58 +08:00
From source code
................
2015-11-05 15:01:12 +08:00
The latest release of pyFAI can be downloaded from
2017-05-23 11:37:43 +08:00
`Github <https://github.com/silx-kit/pyFAI/archive/master.zip>`_.
2015-11-05 15:01:12 +08:00
Presently the source code has been distributed as a zip package.
Download it one and unpack it::
2012-06-08 03:43:28 +08:00
2016-04-13 16:07:21 +08:00
unzip pyFAI-master.zip
2015-09-04 03:10:00 +08:00
2015-11-05 15:01:12 +08:00
As developement is also done on Github,
2016-06-28 20:18:01 +08:00
`development branch is also available <https://github.com/silx-kit/pyFAI/archive/master.zip>`_
2015-09-04 03:10:00 +08:00
2015-11-05 15:01:12 +08:00
All files are unpacked into the directory pyFAI-master::
2015-09-04 03:10:00 +08:00
2015-11-05 15:01:12 +08:00
cd pyFAI-master
2014-01-13 17:07:54 +08:00
2015-09-04 03:27:39 +08:00
Build it & test it::
2015-09-04 03:10:00 +08:00
2022-01-19 16:48:56 +08:00
python3 setup.py build -j 4
2022-01-10 03:33:09 +08:00
python3 run_tests.py
2012-06-08 03:43:28 +08:00
2015-09-04 03:02:25 +08:00
For its tests, pyFAI downloads test images from the internet.
Depending on your network connection and your local network configuration,
2020-01-31 22:57:29 +08:00
you may have to setup a proxy configuration like this (no more needed at ESRF)::
2016-04-12 00:46:19 +08:00
2015-09-04 03:21:38 +08:00
export http_proxy=http://proxy.site.org:3128
2015-07-20 17:38:26 +08:00
2020-01-31 22:57:29 +08:00
Finally, install pyFAI in the virtualenv after testing it::
2015-07-20 17:38:26 +08:00
python3 setup.py bdist_wheel
2022-01-10 03:33:09 +08:00
pip install --upgrade .
2012-06-08 03:43:28 +08:00
2015-11-05 15:01:12 +08:00
The newest development version can also be obtained by checking out from the git
2016-04-12 00:46:19 +08:00
repository::
2015-09-04 03:10:00 +08:00
git clone https://github.com/silx-kit/pyFAI.git
2014-10-03 03:56:25 +08:00
cd pyFAI
2022-01-10 03:33:09 +08:00
pip install --upgrade .
2022-11-15 17:36:04 +08:00
2015-11-05 15:01:12 +08:00
If you want pyFAI to make use of your graphic card, please install
`pyopencl <http://mathema.tician.de/software/pyopencl>`_
2012-09-19 03:59:35 +08:00
2012-10-23 15:54:32 +08:00
If you are using MS Windows you can also download a binary version packaged as executable
2022-01-10 03:33:09 +08:00
installation files (choose the one corresponding to your python version).
2012-06-08 03:43:28 +08:00
2014-07-19 20:17:06 +08:00
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 ...
2014-07-19 20:17:06 +08:00
2013-03-23 01:51:06 +08:00
Documentation
-------------
2015-09-04 03:27:39 +08:00
Documentation can be build using this command and Sphinx (installed on your computer)::
2013-03-23 01:51:06 +08:00
python3 setup.py build build_doc
2013-03-23 01:51:06 +08:00
2012-06-08 03:43:28 +08:00
Dependencies
2015-09-04 03:10:00 +08:00
------------
2012-06-08 03:43:28 +08:00
2022-01-10 03:33:09 +08:00
Python 3.6, ... 3.10 are well tested and officially supported.
2012-06-08 03:43:28 +08:00
For full functionality of pyFAI the following modules need to be installed.
2019-05-16 15:17:56 +08:00
* ``numpy`` - http://www.numpy.org
2019-07-31 19:47:29 +08:00
* ``scipy`` - http://www.scipy.org
2019-05-16 15:17:56 +08:00
* ``matplotlib`` - http://matplotlib.sourceforge.net/
2019-07-31 19:47:29 +08:00
* ``fabio`` - http://sourceforge.net/projects/fable/files/fabio/
2019-05-16 15:17:56 +08:00
* ``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
2012-06-08 03:43:28 +08:00
2015-09-04 03:21:38 +08:00
Those dependencies can simply be installed by::
2016-04-12 00:46:19 +08:00
pip install -r requirements.txt
2015-09-04 03:21:38 +08:00
2017-05-23 15:18:58 +08:00
Ubuntu and Debian-like Linux distributions
------------------------------------------
2014-07-19 20:17:06 +08:00
To use pyFAI on Ubuntu/Debian the needed python modules
2016-04-12 00:46:19 +08:00
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
2017-05-15 22:05:10 +08:00
The extra Ubuntu packages needed are:
2012-06-08 03:43:28 +08:00
2020-01-31 22:57:29 +08:00
* ``python3-numpy``
* ``python3-scipy``
* ``python3-matplotlib``
* ``python3-dev``
* ``python3-fabio``
* ``python3-pyopencl``
* ``python3-pyqt5``
* ``python3-silx``
* ``python3-numexpr``
2015-09-04 03:27:39 +08:00
using apt-get these can be installed as::
2015-09-04 03:10:00 +08:00
2020-01-31 22:57:29 +08:00
sudo apt-get build-dep pyfai
2014-07-19 20:17:06 +08:00
MacOSX
------
2022-11-15 17:36:04 +08:00
One needs to install `Python` (>=3.6) and `Xcode` prior to start installing pyFAI.
2021-01-06 22:21:05 +08:00
The compiled extension will use only one core due to the limitation of the compiler.
2022-11-15 17:36:04 +08:00
OpenCL is hence greately adviced on Apple systems.
2021-01-06 22:21:05 +08:00
Then install the missing dependencies with `pip`::
2015-11-05 15:01:12 +08:00
2021-01-06 22:21:05 +08:00
pip install -r requirements.txt
2022-11-15 17:36:04 +08:00
2014-07-19 20:17:06 +08:00
Windows
-------
2021-01-06 22:21:05 +08:00
Under Windows, one needs to install `Python` (>=3.6) and the Visual Studio C++ compiler.
Then install the missing dependencies with `pip`::
2015-09-04 03:21:38 +08:00
2021-01-06 22:21:05 +08:00
pip install -r requirements.txt
2015-09-04 03:21:38 +08:00
2014-10-16 21:12:47 +08:00
Getting help
2015-09-04 03:10:00 +08:00
------------
2014-10-16 21:12:47 +08:00
2014-10-24 04:19:47 +08:00
A mailing-list, pyfai@esrf.fr, is available to get help on the program and how to use it.
2014-10-16 21:12:47 +08:00
One needs to subscribe by sending an email to sympa@esrf.fr with a subject "subscribe pyfai".
2016-06-28 20:18:01 +08:00
Maintainers
-----------
2015-09-04 03:10:00 +08:00
2019-05-16 15:09:43 +08:00
* Jérôme Kieffer (ESRF)
2012-12-06 20:35:04 +08:00
Contributors
2015-09-04 03:10:00 +08:00
------------
2022-01-19 16:48:56 +08:00
* Valentin Valls (ESRF)
2019-05-16 15:09:43 +08:00
* 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)
2014-07-19 20:17:06 +08:00
2017-05-23 15:18:58 +08:00
Indirect contributors (ideas...)
--------------------------------
2015-09-04 03:10:00 +08:00
2019-05-16 15:09:43 +08:00
* Peter Boesecke
* Manuel Sánchez del Río
* Vicente Armando Solé
* Brian Pauw
* Veijo Honkimaki
2015-09-04 03:02:25 +08:00
.. |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
2019-05-16 00:47:36 +08:00
.. |myBinder Launcher| image:: https://mybinder.org/badge_logo.svg
2019-05-15 21:15:08 +08:00
:target: https://mybinder.org/v2/gh/silx-kit/pyFAI/master?filepath=binder%2Findex.ipynb
2021-01-06 23:01:02 +08:00
.. |RTD docs| image:: https://readthedocs.org/projects/pyFAI/badge/?version=master
:alt: Documentation Status
:scale: 100%
:target: https://pyfai.readthedocs.io/en/master/?badge=master
2021-01-06 22:21:05 +08:00
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.832896.svg
:target: https://doi.org/10.5281/zenodo.832896