Skip to main content

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 or Anaconda.

From source code

The latest release of pyFAI can be downloaded from Github. 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

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

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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyFAI-0.14.2_src.tar.gz (29.4 MB view details)

Uploaded Source

Built Distributions

pyFAI-0.14.2-cp36-cp36m-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyFAI-0.14.2-cp36-cp36m-manylinux1_x86_64.whl (10.7 MB view details)

Uploaded CPython 3.6m

pyFAI-0.14.2-cp36-cp36m-macosx_10_7_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

pyFAI-0.14.2-cp36-cp36m-macosx_10_6_intel.whl (6.7 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pyFAI-0.14.2-cp35-cp35m-win_amd64.whl (2.9 MB view details)

Uploaded CPython 3.5m Windows x86-64

pyFAI-0.14.2-cp35-cp35m-manylinux1_x86_64.whl (10.6 MB view details)

Uploaded CPython 3.5m

pyFAI-0.14.2-cp35-cp35m-macosx_10_7_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.5m macOS 10.7+ x86-64

pyFAI-0.14.2-cp35-cp35m-macosx_10_6_intel.whl (6.7 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

pyFAI-0.14.2-cp34-cp34m-manylinux1_x86_64.whl (11.0 MB view details)

Uploaded CPython 3.4m

pyFAI-0.14.2-cp27-cp27mu-manylinux1_x86_64.whl (10.5 MB view details)

Uploaded CPython 2.7mu

pyFAI-0.14.2-cp27-cp27m-win_amd64.whl (3.1 MB view details)

Uploaded CPython 2.7m Windows x86-64

pyFAI-0.14.2-cp27-cp27m-manylinux1_x86_64.whl (10.5 MB view details)

Uploaded CPython 2.7m

pyFAI-0.14.2-cp27-cp27m-macosx_10_11_intel.whl (6.7 MB view details)

Uploaded CPython 2.7m macOS 10.11+ intel

pyFAI-0.14.2-cp27-cp27m-macosx_10_7_x86_64.whl (4.3 MB view details)

Uploaded CPython 2.7m macOS 10.7+ x86-64

File details

Details for the file pyFAI-0.14.2_src.tar.gz.

File metadata

  • Download URL: pyFAI-0.14.2_src.tar.gz
  • Upload date:
  • Size: 29.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyFAI-0.14.2_src.tar.gz
Algorithm Hash digest
SHA256 eb435e3359cadcb853fcd8ca1bd7fc1cd0b3ef8bcc4ec7e8adc9d78b65a34919
MD5 614ebb1aa4c0e6f76669956b37fe97dc
BLAKE2b-256 c8a3dd623bf3bc44071387705ef73e15fcf2c2269f2bf99170d49623034a4647

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 e95a2ea2fe5c095a3a69e02f507298ec6ccebe254cb1d06729af49510ae763c3
MD5 4c8585c89babee9e7731d4a215ba3582
BLAKE2b-256 3fd9e2105d8c7c9278e9388e159eed073504b871b34f0dd8c2298d3b3706b5a5

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 54662b9a36d23810c51593910069b0d6d5bd40d8c271d580cd18f36b53bbf2bf
MD5 a92030b833ae86d777b3b1068e825b45
BLAKE2b-256 4f2cbd91439252ce2938b7458160071cc8f740a6fb7f17683a1e471103b29a54

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 71ec3709b34a4de2149f1269ee7dd5a8114e0926f24968d037cb4c0a0b4d403a
MD5 9ac6bba8d5c83b24406e1e7241c10ab8
BLAKE2b-256 8402a3ba1d37563d05e22221a29530839c0ab8ea8b1690ec4d224e82b82659af

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp36-cp36m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 c411f085fe3c6718ffc213de3d1647ed41fa0bc53e433d84a531770d64af2a02
MD5 9bf6ffcdaec01d1d84cfecb1468c0117
BLAKE2b-256 ce2ca8d143816b4aada13a88576318acb1c5674309842ce4c9ec0e3f24293f1a

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp35-cp35m-win_amd64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 340e19989f0d9cfeb26d7130c69ff5f9ee7ec832860f530363b0e1a017f487d4
MD5 3177f31bd28c1b7e5dc52f3ac9602502
BLAKE2b-256 4e06979d037ab7196878a5e6398e01cf44f6173cbbf37db203295afebe1238d5

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 16f0f07ad63d919fb4e91829255bf0e23c4fff581c7640cc98af1143df6ee526
MD5 316a0a86f0144242fa84e05d7f5e5fd4
BLAKE2b-256 f70b5ddba76da3fcd53d2bc44e56fdeffa0d43e8e39f13b120e613b45cf2062c

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp35-cp35m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp35-cp35m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f10fa5bb8377ce9f00f84780b87a5a764c97b44e3466e93349eb51157931d4c5
MD5 aaef65d5a0ae1e5687101ec592324057
BLAKE2b-256 ebd249b0ba2de7538fe1680921e255c9091dec973a6d4f382ec96994b7cca358

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp35-cp35m-macosx_10_6_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 4a05a49373342ba6bc604b99269ec21a421a0f415984e1147b63e1b1694c4765
MD5 e3510e91b276372d6b5b29eb08a8c3a7
BLAKE2b-256 4622c6a4961e53bdb22bbc88827c5d3a10a72230d768a9d694d84ed2e7d50b40

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8b5fe70a706ec9395b5471216848a509bbaebb228cfd8aa4a750dfb0c064edae
MD5 d619edd61c165662ec803a348ac3b3d9
BLAKE2b-256 ce2ea3bece196a61f92ef900c8d7f797198ea59442318658e2bf201c1a1b8608

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e13b19a99ab81a87390542df4f746b4b1c1d22b1a33df5dbfeffb4bc1df646b7
MD5 983d570be8a1eac06a87f016a44e29cd
BLAKE2b-256 4917c8842da54324a97e66baa36812c7a16664c0e7f46768067d7e077052245d

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp27-cp27m-win_amd64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 1673f7c921fd24a848da52d3b55fffbd4e189479ed465684ea0eee265b3a79f0
MD5 8dcc52753c6ed06e7499e04c91cfd05c
BLAKE2b-256 43346cb8753a4447d6450f5a53938dc699240a506bf0e287b7d85feb6f03c8dd

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 11b29f3387c9125f9c60a44e4ab09b8cbd53a782d9f0dc5982691458c5f9b544
MD5 a4f2d57015eafc6d8e4c917b70ca9cec
BLAKE2b-256 4827d5284981fda844a5dc2119c40baed635c34c275ed589dd39344cb4d46d35

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp27-cp27m-macosx_10_11_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp27-cp27m-macosx_10_11_intel.whl
Algorithm Hash digest
SHA256 406be864389fe78ab50a53181ec356c4bbf9d407d7a60707f83ef7e57d358af9
MD5 7dc16cb9717b2892f7cf6558fe4fd9dd
BLAKE2b-256 2d06f82ded1df02a68510ef7119e49ff1b53d77529b43f6eed24a04ad17468f6

See more details on using hashes here.

File details

Details for the file pyFAI-0.14.2-cp27-cp27m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.14.2-cp27-cp27m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 4e7c0615e66b9f8850bb3ad16c8a59250fb4d40a0f637ec9114a3e1d99d433ba
MD5 7e32409f53f09f0a5cefb1e9301fd0ee
BLAKE2b-256 c614508db7ed2be0206559d6ba60873349fac60f5393149b1c16598d87681be4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page