Python implementation of fast azimuthal integration
Project description
===========================================
Main development website: https://github.com/silx-kit/pyFAI
|Build Status| |Appveyor Status|
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 and 3.6 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/
* python-qt4 - http://www.riverbankcomputing.co.uk/software/pyqt/intro
* silx - http://www.silx.org
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-qt4
* python-silx
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-qt4 python-silx
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 --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)
* 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file pyFAI-0.14.0.tar.gz
.
File metadata
- Download URL: pyFAI-0.14.0.tar.gz
- Upload date:
- Size: 40.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 271d06beeea956f18064b7f0af02a26730380cdf16da81e8442f535380ae57c5 |
|
MD5 | d6075447aee6153f2584f6c1b11b9d09 |
|
BLAKE2b-256 | 1f2a4e726997c300ff6f95bd55ed9b624a9c4a8220cb7510ecd79d9f4cb99395 |
File details
Details for the file pyFAI-0.14.0-cp36-cp36m-win_amd64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 2.9 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3acc073040ac3f48bbbf2e2a55da815ec1d71a504ea7724f2726ad233cd6c630 |
|
MD5 | 968e7778dffae9a5df734eedfc430347 |
|
BLAKE2b-256 | 90e2dc518d28ec12e7df08d402c041a94b9b3ff4961544d6ce77abf98ab665e2 |
File details
Details for the file pyFAI-0.14.0-cp36-cp36m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp36-cp36m-manylinux1_x86_64.whl
- Upload date:
- Size: 9.7 MB
- Tags: CPython 3.6m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df539cf472e8510521766e5b7763bc13ef2c2ddb78dc200f53541cc4f0597e39 |
|
MD5 | cbb070b5161f528afd9be367efb47565 |
|
BLAKE2b-256 | caee62d498223d88c72c8d965636e34756e3e13e045dbcb6a56f8f547a7b1d99 |
File details
Details for the file pyFAI-0.14.0-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.6m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 934842ad04af5cd45059daf92aabb2fa9a1055182a2c9a2d01d042d1f70bbecc |
|
MD5 | 570d3b4e2f5c8395ad0873b4f4459f61 |
|
BLAKE2b-256 | 14476a5bba900a6dea386a0ba2702790dd2e15db12a3eabafd95fe35aeaeb742 |
File details
Details for the file pyFAI-0.14.0-cp35-cp35m-win_amd64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3fdc09e47df81a857eabb88205e3a7937af7571a4154f5604a707ab8394bd6b |
|
MD5 | a254a343c0811698b6e01f9692722624 |
|
BLAKE2b-256 | 483d86a781df24277afe165b8fe2ff6976b737c58ac431618738390c6fb6acbd |
File details
Details for the file pyFAI-0.14.0-cp35-cp35m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp35-cp35m-manylinux1_x86_64.whl
- Upload date:
- Size: 10.1 MB
- Tags: CPython 3.5m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15c0bb32d1851f28e755cf41e6f0bff00f42d690ac5bf867ae93fefa5e9cfde9 |
|
MD5 | d460cea091fd89c117de341715166b7e |
|
BLAKE2b-256 | 8af3b8f33a9efa9819674992abf114b17cfeec8566736361ae7cd9fd82ed19c9 |
File details
Details for the file pyFAI-0.14.0-cp35-cp35m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp35-cp35m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.5m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8522b28a622b09644b18be04df20c78182a7f34aa596c9b7c3d4439bf7ab234 |
|
MD5 | e9c91cb51aa0dff9c273e14871704107 |
|
BLAKE2b-256 | e3039d59e9a2cb2d0b9f9d419f1b9e49fb403398c6408d29b9693135af89bfc3 |
File details
Details for the file pyFAI-0.14.0-cp35-cp35m-macosx_10_6_intel.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp35-cp35m-macosx_10_6_intel.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.5m, macOS 10.6+ intel
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f0566b2a763165dbfc27d4126ba539a9a569aa6b537e3fce8ba954337de6bf |
|
MD5 | c020736f942f70b1b56cde262b74a274 |
|
BLAKE2b-256 | b357883d133f434d02c2d92ca1b6a458f20c44ae577eac2bf503eb667e61e169 |
File details
Details for the file pyFAI-0.14.0-cp34-cp34m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp34-cp34m-manylinux1_x86_64.whl
- Upload date:
- Size: 10.5 MB
- Tags: CPython 3.4m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 654e157d30ab8c01724c8d962802efd03c2e4bd07e79716de96d91b3e8189749 |
|
MD5 | 459b0452b1bebe21417330907b4dbc32 |
|
BLAKE2b-256 | 75a7ccdf19c41c1b45e8df145a80f0f91c1c6504283278c332d0294b8cf0ebc4 |
File details
Details for the file pyFAI-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 2.7mu
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6570f97f775468575b6d951f060a53d6b1b9a04e71e81c1372fbe9f6ac936882 |
|
MD5 | 278e6a3584844f8cff976e9169ba0a8c |
|
BLAKE2b-256 | 2c66811282715c366df7fb65ccf0f58eea21fccccc9cec99716e0d168df6b5fa |
File details
Details for the file pyFAI-0.14.0-cp27-cp27m-win_amd64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp27-cp27m-win_amd64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 2.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 165b53d307470be3e98f01c00ee14d4e1faca4e0e9e18f95ef90d2b744c84b11 |
|
MD5 | 7b5e9bd9d4c426c6714ccead5dc1dff4 |
|
BLAKE2b-256 | 88db079c2207069c911b03f6ba68dc7d22f35c5a2aeacb8dd1e428f8a0b16657 |
File details
Details for the file pyFAI-0.14.0-cp27-cp27m-manylinux1_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp27-cp27m-manylinux1_x86_64.whl
- Upload date:
- Size: 10.0 MB
- Tags: CPython 2.7m
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be21547efa66d47a11c06ac44afb3f62652a8aa6c232c7788e98c60a0b042b7 |
|
MD5 | 438ebc0137e1ce5c8d4d182f2d2683f4 |
|
BLAKE2b-256 | cfb59050a7b97c045fabf2390abdb1b61b268103a54886f6f2e8c9b6288b5ad5 |
File details
Details for the file pyFAI-0.14.0-cp27-cp27m-macosx_10_11_intel.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp27-cp27m-macosx_10_11_intel.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 2.7m, macOS 10.11+ intel
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab0c1432384c4a00b8a8d054516a567f548dcbf6d7709a000824f7678b40755 |
|
MD5 | 56400f94bc2637e0f3adda5cc36c4b56 |
|
BLAKE2b-256 | ea2aa3ea7de08142753f8d0a318f497b64611cbd57b6f170cf07f633e8f04240 |
File details
Details for the file pyFAI-0.14.0-cp27-cp27m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: pyFAI-0.14.0-cp27-cp27m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 2.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70d6f4c6cdb86820e7903c97395e8ceeea52f78ff3fe5d2afa5b1c111f99add1 |
|
MD5 | a24ac40332ff5722c839b72848eb6a85 |
|
BLAKE2b-256 | 1c6a9c0162646ccb5ba78847163cec801d8830f810ff3bdc9f486fa99f33d9ff |