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, 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.

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

Uploaded Source

Built Distributions

pyFAI-0.17.1-cp37-cp37m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.7m Windows x86-64

pyFAI-0.17.1-cp37-cp37m-manylinux1_x86_64.whl (14.5 MB view details)

Uploaded CPython 3.7m

pyFAI-0.17.1-cp37-cp37m-macosx_10_6_intel.whl (7.8 MB view details)

Uploaded CPython 3.7m macOS 10.6+ intel

pyFAI-0.17.1-cp36-cp36m-win_amd64.whl (3.7 MB view details)

Uploaded CPython 3.6m Windows x86-64

pyFAI-0.17.1-cp36-cp36m-manylinux1_x86_64.whl (14.6 MB view details)

Uploaded CPython 3.6m

pyFAI-0.17.1-cp36-cp36m-macosx_10_6_intel.whl (7.8 MB view details)

Uploaded CPython 3.6m macOS 10.6+ intel

pyFAI-0.17.1-cp35-cp35m-win_amd64.whl (3.5 MB view details)

Uploaded CPython 3.5m Windows x86-64

pyFAI-0.17.1-cp35-cp35m-manylinux1_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.5m

pyFAI-0.17.1-cp35-cp35m-macosx_10_6_intel.whl (7.4 MB view details)

Uploaded CPython 3.5m macOS 10.6+ intel

pyFAI-0.17.1-cp34-cp34m-manylinux1_x86_64.whl (14.1 MB view details)

Uploaded CPython 3.4m

pyFAI-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 2.7mu

pyFAI-0.17.1-cp27-cp27m-win_amd64.whl (3.8 MB view details)

Uploaded CPython 2.7m Windows x86-64

pyFAI-0.17.1-cp27-cp27m-manylinux1_x86_64.whl (13.5 MB view details)

Uploaded CPython 2.7m

pyFAI-0.17.1-cp27-cp27m-macosx_10_6_intel.whl (7.7 MB view details)

Uploaded CPython 2.7m macOS 10.6+ intel

File details

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

File metadata

  • Download URL: pyFAI-0.17.1.tar.gz
  • Upload date:
  • Size: 27.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1.tar.gz
Algorithm Hash digest
SHA256 8500a812efeb50951ae93192c528c137e778998e3fd1a525270b6b4b6f587ee2
MD5 b994fb7cdecae5b3ae306e38ad316730
BLAKE2b-256 75fb4fc9108b361c77dc1074154028a8ec499dec0f74c1ea7ea3e6db5887f907

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.1-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: pyFAI-0.17.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 5c5c8c0064b90f8817ce851fe945211f26df5aec4efb0d99305b30d226924ace
MD5 ac2715e7912af4680691504fa468fe73
BLAKE2b-256 b295f0f2ad5045dc5917f7d70285264c5de520a563fb7e72d0ed177bec5ed491

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.1-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: pyFAI-0.17.1-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.5 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c291ac11a6d087da4cf5c8926cabd7b0fa68d21045efb7eecc3f32a44c6db314
MD5 efca131193cd3216d3e2de7aac120941
BLAKE2b-256 161f484ecaf78e05e6cbccd6acc9deda919acb33a334af09e74f85bf7eea4c0c

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.1-cp37-cp37m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pyFAI-0.17.1-cp37-cp37m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.8 MB
  • Tags: CPython 3.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp37-cp37m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 c396ae65ee36eea649df5ea46691e3eb84c4e0beaf558c5d7f106f5562474e0f
MD5 efda52efeaedd3c97a484cb545a551e9
BLAKE2b-256 ff8c5ffd71b37416945752539e7783ed49ef27c34ee15b74b40adc33a5654420

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 42ccb5cc1a8f81af4cce884b2215eb75336960ac8ed00aee5e7b84ae514fa8f3
MD5 70fb8642612531bc02b052d324991a39
BLAKE2b-256 bd4411f814a8cfe0cda9d536f52899697f37030bf9ba461d87ac374c0f41e83c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.6 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7162f857ac92c68eb759bd6f68f149961a878c52c424d8e9e3288dedf4ea338e
MD5 b36a755f7c834628a4adbbbfa7185191
BLAKE2b-256 a1f84ad5f9e90d51648cb3086ffd433ebdfd1ccb38709fd67349505da4344048

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp36-cp36m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.8 MB
  • Tags: CPython 3.6m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp36-cp36m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 dcbe4a54e1d33c814949b7e6f3ec3f32deaf41d828e64763c7fb4771b91760bd
