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

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.

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 and 3.5 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-qt4

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

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

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.13.1.tar.gz (29.8 MB view details)

Uploaded Source

Built Distributions

pyFAI-0.13.1.win-amd64-py3.5.msi (2.5 MB view details)

Uploaded Source

pyFAI-0.13.1.win-amd64-py2.7-1.msi (2.7 MB view details)

Uploaded Source

pyFAI-0.13.1-cp36-cp36m-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyFAI-0.13.1-cp36-cp36m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.6m

pyFAI-0.13.1-cp36-cp36m-macosx_10_7_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

pyFAI-0.13.1-cp35-cp35m-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.5m Windows x86-64

pyFAI-0.13.1-cp35-cp35m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.5m

pyFAI-0.13.1-cp35-cp35m-macosx_10_6_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.5m macOS 10.6+ x86-64

pyFAI-0.13.1-cp35-cp35m-macosx_10_6_intel.whl (5.2 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

pyFAI-0.13.1-cp34-cp34m-manylinux1_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.4m

pyFAI-0.13.1-cp27-none-macosx_10_11_intel.whl (5.3 MB view details)

Uploaded CPython 2.7 macOS 10.11+ intel

pyFAI-0.13.1-cp27-cp27mu-manylinux1_x86_64.whl (8.6 MB view details)

Uploaded CPython 2.7mu

pyFAI-0.13.1-cp27-cp27m-win_amd64.whl (2.7 MB view details)

Uploaded CPython 2.7m Windows x86-64

pyFAI-0.13.1-cp27-cp27m-manylinux1_x86_64.whl (8.6 MB view details)

Uploaded CPython 2.7m

pyFAI-0.13.1-cp27-cp27m-macosx_10_6_x86_64.whl (3.2 MB view details)

Uploaded CPython 2.7m macOS 10.6+ x86-64

File details

Details for the file pyFAI-0.13.1.tar.gz.

File metadata

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

File hashes

Hashes for pyFAI-0.13.1.tar.gz
Algorithm Hash digest
SHA256 efc3a7ce5ca894587304a0351504aa49705cf7187183eb8552557b9d58e367be
MD5 a8c21c063492ccd1c39868cb1e310b27
BLAKE2b-256 cc8f7cca5fa696ebaf7ba66254ffcce12afd68549a90959f3a4fc416763f4c7f

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.1.win-amd64-py3.5.msi.

File metadata

File hashes

Hashes for pyFAI-0.13.1.win-amd64-py3.5.msi
Algorithm Hash digest
SHA256 10ce8261f92dc6f8910b471d413b07c7ef1c563131844054c264fb34d2465efd
MD5 ff60fbb49e6bee010e23233c2929454b
BLAKE2b-256 8ff26e09762d3470241934edaf9490d68bb35fc724ebee38ea72bb7f1f11f41e

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.1.win-amd64-py2.7-1.msi.

File metadata

File hashes

Hashes for pyFAI-0.13.1.win-amd64-py2.7-1.msi
Algorithm Hash digest
SHA256 0b05fff00f613855696fef3f542d674678774fee42b6d90897e8ef221fcde6d1
MD5 bf587e8d8321b1c8a8f756ecf3a487cd
BLAKE2b-256 7e91ac97fb5c3c2de9df680525fb30f7d446714fe31278a23717fa60de88b30d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 2f449b4de6bc3ee3e212932996bcd2760cee90037a33ea91b758044115f3f0e4
MD5 b242e6e10063b5e5c80b33d33f93e75c
BLAKE2b-256 c9567ad86c5ecc711a320653ea98db4d3b23e25dae0ca7f1f9578e727e709859

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 218367e1ebf91a9158e26419afe98095cd1822fac01661f99fbcc9cf9eeb0314
MD5 e58f709b6fe3c9e2efa7e71221ddf01f
BLAKE2b-256 e87d60ce8ce810755b5e51a91c5328ace1f7812b103a88344274b060756c066e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 88de162633dedfb292e0eead90f52507beff3ebfe2503a310e77fa8a9ce7d9dd
MD5 0c33edbd48fb1851c3df7214a1ca61e5
BLAKE2b-256 6f12400373f7a93413e3d3b6982755f6e429df3d420ae19d9cffc6ab283dc8bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 1ace916ffa08f60a08516faa25b40161aa1f33382c5ce0f4bade458640493fef
MD5 a8431c9d8d9214d69ef1c9c0995c417f
BLAKE2b-256 c7c7247daf6edaae76437560fdac2c07bec6cec5795fcef6a0952427556c9b5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 abfaec98c229be3ffa8681dabc3c39143682b2e2f2fbf37ae992f8ece3e2ad90
MD5 1174836bc02e8a61bc7a4c8a7750192d
BLAKE2b-256 4191a38f0728e87db8c443f97f255ceb7f7b4d771330882e5a720832eef82183

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.1-cp35-cp35m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp35-cp35m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 27269d98910375572cde1e885b6918ab1ee5d8effeffa0fb9b4c16d648ab8947
MD5 47a9428cb9cc5bd702103f55450623d3
BLAKE2b-256 7f7b70afff6b24589c3f05b32873148e6c029faf3bec48d40b7ff11883d6b9d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 18c9238ec446efee150f0ed6892f3b0a72f403b7bc5962b3df09d5bf607a92ea
MD5 36f2367b7628cc2a66b298feed17467a
BLAKE2b-256 412a4a98175e1a5e8f562e6a7a0dd022c5893e22674387b30661d9a76f8c383a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6c7f4cc40112f4709922b4f0554011076711bfc6e7249cb3e22be0ce4fe7d5a9
MD5 985828179ce8d81f61af172d25a1a31c
BLAKE2b-256 3e34cc940470413df4fa97aeba5a5e13f582681736f1c6ac143375ffac5a8b82

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.1-cp27-none-macosx_10_11_intel.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp27-none-macosx_10_11_intel.whl
Algorithm Hash digest
SHA256 ddf818c336f376238120de3f29ddfa15650508086d491b764e8af072d4ba73d1
MD5 6b1d9af1eedcd6122c664a4e7545a35d
BLAKE2b-256 41975a4a5c9f30a8887c5eacd3c2032543e887d1eaceabcd963357763015e8c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7c04663e4264ac26d2c2efd913a5dbf8f3b652c49120e7cc28a347e1a4253d01
MD5 09643aa2244bceaca8823bd150a70662
BLAKE2b-256 408bf00fd7299f14864143c29d64199f0f6a97dc852743f2b0bb5e727ce00143

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 d3e250132cb1e452f3c72fdeb4c83671850d360a1faa0656ddc234ee630a6dd9
MD5 7f7df1af7dd5710b252315996fb37aa9
BLAKE2b-256 2a1b182c3d9cfb05d26e1cba34f604d1395ca05d7f27b1e4152a7c6c971b0dd0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 42207df0a1ed29263a2a72c9abfcd8d5bccb05019619457f49aedf397188eb89
MD5 b69644829b8b2163b661f4c41f58ff66
BLAKE2b-256 a149e48fcd02fb4c29305e4a23aa6846b21ed84a77b654e57b161012cc7b1874

See more details on using hashes here.

File details

Details for the file pyFAI-0.13.1-cp27-cp27m-macosx_10_6_x86_64.whl.

File metadata

File hashes

Hashes for pyFAI-0.13.1-cp27-cp27m-macosx_10_6_x86_64.whl
Algorithm Hash digest
SHA256 e5dfcecf7e8e8b3eff93ff1726c8a92e5ba31045c447b931ed50bc3c746c73a7
MD5 4dece7302d952df1e12b0a9f03a9ddcb
BLAKE2b-256 e350eb3a28e5e29cfbc39e19a59b16782791c2ea7e0c0d0ad9da246b50f82e29

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