MD5 2fc1b740352007afb3534d1edcad43eb
BLAKE2b-256 b348dc6df2df47486155e7f22d995a5a8d5aa5392c98e7170c6b4d8b1bb03f23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp35-cp35m-win_amd64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: CPython 3.5m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp35-cp35m-win_amd64.whl
Algorithm Hash digest
SHA256 c8f11d12d6c88d2b0c119773715e1c5e9b795c8de6ced537a485ed9c771f61e5
MD5 1d39d0f1cb675442dc0590d980415e61
BLAKE2b-256 f902b2d2c0784cd259f8448c5d20b2c802cc9de903ca3b3dd4943d16130b4fba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 377159435190c50f514d01f4c3edeaa0cadd974b6b9461f3ca4c1b9700ce482f
MD5 0bccd5e68cb96394df8a858751302935
BLAKE2b-256 0d631f9c03dc1b37947af2320efac3fbd6ba4cde0a9843ef06d3a1903d9800b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp35-cp35m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.4 MB
  • Tags: CPython 3.5m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp35-cp35m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 4b63b878d197b8d977feb25ff42d2b45260267b6ff2ae74570e5fccb8a035585
MD5 87bc9c1dc40fd23d04e5a75819a0a1c7
BLAKE2b-256 1784d520e44ecdf9f8a5ea9672181c80baa5e545e900104669a8a1934911636a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 14.1 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 dce6bd71ce5b44bdaff39106bacc8bb9b813a7b7151876da24ae7206dbbdfb98
MD5 ebaba0e6bbec17209228a4738bfecf9f
BLAKE2b-256 cc2f6559e88f5d2993faad38f77a960e7c82f739a2d277836b28d829e0192d19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a2b6da1a0a8a334602d20b5de1be9d65cbcab68ec8e63fee0cec3776fbc54631
MD5 1e91f6da89b393bce63418891db0ca7c
BLAKE2b-256 728764fcdc14b32f49af59523f0a5d24b68d0d132baeeffb4a7bc7f5d4f7d858

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp27-cp27m-win_amd64.whl
  • Upload date:
  • Size: 3.8 MB
  • Tags: CPython 2.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp27-cp27m-win_amd64.whl
Algorithm Hash digest
SHA256 f813cac38cced9772365b93ee9fdf8c8386a2cf331d24e1c3c3e5d8cc0ff8ded
MD5 4d814afa4958cb081bc74cf883720237
BLAKE2b-256 1ab88243a6a40e6aea9278d660304a0b37691b9922799f241bc307c506fce82b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyFAI-0.17.1-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 13.5 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f24e29d0b91ec792ce5380997f357fc8e1c2db3f64735cbaf1f173f67ac2b9e5
MD5 67f92544fafcc4ea5f6759e393d53180
BLAKE2b-256 89d422219254a0abbc1aba1d819d0a3e6b551157b89fd9eb657bc6524a778fde

See more details on using hashes here.

File details

Details for the file pyFAI-0.17.1-cp27-cp27m-macosx_10_6_intel.whl.

File metadata

  • Download URL: pyFAI-0.17.1-cp27-cp27m-macosx_10_6_intel.whl
  • Upload date:
  • Size: 7.7 MB
  • Tags: CPython 2.7m, macOS 10.6+ intel
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.19.6 CPython/3.5.3

File hashes

Hashes for pyFAI-0.17.1-cp27-cp27m-macosx_10_6_intel.whl
Algorithm Hash digest
SHA256 b6400f65c94fd5c1a5e14410bb5c074d370473637631427edf5d1ff178248617
MD5 336850bc3e70ca4be0d915d317866dca
BLAKE2b-256 943300a07d8f32894b9f2dcb3a4fea765a836735aabd99ac3943fe6a5cbf3408

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